Public 型 |
| enum | BroadOpType { Or,
And
} |
| | collisionFilterとgroupFilterの組み合わせを変更する
[詳細]
|
| enum | SleepAlgorithmType { BroadphaseBase,
NarrowphaseBase
} |
| | スリープ状態をチェックする際のアルゴリズムをスイッチする
[詳細]
|
Public メソッド |
| bool | RaycastHit (ref RayHit ray) |
| | レイキャストチェック
|
| bool | RaycastHit (ref RayHit ray, uint collisionFilter, uint groupFilter) |
| | レイキャストチェック
|
|
| PhysicsScene () |
| | シーンコンストラクタ
|
|
void | Simulate () |
| | シミュレートする
|
| void | Simulate (int click_index, Vector2 click_pos, Vector2 diff_pos) |
| | シミュレートする
|
| PhysicsShape | AddSphereShape (float radius) |
| | シーンに球形状を追加する
|
| PhysicsShape | AddBoxShape (Vector2 width) |
| | シーンにボックス形状を追加する
|
| PhysicsShape | AddConvexShape (Vector2[] pos, int num) |
| | シーンに凸形状を追加する
|
| PhysicsShape | AddConvexHullShape (Vector2[] pos, int num) |
| | シーンにランダム頂点列による凸包形状を追加する
|
| PhysicsShape | AddLineChainShape (Vector2[] pos, int num) |
| | シーンに接続したライン形状生成を追加する
|
| PhysicsBody | AddBody (int shapeIndex, float mass) |
| | 剛体をシーンに追加する
|
| PhysicsBody | AddBody (PhysicsShape shape, float mass) |
| | 剛体をシーンに追加する
|
| Vector2 | MergeCompound (PhysicsBody[] bodyList, int num, bool flag=true) |
| | 剛体のマージ
|
| PhysicsJoint | AddJoint (int bodyIndex1, int bodyIndex2, Vector2 anchorPos) |
| | ジョイントをシーンに追加する
|
| PhysicsJoint | AddJoint (PhysicsBody body1, PhysicsBody body2, Vector2 anchorPos) |
| | ジョイントをシーンに追加する
|
| PhysicsSpring | AddSpring (int bodyIndex1, int bodyIndex2, Vector2 anchorPos1, Vector2 anchorPos2) |
| | ジョイントをシーンに追加する
|
| PhysicsSpring | AddSpring (PhysicsBody body1, PhysicsBody body2, Vector2 anchorPos1, Vector2 anchorPos2) |
| | スプリングをシーンに追加する
|
| int | DeleteJoint (int index) |
| | ジョイント削除
|
| int | DeleteJoint (PhysicsJoint joint) |
| | ジョイント削除
|
| int | DeleteSpring (int index) |
| | スプリング削除
|
| int | DeleteSpring (PhysicsSpring spring) |
| | スプリング削除
|
| int | DeleteBody (int index) |
| | 剛体削除
|
| int | DeleteBody (PhysicsBody body) |
| | 剛体削除
|
| bool | QueryContact (uint index1, uint index2) |
| | 2つの剛体の間に衝突があったかどうかの記録を調べる
|
| bool | QueryContact (PhysicsBody body1, PhysicsBody body2) |
| | 2つの剛体の間に衝突があったかどうかの記録を調べる
|
| int | QueryContactTrigger (uint index, uint[] indexlist) |
| | トリガー剛体と他の剛体の間に衝突があったかチェックする
|
| int | GetShapeIndex (PhysicsShape shape) |
| | 衝突形状のインデックスを調べる
|
| int | GetBodyIndex (PhysicsBody body) |
| | 剛体のインデックスを調べる
|
| int | GetJointIndex (PhysicsJoint joint) |
| | ジョイントのインデックスを調べる
|
| int | GetSpringIndex (PhysicsSpring spring) |
| | スプリングのインデックスを調べる
|
| PhysicsShape | GetShape (int index) |
| | 衝突形状を得る
|
| PhysicsBody | GetBody (int index) |
| | 剛体を得る
|
| PhysicsJoint | GetJoint (int index) |
| | ジョイントを得る
|
| PhysicsSpring | GetSpring (int index) |
| | スプリングを得る
|
| void | AddIgnorePair (uint index1, uint index2) |
| | 衝突を無視するペアをリストに加える
|
| void | AddIgnorePair (PhysicsBody body1, PhysicsBody body2) |
| | 衝突を無視するペアをリストに加える
|
| void | RemoveIgnorePair (uint index1, uint index2) |
| | 衝突を無視するペアをリストから削除する
|
| void | RemoveIgnorePair (PhysicsBody body1, PhysicsBody body2) |
| | 衝突を無視するペアをリストから削除する
|
| bool | CheckOutOfBound (PhysicsBody body) |
| | シミュレーションエリアを出たかどうかをチェック、出ていたらシミュレーションに考慮されない
|
| int | CheckPicking (ref Vector2 click_pos, ref Vector2 diff_pos, bool rigorous_check) |
| | タッチポイントの下にある剛体を探す
|
| int | CheckForcePicking (ref Vector2 click_pos, ref Vector2 diff_pos, bool rigorous_check) |
| | タッチポイントの下にある剛体を探す
|
|
virtual void | InitScene () |
| | シーンの初期化を定義する
|
|
virtual void | ReleaseScene () |
| | デバッグレンダリングリソースを含む、リソースの解放をここで定義する
|
| virtual void | KeyboardFunc (GamePadButtons ePad) |
| | ゲームパッドイベントの扱いを定義
|
|
virtual void | UpdateFuncAfterSim () |
| | ポストシミュレーション処理, 衝突情報に基づく処理などを定義する
|
|
virtual void | UpdateFuncBeforeSim () |
| | プレシミュレーション処理, 位置情報に基づき、外力を加えるなどの処理を定義する
|
| virtual void | DrawAllBody (ref GraphicsContext graphics, ref ShaderProgram program, Matrix4 rendering_scale, int click_index) |
| | レンダリングをユーザーが定義する
|
| virtual void | DrawAdditionalInfo (ref GraphicsContext graphics, ref ShaderProgram program, Matrix4 rendering_scale) |
| | デバッグレンダリングをユーザーが定義する
|
Public 変数 |
|
int | numBody = 0 |
| | シーン中の剛体数
|
|
int | numJoint = 0 |
| | シーン中のジョイント数
|
|
int | numSpring = 0 |
| | シーン中のスプリング数
|
|
int | numShape = 0 |
| | シーン中の形状数
|
|
int | numBroadPair = 0 |
| | broad phase衝突判定により衝突可能性のあるペア数
|
|
int | numPhysicsSolverPair = 0 |
| | narrow phase衝突判定により衝突するペア数
|
|
int | numOldPhysicsSolverPair = 0 |
| | 前のnarrow phase衝突判定により衝突するペア数
|
|
PhysicsBody[] | sceneBodies = new PhysicsBody[maxBody] |
| | シーン中の剛体リスト
|
|
PhysicsShape[] | sceneShapes = new PhysicsShape[maxShape] |
| | シーン中の形状リスト
|
|
uint[] | broadPair = new uint[maxContacts] |
| | シーン中のbroad phase衝突ペアリスト
|
|
PhysicsSolverPair[] | solverPair = new PhysicsSolverPair[maxContacts] |
| | シーン中の衝突ペアリスト
|
|
PhysicsJoint[] | sceneJoints = new PhysicsJoint[maxJoint] |
| | シーン中のジョイントリスト
|
|
PhysicsSpring[] | sceneSprings = new PhysicsSpring[maxSpring] |
| | シーン中のスプリングリスト
|
| uint[] | compoundMap = new uint[maxBody] |
| | コンパウンド形状対応マップ
|
|
float | simDt = 1.0f/60.0f |
| | シミュレーションのタイムステップ
|
|
Vector2 | gravity = new Vector2(0, -9.8f) |
| | シーン中の重力加速度
|
|
Vector2 | sceneMin = new Vector2(-1000.0f, -1000.0f) |
| | シミュレーションエリアの境界
|
|
Vector2 | sceneMax = new Vector2(1000.0f, 1000.0f) |
| | シミュレーションエリアの境界
|
|
ulong | sceneFrame = 0 |
| | このシーンのシミュレーションが始まってからのフレーム数
|
|
string | sceneName = "Scene made by Physics2DEngine" |
| | シミュレーションのシーン名
|
|
int | numIgnorePair = 0 |
| | シーン中の衝突を無視するペアの数
|
|
uint[] | ignorePair = new uint[maxIgnore] |
| | シーン中の衝突を無視するペアリスト
|
|
bool | printPerf = false |
| | シミュレーション中の各計算フェーズのパフォーマンスを出力する
|
|
bool | uniqueProperty = true |
| | シーン特性にユニークな値を使うか
|
|
float | penetrationRepulse = 0.2f |
| | めり込みに対する反発力の加速係数
|
|
float | penetLimit = 0.03f |
| | めり込みに対する許容度
|
|
float | tangentFriction = 0.3f |
| | 反発に対する接線方向の摩擦係数
|
|
float | restitutionCoeff = 0.0f |
| | 反発に対する反発係数
|
|
SleepAlgorithmType | sleepAlgorithm = SleepAlgorithmType.BroadphaseBase |
| | スリープアルゴリズムがブロードフェーズによるか、ナローフェーズによるか
|
| BroadOpType | filterOp |
| | filterOp
|
プロパティ |
|
int | NumBody [get, set] |
| | setter and getter of numBody
|
|
int | NumJoint [get, set] |
| | setter and getter of numJoint
|
|
int | NumSpring [get, set] |
| | setter and getter of numSpring
|
|
int | NumShape [get, set] |
| | setter and getter of numShape
|
|
int | NumBroadPair [get, set] |
| | setter and getter of numBroadPair
|
|
int | NumPhysicsSolverPair [get, set] |
| | setter and getter of numPhysicsSolverPair
|
|
int | NumOldPhysicsSolverPair [get, set] |
| | setter and getter of numOldPhysicsSolverPair
|
|
PhysicsBody[] | SceneBodies [get, set] |
| | setter and getter of sceneBodies
|
|
PhysicsShape[] | SceneShapes [get, set] |
| | setter and getter of sceneShapes
|
|
PhysicsJoint[] | SceneJoints [get, set] |
| | setter and getter of sceneJoints
|
|
PhysicsSpring[] | SceneSprings [get, set] |
| | setter and getter of sceneSprings
|
|
float | SimDt [get, set] |
| | setter and getter of simDt
|
|
Vector2 | Gravity [get, set] |
| | setter and getter of gravity
|
|
Vector2 | SceneMin [get, set] |
| | setter and getter of sceneMin
|
|
Vector2 | SceneMax [get, set] |
| | setter and getter of sceneMax
|
|
ulong | SceneFrame [get, set] |
| | setter and getter of sceneFrame
|
|
string | SceneName [get, set] |
| | setter and getter of sceneName
|
|
int | NumIgnorePair [get, set] |
| | setter and getter of numIgnorePair
|
|
uint[] | IgnorePair [get, set] |
| | setter and getter of ignorePair
|
|
bool | PrintPerf [get, set] |
| | setter and getter of printPerf
|
|
bool | UniqueProperty [get, set] |
| | setter and getter of uniqueProperty
|
|
float | PenetrationRepulse [get, set] |
| | setter and getter of penetrationRepulse
|
|
float | PenetLimit [get, set] |
| | setter and getter of penetLimit
|
|
float | TangentFriction [get, set] |
| | setter and getter of tangentFriction
|
|
float | RestitutionCoeff [get, set] |
| | setter and getter of restitutionCoeff
|
|
BroadOpType | FilterOp [get, set] |
| | setter and getter of filterOp
|
|
uint[] | CompoundMap [get, set] |
| | setter and getter of compoundMap
|
| PhysicsSolverPair[] | SolverPair [get] |
| | getter of solverPair
|
| uint[] | BroadPair [get] |
| | getter of broadPair
|
|
SleepAlgorithmType | SleepAlgorithm [get, set] |
| | setter and getter of sleepAlgorithm
|