OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::VideoTexture Class Reference

動画を Texture のように扱えるクラス More...

#include <VideoTexture.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 VideoTexture ()
 
SIV3D_NODISCARD_CXX20 VideoTexture (FilePathView path, Loop loop=Loop::Yes, TextureDesc desc=TextureDesc::Unmipped)
 動画テクスチャを作成します。 More...
 
bool isEmpty () const noexcept
 
 operator bool () const noexcept
 
void release ()
 
void advance (double deltaTimeSec=Scene::DeltaTime()) const
 動画の時間を進めます。 More...
 
void reset () const
 動画の再生時間を先頭に戻します。 More...
 
bool isLoop () const noexcept
 動画がループするかを返します。 More...
 
double posSec () const noexcept
 
double lengthSec () const
 動画の長さ(秒)を返します。 More...
 
void setPosSec (double posSec) const
 
const TexturegetTexture () const noexcept
 
 operator const Texture & () const noexcept
 
const VideoReadergetVideoReader () const noexcept
 
int32 width () const
 動画の幅(ピクセル)を返します。 More...
 
int32 height () const
 動画の高さ(ピクセル)を返します。 More...
 
Size size () const
 動画の幅と高さ(ピクセル)を返します。 More...
 
TextureDesc getDesc () const
 
TextureFormat getFormat () const
 
bool isMipped () const
 
bool isSDF () const
 
Rect region (int32 x, int32 y) const
 
Rect region (Point pos=Point{ 0, 0 }) const
 
RectF region (double x, double y) const
 
RectF region (Vec2 pos) const
 
RectF regionAt (double x, double y) const
 
RectF regionAt (Vec2 pos) const
 
RectF draw (const ColorF &diffuse=Palette::White) const
 
