@ue-too/dynamics / index / RigidBody
インターフェイス: RigidBody
定義: rigidbody.ts:17
Rigid body interface for 2D physics simulation.
Remarks
Represents a physical object in the physics world with mass, velocity, rotation, and collision properties. Can be either static (immovable) or dynamic (responds to forces).
Implemented by Circle and Polygon classes.
プロパティ
AABB
AABB:
object
定義: rigidbody.ts:27
Axis-Aligned Bounding Box for broad phase collision
max
max:
Point
min
min:
Point
angularVelocity
angularVelocity:
number
定義: rigidbody.ts:25
Angular velocity (radians/second)
center
center:
Point
定義: rigidbody.ts:19
Center position in world coordinates
collisionFilter
collisionFilter:
CollisionFilter
定義: rigidbody.ts:36
Collision filtering configuration
isSleeping
isSleeping:
boolean
定義: rigidbody.ts:39
linearVelocity
linearVelocity:
Point
定義: rigidbody.ts:23
Linear velocity (pixels/second)
mass
mass:
number
定義: rigidbody.ts:29
Mass in arbitrary units (affects force response)
momentOfInertia
momentOfInertia:
number
定義: rigidbody.ts:33
Moment of inertia (rotational mass)
orientationAngle
orientationAngle:
number
定義: rigidbody.ts:21
Rotation angle in radians
sleepThreshold
sleepThreshold:
number
定義: rigidbody.ts:40
sleepTime
sleepTime:
number
定義: rigidbody.ts:41
staticFrictionCoeff
staticFrictionCoeff:
number
定義: rigidbody.ts:31
Static friction coefficient (0-1)
timeAtRest
timeAtRest:
number
定義: rigidbody.ts:42
メソッド
applyForce()
applyForce(
force):void
定義: rigidbody.ts:49
パラメータ
force
Point
戻り値
void
applyForceInOrientation()
applyForceInOrientation(
force):void
定義: rigidbody.ts:50
パラメータ
force
Point
戻り値
void
getAdjacentFaces()
getAdjacentFaces(
collisionNormal):object[]
定義: rigidbody.ts:56
パラメータ
collisionNormal
Point
戻り値
object[]
getCollisionAxes()
getCollisionAxes(
relativeBody):Point[]
定義: rigidbody.ts:48
パラメータ
relativeBody
RigidBody
戻り値
Point[]
getMinMaxProjection()
getMinMaxProjection(
unitvector):object
定義: rigidbody.ts:47
パラメータ
unitvector
Point
戻り値
object
max
max:
number
min
min:
number
getNormalOfSignificantFace()
getNormalOfSignificantFace(
collisionNormal):Point
定義: rigidbody.ts:55
パラメータ
collisionNormal
Point
戻り値
Point
getSignificantVertices()
getSignificantVertices(
collisionNormal):Point[]
定義: rigidbody.ts:54
パラメータ
collisionNormal
Point
戻り値
Point[]
isMovingStatic()
isMovingStatic():
boolean
定義: rigidbody.ts:46
戻り値
boolean
isStatic()
isStatic():
boolean
定義: rigidbody.ts:45
戻り値
boolean
move()
move(
delta):void
定義: rigidbody.ts:52
パラメータ
delta
Point
戻り値
void
setSleeping()
setSleeping(
sleeping):void
定義: rigidbody.ts:62
パラメータ
sleeping
boolean
戻り値
void
significantVertex()
significantVertex(
collisionNormal):Point
定義: rigidbody.ts:53
パラメータ
collisionNormal
Point
戻り値
Point
step()
step(
deltaTime):void
定義: rigidbody.ts:44
パラメータ
deltaTime
number
戻り値
void
updateSleeping()
updateSleeping(
deltaTime):void
定義: rigidbody.ts:63
パラメータ
deltaTime
number
戻り値
void