@ue-too/dynamics / index / BaseRigidBody
抽象 クラス: BaseRigidBody
定義: rigidbody.ts:70
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.
によって拡張された
実装
コンストラクター
コンストラクター
new BaseRigidBody(
center,_orientationAngle,mass,isStaticBody,frictionEnabled):BaseRigidBody
定義: rigidbody.ts:94
パラメータ
center
Point
_orientationAngle
number = 0
mass
number = 50
isStaticBody
boolean = false
frictionEnabled
boolean = false
戻り値
BaseRigidBody
プロパティ
_angularVelocity
protected_angularVelocity:number
定義: rigidbody.ts:74
_center
protected_center:Point
定義: rigidbody.ts:71
_linearVelocity
protected_linearVelocity:Point
定義: rigidbody.ts:73
_mass
protected_mass:number=50
定義: rigidbody.ts:72
_orientationAngle
protected_orientationAngle:number=0
定義: rigidbody.ts:75
_staticFrictionCoeff
protected_staticFrictionCoeff:number=0.3
定義: rigidbody.ts:79
angularDampingFactor
protectedangularDampingFactor:number=0.005
定義: rigidbody.ts:83
collisionFilter
collisionFilter:
CollisionFilter
定義: rigidbody.ts:86
Collision filtering configuration
の実装
dynamicFrictionCoeff
protecteddynamicFrictionCoeff:number=0.3
定義: rigidbody.ts:80
force
protectedforce:Point
定義: rigidbody.ts:77
frictionEnabled
protectedfrictionEnabled:boolean=false
定義: rigidbody.ts:81
isMovingStaticBody
protectedisMovingStaticBody:boolean=false
定義: rigidbody.ts:82
isSleeping
isSleeping:
boolean=false
定義: rigidbody.ts:89
の実装
isStaticBody
protectedisStaticBody:boolean=false
定義: rigidbody.ts:78
linearAcceleartion
protectedlinearAcceleartion:Point
定義: rigidbody.ts:76
sleepThreshold
sleepThreshold:
number=0.01
定義: rigidbody.ts:90
の実装
sleepTime
sleepTime:
number=0.5
定義: rigidbody.ts:91
の実装
timeAtRest
timeAtRest:
number=0
定義: rigidbody.ts:92
の実装
アクセッサー
AABB
署名を取得する
get
abstractAABB():object
定義: rigidbody.ts:318
Axis-Aligned Bounding Box for broad phase collision
戻り値
object
max
max:
Point
min
min:
Point
Axis-Aligned Bounding Box for broad phase collision
の実装
angularVelocity
署名を取得する
get angularVelocity():
number
定義: rigidbody.ts:130
Angular velocity (radians/second)
戻り値
number
署名を設定する
set angularVelocity(
angularVelocity):void
定義: rigidbody.ts:134
Angular velocity (radians/second)
パラメータ
angularVelocity
number
戻り値
void
Angular velocity (radians/second)
の実装
center
署名を取得する
get center():
Point
定義: rigidbody.ts:284
Center position in world coordinates
戻り値
Point
署名を設定する
set center(
dest):void
定義: rigidbody.ts:288
Center position in world coordinates
パラメータ
dest
Point
戻り値
void
Center position in world coordinates
の実装
linearVelocity
署名を取得する
get linearVelocity():
Point
定義: rigidbody.ts:292
Linear velocity (pixels/second)
戻り値
Point
署名を設定する
set linearVelocity(
dest):void
定義: rigidbody.ts:296
Linear velocity (pixels/second)
パラメータ
dest
Point
戻り値
void
Linear velocity (pixels/second)
の実装
mass
署名を取得する
get mass():
number
定義: rigidbody.ts:300
Mass in arbitrary units (affects force response)
戻り値
number
Mass in arbitrary units (affects force response)
の実装
momentOfInertia
署名を取得する
get
abstractmomentOfInertia():number
定義: rigidbody.ts:312
Moment of inertia (rotational mass)
戻り値
number
Moment of inertia (rotational mass)
の実装
orientationAngle
署名を取得する
get orientationAngle():
number
定義: rigidbody.ts:138
Rotation angle in radians
戻り値
number
Rotation angle in radians
の実装
staticFrictionCoeff
署名を取得する
get staticFrictionCoeff():
number
定義: rigidbody.ts:304
Static friction coefficient (0-1)
戻り値
number
署名を設定する
set staticFrictionCoeff(
coeff):void
定義: rigidbody.ts:308
Static friction coefficient (0-1)
パラメータ
coeff
number
戻り値
void
Static friction coefficient (0-1)
の実装
メソッド
applyForce()
applyForce(
force):void
定義: rigidbody.ts:162
パラメータ
force
Point
戻り値
void
の実装
applyForceInOrientation()
applyForceInOrientation(
force):void
定義: rigidbody.ts:170
パラメータ
force
number | Point
戻り値
void
の実装
RigidBody.applyForceInOrientation
getAdjacentFaces()
abstractgetAdjacentFaces(collisionNormal):object[]
定義: rigidbody.ts:322
パラメータ
collisionNormal
Point
戻り値
object[]
の実装
getCenter()
getCenter():
Point
定義: rigidbody.ts:122
戻り値
Point
getCollisionAxes()
abstractgetCollisionAxes(relativeBody):Point[]
定義: rigidbody.ts:317
パラメータ
relativeBody
戻り値
Point[]
の実装
getMinMaxProjection()
abstractgetMinMaxProjection(unitvector):object
定義: rigidbody.ts:313
パラメータ
unitvector
Point
戻り値
object
max
max:
number
min
min:
number
の実装
getNormalOfSignificantFace()
abstractgetNormalOfSignificantFace(collisionNormal):Point
定義: rigidbody.ts:321
パラメータ
collisionNormal
Point
戻り値
Point
の実装
RigidBody.getNormalOfSignificantFace
getOrientationAngle()
getOrientationAngle():
number
定義: rigidbody.ts:126
戻り値
number
getSignificantVertices()
abstractgetSignificantVertices(collisionNormal):Point[]
定義: rigidbody.ts:320
パラメータ
collisionNormal
Point
戻り値
Point[]
の実装
RigidBody.getSignificantVertices
isMovingStatic()
isMovingStatic():
boolean
定義: rigidbody.ts:146
戻り値
boolean
の実装
isStatic()
isStatic():
boolean
定義: rigidbody.ts:142
戻り値
boolean
の実装
move()
move(
delta):void
定義: rigidbody.ts:112
パラメータ
delta
Point
戻り値
void
の実装
rotateRadians()
rotateRadians(
angle):void
定義: rigidbody.ts:118
パラメータ
angle
number
戻り値
void
setLinearVelocity()
setLinearVelocity(
linearVelocity):void
定義: rigidbody.ts:150
パラメータ
linearVelocity
Point
戻り値
void
setMovingStatic()
setMovingStatic(
movingStatic):void
定義: rigidbody.ts:154
パラメータ
movingStatic
boolean
戻り値
void
setOrientationAngle()
setOrientationAngle(
angle):void
定義: rigidbody.ts:158
パラメータ
angle
number
戻り値
void
setSleeping()
setSleeping(
sleeping):void
定義: rigidbody.ts:328
パラメータ
sleeping
boolean
戻り値
void
の実装
significantVertex()
abstractsignificantVertex(collisionNormal):Point
定義: rigidbody.ts:319
パラメータ
collisionNormal
Point
戻り値
Point
の実装
step()
step(
deltaTime):void
定義: rigidbody.ts:186
パラメータ
deltaTime
number
戻り値
void
の実装
updateSleeping()
updateSleeping(
deltaTime):void
定義: rigidbody.ts:339
パラメータ
deltaTime
number
戻り値
void