Skip to content

@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 ​

protected angularDampingFactor: number = 0.005

定義: rigidbody.ts:83


collisionFilter ​

collisionFilter: CollisionFilter

定義: rigidbody.ts:86

Collision filtering configuration

の実装 ​

RigidBody.collisionFilter


dynamicFrictionCoeff ​

protected dynamicFrictionCoeff: number = 0.3

定義: rigidbody.ts:80


force ​

protected force: Point

定義: rigidbody.ts:77


frictionEnabled ​

protected frictionEnabled: boolean = false

定義: rigidbody.ts:81


isMovingStaticBody ​

protected isMovingStaticBody: boolean = false

定義: rigidbody.ts:82


isSleeping ​

isSleeping: boolean = false

定義: rigidbody.ts:89

の実装 ​

RigidBody.isSleeping


isStaticBody ​

protected isStaticBody: boolean = false

定義: rigidbody.ts:78


linearAcceleartion ​

protected linearAcceleartion: Point

定義: rigidbody.ts:76


sleepThreshold ​

sleepThreshold: number = 0.01

定義: rigidbody.ts:90

の実装 ​

RigidBody.sleepThreshold


sleepTime ​

sleepTime: number = 0.5

定義: rigidbody.ts:91

の実装 ​

RigidBody.sleepTime


timeAtRest ​

timeAtRest: number = 0

定義: rigidbody.ts:92

の実装 ​

RigidBody.timeAtRest

アクセッサー ​

AABB ​

署名を取得する ​

get abstract AABB(): object

定義: rigidbody.ts:324

Axis-Aligned Bounding Box for broad phase collision

戻り値 ​

object

max ​

max: Point

min ​

min: Point

Axis-Aligned Bounding Box for broad phase collision

の実装 ​

RigidBody.AABB


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)

の実装 ​

RigidBody.angularVelocity


center ​

署名を取得する ​

get center(): Point

定義: rigidbody.ts:290

Center position in world coordinates

戻り値 ​

Point

署名を設定する ​

set center(dest): void

定義: rigidbody.ts:294

Center position in world coordinates

パラメータ ​
dest ​

Point

戻り値 ​

void

Center position in world coordinates

の実装 ​

RigidBody.center


linearVelocity ​

署名を取得する ​

get linearVelocity(): Point

定義: rigidbody.ts:298

Linear velocity (pixels/second)

戻り値 ​

Point

署名を設定する ​

set linearVelocity(dest): void

定義: rigidbody.ts:302

Linear velocity (pixels/second)

パラメータ ​
dest ​

Point

戻り値 ​

void

Linear velocity (pixels/second)

の実装 ​

RigidBody.linearVelocity


mass ​

署名を取得する ​

get mass(): number

定義: rigidbody.ts:306

Mass in arbitrary units (affects force response)

戻り値 ​

number

Mass in arbitrary units (affects force response)

の実装 ​

RigidBody.mass


momentOfInertia ​

署名を取得する ​

get abstract momentOfInertia(): number

定義: rigidbody.ts:318

Moment of inertia (rotational mass)

戻り値 ​

number

Moment of inertia (rotational mass)

の実装 ​

RigidBody.momentOfInertia


orientationAngle ​

署名を取得する ​

get orientationAngle(): number

定義: rigidbody.ts:138

Rotation angle in radians

戻り値 ​

number

Rotation angle in radians

の実装 ​

RigidBody.orientationAngle


staticFrictionCoeff ​

署名を取得する ​

get staticFrictionCoeff(): number

定義: rigidbody.ts:310

Static friction coefficient (0-1)

戻り値 ​

number

署名を設定する ​

set staticFrictionCoeff(coeff): void

定義: rigidbody.ts:314

Static friction coefficient (0-1)

パラメータ ​
coeff ​

number

戻り値 ​

void

Static friction coefficient (0-1)

の実装 ​

RigidBody.staticFrictionCoeff

メソッド ​

applyForce() ​

applyForce(force): void

定義: rigidbody.ts:162

パラメータ ​

force ​

Point

戻り値 ​

void

の実装 ​

RigidBody.applyForce


applyForceInOrientation() ​

applyForceInOrientation(force): void

定義: rigidbody.ts:170

パラメータ ​

force ​

number | Point

戻り値 ​

void

の実装 ​

RigidBody.applyForceInOrientation


getAdjacentFaces() ​

abstract getAdjacentFaces(collisionNormal): object[]

定義: rigidbody.ts:328

パラメータ ​

collisionNormal ​

Point

戻り値 ​

object[]

の実装 ​

RigidBody.getAdjacentFaces


getCenter() ​

getCenter(): Point

定義: rigidbody.ts:122

戻り値 ​

Point


getCollisionAxes() ​

abstract getCollisionAxes(relativeBody): Point[]

定義: rigidbody.ts:323

パラメータ ​

relativeBody ​

RigidBody

戻り値 ​

Point[]

の実装 ​

RigidBody.getCollisionAxes


getMinMaxProjection() ​

abstract getMinMaxProjection(unitvector): object

定義: rigidbody.ts:319

パラメータ ​

unitvector ​

Point

戻り値 ​

object

max ​

max: number

min ​

min: number

の実装 ​

RigidBody.getMinMaxProjection


getNormalOfSignificantFace() ​

abstract getNormalOfSignificantFace(collisionNormal): Point

定義: rigidbody.ts:327

パラメータ ​

collisionNormal ​

Point

戻り値 ​

Point

の実装 ​

RigidBody.getNormalOfSignificantFace


getOrientationAngle() ​

getOrientationAngle(): number

定義: rigidbody.ts:126

戻り値 ​

number


getSignificantVertices() ​

abstract getSignificantVertices(collisionNormal): Point[]

定義: rigidbody.ts:326

パラメータ ​

collisionNormal ​

Point

戻り値 ​

Point[]

の実装 ​

RigidBody.getSignificantVertices


isMovingStatic() ​

isMovingStatic(): boolean

定義: rigidbody.ts:146

戻り値 ​

boolean

の実装 ​

RigidBody.isMovingStatic


isStatic() ​

isStatic(): boolean

定義: rigidbody.ts:142

戻り値 ​

boolean

の実装 ​

RigidBody.isStatic


move() ​

move(delta): void

定義: rigidbody.ts:112

パラメータ ​

delta ​

Point

戻り値 ​

void

の実装 ​

RigidBody.move


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:334

パラメータ ​

sleeping ​

boolean

戻り値 ​

void

の実装 ​

RigidBody.setSleeping


significantVertex() ​

abstract significantVertex(collisionNormal): Point

定義: rigidbody.ts:325

パラメータ ​

collisionNormal ​

Point

戻り値 ​

Point

の実装 ​

RigidBody.significantVertex


step() ​

step(deltaTime): void

定義: rigidbody.ts:186

パラメータ ​

deltaTime ​

number

戻り値 ​

void

の実装 ​

RigidBody.step


updateSleeping() ​

updateSleeping(deltaTime): void

定義: rigidbody.ts:345

パラメータ ​

deltaTime ​

number

戻り値 ​

void

の実装 ​

RigidBody.updateSleeping