![]() |
Springhead
An open source physics engine for virtual reality, haptics and motion generation.
|

Public メソッド | |
| SPR_IFDEF (PHBody) | |
| Posed | GetPose () const |
| 剛体の位置と向きを取得する [詳細] | |
| Vec3d | GetVelocity () const |
| 剛体の速度を取得する [詳細] | |
| Vec3d | GetAngularVelocity () const |
| 剛体の角速度を取得する [詳細] | |
| Vec3d | GetCenterOfMass () |
| 質量中心を取得する [詳細] | |
| Vec3d | GetFramePosition () |
| 剛体の位置を取得する [詳細] | |
| Vec3d | GetCenterPosition () |
| 剛体の質量中心の位置を取得する [詳細] | |
| bool | IsDynamical () |
| 動く物体かどうか | |
| bool | IsFrozen () |
| 速度が0になり、計算省略のために凍らせているかどうか | |
| void | AddShape (CDShapeIf *shape) |
| 剛体に形状を登録する [詳細] | |
| void | AddShapes (CDShapeIf **shBegin, CDShapeIf **shEnd) |
| void | RemoveShape (int index) |
| 剛体から形状を取り外す [詳細] | |
| void | RemoveShapes (int idxBegin, int idxEnd) |
| void | RemoveShape (CDShapeIf *shape) |
| 剛体から形状を取り外す [詳細] | |
| int | NShape () |
| 登録されている形状の個数を取得する [詳細] | |
| CDShapeIf * | GetShape (int index) |
| 登録されている形状を取得する [詳細] | |
| Posed | GetShapePose (int index) |
| 形状の位置と向きを取得する [詳細] | |
| void | SetShapePose (int index, const Posed &pose) |
| 形状の位置と向きを設定する [詳細] | |
| void | ClearShape () |
| 形状をClearする [詳細] | |
| void | GetBBox (Vec3d &bbmin, Vec3d &bbmax, bool world) |
| Bounding boxを取得.必要なら再計算 [詳細] | |
| bool | InvalidateBbox () |
| Bounding Box キャッシュの無効化. [詳細] | |
Public メソッド inherited from SceneObjectIf | |
| SPR_IFDEF (SceneObject) | |
| SceneIf * | GetScene () |
| 所属Sceneの取得 | |
| SceneObjectIf * | CloneObject () |
| 自分を所属Sceneに複製する | |
Public メソッド inherited from NamedObjectIf | |
| SPR_IFDEF (NamedObject) | |
| const char * | GetName () const |
| 名前の取得 | |
| void | SetName (const char *n) |
| 名前の設定 | |
| NameManagerIf * | GetNameManager () |
| 名前管理オブジェクトの取得 | |
Public メソッド inherited from ObjectIf | |
| SPR_IFDEF (Object) | |
| ObjectIf * | GetObjectIf () |
| const ObjectIf * | GetObjectIf () const |
| int | DelRef () const |
| void | Print (std::ostream &os) const |
| デバッグ用の表示。子オブジェクトを含む。 | |
| void | PrintShort (std::ostream &os) const |
| デバッグ用の表示。子オブジェクトを含まない。 | |
| void | DumpObjectR (std::ostream &os, int level=0) const |
| オブジェクトツリーのメモリイメージをダンプ | |
| int | AddRef () |
| int | RefCount () |
| size_t | NChildObject () const |
| 子オブジェクトの数 | |
| ObjectIf * | GetChildObject (size_t pos) |
| 子オブジェクトの取得 | |
| const ObjectIf * | GetChildObject (size_t pos) const |
| bool | AddChildObject (ObjectIf *o) |
| 子オブジェクトの追加.複数のオブジェクトの子オブジェクトとして追加してよい. 例えば,GRFrameはツリーを作るが,全ノードがGRSceneの子でもある. | |
| bool | DelChildObject (ObjectIf *o) |
| 子オブジェクトの削除 | |
| void | Clear () |
| すべての子オブジェクトの削除と、プロパティのクリア | |
| ObjectIf * | CreateObject (const IfInfo *info, const void *desc) |
| オブジェクトを作成し,AddChildObject()を呼ぶ. | |
| template<class T > | |
| ObjectIf * | CreateObject (const T &desc) |
| CreateObjectを呼び出すユーティリティ関数 | |
| const void * | GetDescAddress () const |
| デスクリプタの読み出し(参照版 NULLを返すこともある). これが実装されていなくても,ObjectIf::GetDesc()は実装されていることが多い. | |
| bool | GetDesc (void *desc) const |
| デスクリプタの読み出し(コピー版 失敗する(falseを返す)こともある). ObjectIf::GetDescAddress() が実装されていなくても,こちらは実装されていることがある. | |
| void | SetDesc (const void *desc) |
| デスクリプタの設定 | |
| size_t | GetDescSize () const |
| デスクリプタのサイズ | |
| const void * | GetStateAddress () const |
| 状態の読み出し(参照版 NULLを返すこともある). これが実装されていなくても,ObjectIf::GetState()は実装されていることがある. | |
| bool | GetState (void *state) const |
| 状態の読み出し(コピー版 失敗する(falseを返す)こともある). ObjectIf::GetStateAddress() が実装されていなくても,こちらは実装されていることがある. | |
| void | SetState (const void *state) |
| 状態の設定 | |
| bool | WriteStateR (std::ostream &fout) |
| 状態の書き出し | |
| bool | WriteState (std::string fileName) |
| bool | ReadStateR (std::istream &fin) |
| 状態の読み込み | |
| bool | ReadState (std::string fileName) |
| size_t | GetStateSize () const |
| 状態のサイズ | |
| void | ConstructState (void *m) const |
| メモリブロックを状態型に初期化 | |
| void | DestructState (void *m) const |
| 状態型をメモリブロックに戻す | |
| void AddShape | ( | CDShapeIf * | shape | ) |
| void ClearShape | ( | ) |
形状リストを空にする.
| Vec3d GetAngularVelocity | ( | ) | const |
| void GetBBox | ( | Vec3d & | bbmin, |
| Vec3d & | bbmax, | ||
| bool | world | ||
| ) |
| bbmin | bboxの下限 |
| bbmax | bboxの上限 |
| world | trueならワールド座標,falseならローカル座標に平行なbbox |
| Vec3d GetCenterOfMass | ( | ) |
| Vec3d GetCenterPosition | ( | ) |
| Vec3d GetFramePosition | ( | ) |
| Posed GetPose | ( | ) | const |
参照元 PHIKEndEffector::ApplyExactState(), と CRGrabController::SetTargetSolid().
| CDShapeIf* GetShape | ( | int | index | ) |
| index | 形状インデックス |
形状リストのindex番目の形状を返す.
| Posed GetShapePose | ( | int | index | ) |
| index | 対象とする形状のインデックス |
形状リストのindex番目の形状の位置と向きを取得する.
| Vec3d GetVelocity | ( | ) | const |
| bool InvalidateBbox | ( | ) |
Shapeのパラメータを変えた場合には呼び出しが必要。
| int NShape | ( | ) |
形状リストの要素数を返す.
| void RemoveShape | ( | int | index | ) |
| index | 形状インデックス |
形状リストからindex番目の形状を削除する. その結果,index+1番目以降の形状のインデックスは1つ先頭に向かってシフトするので注意が必要.
| void RemoveShape | ( | CDShapeIf * | shape | ) |
| shape | 形状へのポインタ |
形状リストの中からshapeを参照している要素をすべて削除する. その結果,削除された要素よりも後ろにある要素は先頭に向かってシフトするので注意が必要.
| void SetShapePose | ( | int | index, |
| const Posed & | pose | ||
| ) |
| index | 対象とする形状のインデックス |
| pose | 剛体に対する形状の位置と向き |
形状リストのindex番目の位置と向きを設定する.