![]() |
Lumino
|
World 内の全エンティティのベースクラスです。 More...
#include <WorldObject.hpp>
Public Member Functions | |
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 | |
virtual void | onPreUpdate () |
物理演算・衝突判定の前 (onCollisionStay() などはこの後) | |
virtual void | onUpdate (float elapsedSeconds) |
フレーム更新 | |
bool | init () |
WorldObject を作成します。 | |
World 内の全エンティティのベースクラスです。
void ln::WorldObject::destroy | ( | ) |
WorldObject を破棄します。
実際の削除は、現在のフレームのアップデート処理後に行われます。 削除された WorldObject は、親の World, Level, WorldObject からも除外されます。