RectF draw (const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF draw (Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 
RectF draw (Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 
RectF draw (double x, double y, const ColorF &diffuse=Palette::White) const
 
RectF draw (double x, double y, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF draw (double x, double y, Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 
RectF draw (double x, double y, Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 
RectF draw (const Vec2 &pos, const ColorF &diffuse=Palette::White) const
 
RectF draw (const Vec2 &pos, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF draw (const Vec2 &pos, Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 
RectF draw (const Vec2 &pos, Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 
RectF draw (Arg::topLeft_< Vec2 > topLeft, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::topRight_< Vec2 > topRight, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::bottomLeft_< Vec2 > bottomLeft, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::bottomRight_< Vec2 > bottomRight, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::topCenter_< Vec2 > topCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::bottomCenter_< Vec2 > bottomCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::leftCenter_< Vec2 > leftCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::rightCenter_< Vec2 >rightCenter, const ColorF &diffuse=Palette::White) const
 
RectF draw (Arg::center_< Vec2 > center, const ColorF &diffuse=Palette::White) const
 
RectF drawAt (double x, double y, const ColorF &diffuse=Palette::White) const
 
RectF drawAt (double x, double y, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF drawAt (const Vec2 &pos, const ColorF &diffuse=Palette::White) const
 
RectF drawAt (const Vec2 &pos, const ColorF &color0, const ColorF &color1, const ColorF &color2, const ColorF &color3) const
 
RectF drawClipped (double x, double y, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
RectF drawClipped (const Vec2 &pos, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
RectF drawAtClipped (double x, double y, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
RectF drawAtClipped (const Vec2 &pos, const RectF &clipRect, const ColorF &diffuse=Palette::White) const
 
TextureRegion operator() (double x, double y, double w, double h) const
 
TextureRegion operator() (const Vec2 &xy, double w, double h) const
 
TextureRegion operator() (double x, double y, double size) const
 
TextureRegion operator() (double x, double y, const Vec2 &size) const
 
TextureRegion operator() (const Vec2 &xy, const Vec2 &size) const
 
TextureRegion operator() (const RectF &rect) const
 
TextureRegion uv (double u, double v, double w, double h) const
 
TextureRegion uv (const RectF &rect) const
 
TextureRegion mirrored () const
 
TextureRegion mirrored (bool doMirror) const
 
TextureRegion flipped () const
 
TextureRegion flipped (bool doFlip) const
 
TextureRegion scaled (double s) const
 
TextureRegion scaled (double xs, double ys) const
 
TextureRegion scaled (Vec2 s) const
 
TextureRegion resized (double size) const
 
TextureRegion resized (double width, double height) const
 
TextureRegion resized (Vec2 size) const
 
TextureRegion repeated (double xRepeat, double yRepeat) const
 
TextureRegion repeated (Vec2 _repeat) const
 
TextureRegion mapped (double width, double height) const
 
TextureRegion mapped (Vec2 size) const
 
TextureRegion fitted (double width, double height, AllowScaleUp allowScaleUp=AllowScaleUp::Yes) const
 
TextureRegion fitted (const Vec2 &size, AllowScaleUp allowScaleUp=AllowScaleUp::Yes) const
 
TexturedQuad rotated (double angle) const
 
TexturedQuad rotatedAt (double x, double y, double angle) const
 
TexturedQuad rotatedAt (const Vec2 &pos, double angle) const
 
TexturedRoundRect rounded (double r) const
 
TexturedRoundRect rounded (double x, double y, double w, double h, double r) const
 
void swap (VideoTexture &other) noexcept
 

Detailed Description

動画を Texture のように扱えるクラス

Constructor & Destructor Documentation

◆ VideoTexture() [1/2]

SIV3D_NODISCARD_CXX20 s3d::VideoTexture::VideoTexture ( )

◆ VideoTexture() [2/2]

SIV3D_NODISCARD_CXX20 s3d::VideoTexture::VideoTexture ( FilePathView  path,
Loop  loop = Loop::Yes,
TextureDesc  desc = TextureDesc::Unmipped 
)
explicit

動画テクスチャを作成します。

Parameters
path動画ファイルのパス
loopループするか

Member Function Documentation

◆ advance()

void s3d::VideoTexture::advance ( double  deltaTimeSec = Scene::DeltaTime()) const

動画の時間を進めます。

Parameters
deltaTimeSec進める時間(秒)
Remarks
1 フレーム先までバッファリングするため、この関数を毎フレーム呼び出すのが最も効率的です。

◆ draw() [1/21]

RectF s3d::VideoTexture::draw ( Arg::bottomCenter_< Vec2 bottomCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [2/21]

RectF s3d::VideoTexture::draw ( Arg::bottomLeft_< Vec2 bottomLeft,
const ColorF diffuse = Palette::White 
) const

◆ draw() [3/21]

RectF s3d::VideoTexture::draw ( Arg::bottomRight_< Vec2 bottomRight,
const ColorF diffuse = Palette::White 
) const

◆ draw() [4/21]

RectF s3d::VideoTexture::draw ( Arg::center_< Vec2 center,
const ColorF diffuse = Palette::White 
) const

◆ draw() [5/21]

RectF s3d::VideoTexture::draw ( Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

◆ draw() [6/21]

RectF s3d::VideoTexture::draw ( Arg::leftCenter_< Vec2 leftCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [7/21]

RectF s3d::VideoTexture::draw ( Arg::rightCenter_< Vec2 rightCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [8/21]

RectF s3d::VideoTexture::draw ( Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

◆ draw() [9/21]

RectF s3d::VideoTexture::draw ( Arg::topCenter_< Vec2 topCenter,
const ColorF diffuse = Palette::White 
) const

◆ draw() [10/21]

RectF s3d::VideoTexture::draw ( Arg::topLeft_< Vec2 topLeft,
const ColorF diffuse = Palette::White 
) const

◆ draw() [11/21]

RectF s3d::VideoTexture::draw ( Arg::topRight_< Vec2 topRight,
const ColorF diffuse = Palette::White 
) const

◆ draw() [12/21]

RectF s3d::VideoTexture::draw ( const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ draw() [13/21]

RectF s3d::VideoTexture::draw ( const ColorF diffuse = Palette::White) const

◆ draw() [14/21]

RectF s3d::VideoTexture::draw ( const Vec2 pos,
Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

◆ draw() [15/21]

RectF s3d::VideoTexture::draw ( const Vec2 pos,
Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

◆ draw() [16/21]

RectF s3d::VideoTexture::draw ( const Vec2 pos,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ draw() [17/21]

RectF s3d::VideoTexture::draw ( const Vec2 pos,
const ColorF diffuse = Palette::White 
) const

◆ draw() [18/21]

RectF s3d::VideoTexture::draw ( double  x,
double  y,
Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

◆ draw() [19/21]

RectF s3d::VideoTexture::draw ( double  x,
double  y,
Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

◆ draw() [20/21]

RectF s3d::VideoTexture::draw ( double  x,
double  y,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ draw() [21/21]

RectF s3d::VideoTexture::draw ( double  x,
double  y,
const ColorF diffuse = Palette::White 
) const

◆ drawAt() [1/4]

RectF s3d::VideoTexture::drawAt ( const Vec2 pos,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ drawAt() [2/4]

RectF s3d::VideoTexture::drawAt ( const Vec2 pos,
const ColorF diffuse = Palette::White 
) const

◆ drawAt() [3/4]

RectF s3d::VideoTexture::drawAt ( double  x,
double  y,
const ColorF color0,
const ColorF color1,
const ColorF color2,
const ColorF color3 
) const

◆ drawAt() [4/4]

RectF s3d::VideoTexture::drawAt ( double  x,
double  y,
const ColorF diffuse = Palette::White 
) const

◆ drawAtClipped() [1/2]

RectF s3d::VideoTexture::drawAtClipped ( const Vec2 pos,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ drawAtClipped() [2/2]

RectF s3d::VideoTexture::drawAtClipped ( double  x,
double  y,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ drawClipped() [1/2]

RectF s3d::VideoTexture::drawClipped ( const Vec2 pos,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ drawClipped() [2/2]

RectF s3d::VideoTexture::drawClipped ( double  x,
double  y,
const RectF clipRect,
const ColorF diffuse = Palette::White 
) const

◆ fitted() [1/2]

TextureRegion s3d::VideoTexture::fitted ( const Vec2 size,
AllowScaleUp  allowScaleUp = AllowScaleUp::Yes 
) const

◆ fitted() [2/2]

TextureRegion s3d::VideoTexture::fitted ( double  width,
double  height,
AllowScaleUp  allowScaleUp = AllowScaleUp::Yes 
) const

◆ flipped() [1/2]

TextureRegion s3d::VideoTexture::flipped ( ) const

◆ flipped() [2/2]

TextureRegion s3d::VideoTexture::flipped ( bool  doFlip) const

◆ getDesc()

TextureDesc s3d::VideoTexture::getDesc ( ) const

◆ getFormat()

TextureFormat s3d::VideoTexture::getFormat ( ) const

◆ getTexture()

const Texture& s3d::VideoTexture::getTexture ( ) const
noexcept

◆ getVideoReader()

const VideoReader& s3d::VideoTexture::getVideoReader ( ) const
noexcept

◆ height()

int32 s3d::VideoTexture::height ( ) const

動画の高さ(ピクセル)を返します。

Returns
動画の高さ(ピクセル)

◆ isEmpty()

bool s3d::VideoTexture::isEmpty ( ) const
noexcept

◆ isLoop()

bool s3d::VideoTexture::isLoop ( ) const
noexcept

動画がループするかを返します。

Returns
動画がループする場合 true, それ以外の場合は false

◆ isMipped()

bool s3d::VideoTexture::isMipped ( ) const

◆ isSDF()

bool s3d::VideoTexture::isSDF ( ) const

◆ lengthSec()

double s3d::VideoTexture::lengthSec ( ) const

動画の長さ(秒)を返します。

Returns
動画の長さ(秒)

◆ mapped() [1/2]

TextureRegion s3d::VideoTexture::mapped ( double  width,
double  height 
) const

◆ mapped() [2/2]

TextureRegion s3d::VideoTexture::mapped ( Vec2  size) const

◆ mirrored() [1/2]

TextureRegion s3d::VideoTexture::mirrored ( ) const

◆ mirrored() [2/2]

TextureRegion s3d::VideoTexture::mirrored ( bool  doMirror) const

◆ operator bool()

s3d::VideoTexture::operator bool ( ) const
explicitnoexcept

◆ operator const Texture &()

s3d::VideoTexture::operator const Texture & ( ) const
noexcept

◆ operator()() [1/6]

TextureRegion s3d::VideoTexture::operator() ( const RectF rect) const

◆ operator()() [2/6]

TextureRegion s3d::VideoTexture::operator() ( const Vec2 xy,
const Vec2 size 
) const

◆ operator()() [3/6]

TextureRegion s3d::VideoTexture::operator() ( const Vec2 xy,
double  w,
double  h 
) const

◆ operator()() [4/6]

TextureRegion s3d::VideoTexture::operator() ( double  x,
double  y,
const Vec2 size 
) const

◆ operator()() [5/6]

TextureRegion s3d::VideoTexture::operator() ( double  x,
double  y,
double  size 
) const

◆ operator()() [6/6]

TextureRegion s3d::VideoTexture::operator() ( double  x,
double  y,
double  w,
double  h 
) const

◆ posSec()

double s3d::VideoTexture::posSec ( ) const
noexcept

◆ region() [1/4]

RectF s3d::VideoTexture::region ( double  x,
double  y 
) const

◆ region() [2/4]

Rect s3d::VideoTexture::region ( int32  x,
int32  y 
) const

◆ region() [3/4]

Rect s3d::VideoTexture::region ( Point  pos = Point{ 0, 0 }) const

◆ region() [4/4]

RectF s3d::VideoTexture::region ( Vec2  pos) const

◆ regionAt() [1/2]

RectF s3d::VideoTexture::regionAt ( double  x,
double  y 
) const

◆ regionAt() [2/2]

RectF s3d::VideoTexture::regionAt ( Vec2  pos) const

◆ release()

void s3d::VideoTexture::release ( )

◆ repeated() [1/2]

TextureRegion s3d::VideoTexture::repeated ( double  xRepeat,
double  yRepeat 
) const

◆ repeated() [2/2]

TextureRegion s3d::VideoTexture::repeated ( Vec2  _repeat) const

◆ reset()

void s3d::VideoTexture::reset ( ) const

動画の再生時間を先頭に戻します。

◆ resized() [1/3]

TextureRegion s3d::VideoTexture::resized ( double  size) const

◆ resized() [2/3]

TextureRegion s3d::VideoTexture::resized ( double  width,
double  height 
) const

◆ resized() [3/3]

TextureRegion s3d::VideoTexture::resized ( Vec2  size) const

◆ rotated()

TexturedQuad s3d::VideoTexture::rotated ( double  angle) const

◆ rotatedAt() [1/2]

TexturedQuad s3d::VideoTexture::rotatedAt ( const Vec2 pos,
double  angle 
) const

◆ rotatedAt() [2/2]

TexturedQuad s3d::VideoTexture::rotatedAt ( double  x,
double  y,
double  angle 
) const

◆ rounded() [1/2]

TexturedRoundRect s3d::VideoTexture::rounded ( double  r) const

◆ rounded() [2/2]

TexturedRoundRect s3d::VideoTexture::rounded ( double  x,
double  y,
double  w,
double  h,
double  r 
) const

◆ scaled() [1/3]

TextureRegion s3d::VideoTexture::scaled ( double  s) const

◆ scaled() [2/3]

TextureRegion s3d::VideoTexture::scaled ( double  xs,
double  ys 
) const

◆ scaled() [3/3]

TextureRegion s3d::VideoTexture::scaled ( Vec2  s) const

◆ setPosSec()

void s3d::VideoTexture::setPosSec ( double  posSec) const

◆ size()

Size s3d::VideoTexture::size ( ) const

動画の幅と高さ(ピクセル)を返します。

Returns
動画の幅と高さ(ピクセル)

◆ swap()

void s3d::VideoTexture::swap ( VideoTexture other)
noexcept

◆ uv() [1/2]

TextureRegion s3d::VideoTexture::uv ( const RectF rect) const

◆ uv() [2/2]

TextureRegion s3d::VideoTexture::uv ( double  u,
double  v,
double  w,
double  h 
) const

◆ width()

int32 s3d::VideoTexture::width ( ) const

動画の幅(ピクセル)を返します。

Returns
動画の幅(ピクセル)

The documentation for this class was generated from the following file: