![]() |
Lumino
|
スプライトオブジェクトを表します。 More...
#include <Sprite.hpp>
Public Member Functions | |
void | setTexture (Texture *value) |
スプライトが表示するテクスチャを設定します。 | |
void | setSize (const Size &value) |
スプライトの大きさを設定します。 | |
void | setSize (float width, float height) |
スプライトの大きさを設定します。 | |
void | setSourceRect (const Rect &rect) |
テクスチャのどの部分を表示するかを示す転送矩形を設定します。(ピクセル単位) デフォルトは Rect::Empty で、テクスチャ全体を転送することを示します。 | |
void | setSourceRect (float x, float y, float width, float height) |
const Rect & | sourceRect () const |
テクスチャのどの部分を表示するかを示す転送矩形を取得します。(ピクセル単位) | |
void | setFrameSet (SpriteSheet *value) |
SpriteSheet を設定します。 | |
void | setFrameIndex (int index) |
SpriteSheet から適用するフレームインデックスを設定します。デフォルトは -1 で、これはフレームを使用しないことを示します。 | |
void | setAnchorPoint (const Vector2 &value) |
スプライトの原点を設定します。 More... | |
const Vector2 & | anchorPoint () const |
アンカーポイント (原点) を取得します。 | |
void | setFlippedX (bool value) |
表示するテクスチャを水平に反転するかどうかを設定します。 | |
bool | isFlippedX () const |
表示するテクスチャを水平に反転するかどうかを確認します。 | |
void | setFlippedY (bool value) |
表示するテクスチャを垂直に反転するかどうかを設定します。 | |
bool | isFlippedY () const |
表示するテクスチャを垂直に反転するかどうかを確認します。 | |
void | setCallerTest (TestDelegate *callback) |
test | |
![]() | |
void | setVisible (bool value) |
可視状態を設定します。false の場合、コンポーネントの描画は行われません。(default: true) | |
bool | isVisible () const |
可視状態を取得します。 | |
void | setShadingModel (const Optional< ShadingModel > &value) |
ShadingModel を設定します。(default: ShadingModel::Default) | |
const Optional< ShadingModel > & | shadingModel () const |
ShadingModel を取得します。 | |
void | setBlendMode2 (BlendMode value) |
合成方法を設定します。(default: BlendMode::Normal) | |
void | setBlendMode (const Optional< BlendMode > &mode) |
合成方法を設定します。(default: BlendMode::Normal) | |
const Optional< BlendMode > & | blendMode () const |
合成方法を取得します。 | |
void | setDepthTestEnabled (const Optional< bool > &enabled) |
このノードを描画する際の深度テストの有無を設定します。(default: true) | |
const Optional< bool > & | isDepthTestEnabled () const |
このノードを描画する際の深度テストの有無を取得します。 | |
void | setDepthWriteEnabled (const Optional< bool > &enabled) |
このノードを描画する際の深度書き込みの有無を設定します。(default: true) | |
const Optional< bool > & | isDepthWriteEnabled () const |
このノードを描画する際の深度書き込みの有無を取得します。 | |
void | setCullMode (const Optional< CullMode > &mode) |
このノードを描画する際のカリング方法を設定します。(default: CullMode::Back) | |
const Optional< CullMode > & | cullMode () const |
このノードを描画する際のカリング方法を取得します。 | |
void | setOpacity (float value) |
不透明度を設定します。(default: 1.0) | |
float | opacity () const |
不透明度を取得します。 | |
void | setColorScale (const Color &value) |
カラースケールを設定します。(default: Color(1, 1, 1, 1)) | |
const Color & | colorScale () const |
カラースケールを取得します。 | |
void | setBlendColor (const Color &value) |
ブレンドカラーを設定します。(default: Color(0, 0, 0, 0)) | |
const Color & | blendColor () const |
ブレンドカラーを取得します。 | |
void | setTone (const ColorTone &value) |
色調を設定します。(default: Tone(0, 0, 0, 0)) | |
const ColorTone & | tone () const |
色調を取得します。 | |
![]() | |
void | setPosition (const Vector3 &pos) |
このオブジェクトの位置を設定します。 | |
void | setPosition (float x, float y, float z=0.0f) |
このオブジェクトの位置を設定します。 | |
const Vector3 & | position () const |
このオブジェクトの位置を位置を取得します。 | |
void | setRotation (const Quaternion &rot) |
このオブジェクトの回転を設定します。 | |
void | setRotation (float x, float y, float z) |
このオブジェクトの回転をオイラー角から設定します(radian単位) 。回転順序は Z(Roll) > X(Pich) > Y(Yaw) です。 | |
const Quaternion & | rotation () const |
このオブジェクトの回転を取得します。 | |
void | setScale (const Vector3 &scale) |
このオブジェクトの拡大率を設定します。 | |
void | setScale (float xyz) |
このオブジェクトの拡大率を設定します。 | |
void | setScale (float x, float y, float z=1.0f) |
このオブジェクトの拡大率を設定します。 | |
const Vector3 & | scale () const |
このオブジェクトの拡大率を取得します。 | |
void | setCenterPoint (const Vector3 &value) |
このオブジェクトのローカルの中心位置を設定します。 | |
void | setCenterPoint (float x, float y, float z=0.0f) |
このオブジェクトのローカルの中心位置を設定します。 | |
const Vector3 & | centerPoint () const |
このオブジェクトのローカルの中心位置を取得します。 | |
void | lookAt (const Vector3 &target) |
指定した座標を向くように、オブジェクトを回転させます。 | |
void | lookAt (float x, float y, float z) |
指定した座標を向くように、オブジェクトを回転させます。 | |
void | lookAt (const Vector3 &target, const Vector3 &up) |
指定した座標を向くように、オブジェクトを回転させます。 | |
void | lookAt (float x, float y, float z, const Vector3 &up) |
指定した座標を向くように、オブジェクトを回転させます。 | |
void | addComponent (Component *component) |
Component を追加します。 | |
void | removeComponent (Component *component) |
Component を除外します。 | |
void | addTag (const StringRef &tag) |
タグを追加します。 | |
void | removeTag (const StringRef &tag) |
タグを除外します。 | |
bool | hasTag (const StringRef &tag) const |
指定したタグを持っているかを確認します。 | |
void | destroy () |
WorldObject を破棄します。 More... | |
bool | destroyed () const |
destroy() が呼び出され、オブジェクトが破棄されようとしているか、または破棄されたかを確認します。実際の削除は、現在のフレームのアップデート処理後に行われます。 | |
void | removeFromParent () |
このオブジェクトを直ちに World から除外します。このメソッドは World のアップデートシーケンス中に呼び出してはなりません。 | |
Component * | findComponentByType (const TypeInfo *type) const |
この WorldObject に含まれている Component のうち、指定した型である最初の Component を返します。 | |
void | addInto (World *world=nullptr) |
この WorldObject を指定した World へ追加します。省略した場合はデフォルトの World へ追加します。 | |
Protected Member Functions | |
void | init () |
init | |
void | init (Texture *texture) |
init | |
void | init (Texture *texture, float width, float height) |
init | |
![]() | |
virtual void | onPreUpdate () |
物理演算・衝突判定の前 (onCollisionStay() などはこの後) | |
virtual void | onUpdate (float elapsedSeconds) |
フレーム更新 | |
bool | init () |
WorldObject を作成します。 | |
スプライトオブジェクトを表します。
void ln::Sprite::setAnchorPoint | ( | const Vector2 & | value | ) |
スプライトの原点を設定します。
値は (0,0) から (1,1) の間で指定します。 デフォルトは (0,0) で、これはスプライトの左下が原点であることを意味します。 (0.5,0.5) はスプライトの中央、(1,1) は右上が原点となります。アンカーポイント (原点) を設定します。デフォルトは中心(0.5, 0.5) です。
void ln::Sprite::setSourceRect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.