Skip to content

@ue-too/dynamics / index / VisaulCircleBody

クラス: VisaulCircleBody ​

定義: rigidbody.ts:365

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 VisaulCircleBody(center, radius, drawingContext, _orientationAngle, mass, isStatic, frictionEnabled): VisaulCircleBody

定義: rigidbody.ts:378

パラメータ ​

center ​

Point = ...

radius ​

number

drawingContext ​

CanvasRenderingContext2D

_orientationAngle ​

number = 0

mass ​

number = 50

isStatic ​

boolean = false

frictionEnabled ​

boolean = true

戻り値 ​

VisaulCircleBody

プロパティ ​

collisionFilter ​

collisionFilter: CollisionFilter

定義: rigidbody.ts:370

Collision filtering configuration

の実装 ​

RigidBody.collisionFilter


isSleeping ​

isSleeping: boolean = false

定義: rigidbody.ts:373

の実装 ​

RigidBody.isSleeping


sleepThreshold ​

sleepThreshold: number = 0.01

定義: rigidbody.ts:374

の実装 ​

RigidBody.sleepThreshold


sleepTime ​

sleepTime: number = 0.5

定義: rigidbody.ts:375

の実装 ​

RigidBody.sleepTime


timeAtRest ​

timeAtRest: number = 0

定義: rigidbody.ts:376

の実装 ​

RigidBody.timeAtRest

アクセッサー ​

AABB ​

署名を取得する ​

get AABB(): object

定義: rigidbody.ts:435

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

Angular velocity (radians/second)

戻り値 ​

number

署名を設定する ​

set angularVelocity(angularVelocity): void

定義: rigidbody.ts:479

Angular velocity (radians/second)

パラメータ ​
angularVelocity ​

number

戻り値 ​

void

Angular velocity (radians/second)

の実装 ​

RigidBody.angularVelocity


center ​

署名を取得する ​

get center(): Point

定義: rigidbody.ts:455

Center position in world coordinates

戻り値 ​

Point

署名を設定する ​

set center(dest): void

定義: rigidbody.ts:459

Center position in world coordinates

パラメータ ​
dest ​

Point

戻り値 ​

void

Center position in world coordinates

の実装 ​

RigidBody.center


linearVelocity ​

署名を取得する ​

get linearVelocity(): Point

定義: rigidbody.ts:463

Linear velocity (pixels/second)

戻り値 ​

Point

署名を設定する ​

set linearVelocity(dest): void

定義: rigidbody.ts:467

Linear velocity (pixels/second)

パラメータ ​
dest ​

Point

戻り値 ​

void

Linear velocity (pixels/second)

の実装 ​

RigidBody.linearVelocity


mass ​

署名を取得する ​

get mass(): number

定義: rigidbody.ts:487

Mass in arbitrary units (affects force response)

戻り値 ​

number

Mass in arbitrary units (affects force response)

の実装 ​

RigidBody.mass


momentOfInertia ​

署名を取得する ​

get momentOfInertia(): number

定義: rigidbody.ts:510

Moment of inertia (rotational mass)

戻り値 ​

number

Moment of inertia (rotational mass)

の実装 ​

RigidBody.momentOfInertia


orientationAngle ​

署名を取得する ​

get orientationAngle(): number

定義: rigidbody.ts:471

Rotation angle in radians

戻り値 ​

number

Rotation angle in radians

の実装 ​

RigidBody.orientationAngle


staticFrictionCoeff ​

署名を取得する ​

get staticFrictionCoeff(): number

定義: rigidbody.ts:495

Static friction coefficient (0-1)

戻り値 ​

number

署名を設定する ​

set staticFrictionCoeff(coeff): void

定義: rigidbody.ts:499

Static friction coefficient (0-1)

パラメータ ​
coeff ​

number

戻り値 ​

void

Static friction coefficient (0-1)

の実装 ​

RigidBody.staticFrictionCoeff

メソッド ​

applyForce() ​

applyForce(force): void

定義: rigidbody.ts:431

パラメータ ​

force ​

Point

戻り値 ​

void

の実装 ​

RigidBody.applyForce


applyForceInOrientation() ​

applyForceInOrientation(force): void

定義: rigidbody.ts:443

パラメータ ​

force ​

Point

戻り値 ​

void

の実装 ​

RigidBody.applyForceInOrientation


draw() ​

draw(ctx): void

定義: rigidbody.ts:398

パラメータ ​

ctx ​

CanvasRenderingContext2D

戻り値 ​

void

の実装 ​

VisualComponent.draw


getAdjacentFaces() ​

getAdjacentFaces(collisionNormal): object[]

定義: rigidbody.ts:503

パラメータ ​

collisionNormal ​

Point

戻り値 ​

object[]

の実装 ​

RigidBody.getAdjacentFaces


getCollisionAxes() ​

getCollisionAxes(relativeBody): Point[]

定義: rigidbody.ts:427

パラメータ ​

relativeBody ​

RigidBody

戻り値 ​

Point[]

の実装 ​

RigidBody.getCollisionAxes


getMass() ​

getMass(): number

定義: rigidbody.ts:439

戻り値 ​

number


getMinMaxProjection() ​

getMinMaxProjection(unitvector): object

定義: rigidbody.ts:423

パラメータ ​

unitvector ​

Point

戻り値 ​

object

max ​

max: number

min ​

min: number

の実装 ​

RigidBody.getMinMaxProjection


getNormalOfSignificantFace() ​

getNormalOfSignificantFace(collisionNormal): Point

定義: rigidbody.ts:491

パラメータ ​

collisionNormal ​

Point

戻り値 ​

Point

の実装 ​

RigidBody.getNormalOfSignificantFace


getSignificantVertices() ​

getSignificantVertices(collisionNormal): Point[]

定義: rigidbody.ts:451

パラメータ ​

collisionNormal ​

Point

戻り値 ​

Point[]

の実装 ​

RigidBody.getSignificantVertices


isMovingStatic() ​

isMovingStatic(): boolean

定義: rigidbody.ts:419

戻り値 ​

boolean

の実装 ​

RigidBody.isMovingStatic


isStatic() ​

isStatic(): boolean

定義: rigidbody.ts:415

戻り値 ​

boolean

の実装 ​

RigidBody.isStatic


move() ​

move(delta): void

定義: rigidbody.ts:447

パラメータ ​

delta ​

Point

戻り値 ​

void

の実装 ​

RigidBody.move


setSleeping() ​

setSleeping(sleeping): void

定義: rigidbody.ts:515

パラメータ ​

sleeping ​

boolean

戻り値 ​

void

の実装 ​

RigidBody.setSleeping


significantVertex() ​

significantVertex(collisionNormal): Point

定義: rigidbody.ts:475

パラメータ ​

collisionNormal ​

Point

戻り値 ​

Point

の実装 ​

RigidBody.significantVertex


step() ​

step(deltaTime): void

定義: rigidbody.ts:410

パラメータ ​

deltaTime ​

number

戻り値 ​

void

の実装 ​

RigidBody.step


updateSleeping() ​

updateSleeping(deltaTime): void

定義: rigidbody.ts:526

パラメータ ​

deltaTime ​

number

戻り値 ​

void

の実装 ​

RigidBody.updateSleeping