Skip to content

@ue-too/dynamics / index / Crescent

類別: Crescent ​

定義於: crescent-fan.ts:14

Static rigid body shaped as a circular arc barrier (outer rail segment). SAT projection logic matches the Python Crescent used in hrphysics-simulation.

參數 ​

Arc center (same as track JSON center)

參數 ​

Arc radius

參數 ​

Signed sweep in radians; normalized internally like Python

參數 ​

Angle from +x to the first arc endpoint (radians)

Extends ​

建構函式 ​

建構函式 ​

new Crescent(center, radius, angleSpan, orientationAngle, mass, isStatic, frictionEnabled): Crescent

定義於: crescent-fan.ts:20

參數 ​

center ​

Point = ...

radius ​

number

angleSpan ​

number

orientationAngle ​

number = 0

mass ​

number = 500

isStatic ​

boolean = true

frictionEnabled ​

boolean = false

回傳 ​

Crescent

覆寫了 ​

BaseRigidBody.constructor

屬性 ​

_angularVelocity ​

protected _angularVelocity: number

定義於: rigidbody.ts:74

繼承自 ​

BaseRigidBody._angularVelocity


_center ​

protected _center: Point

定義於: rigidbody.ts:71

繼承自 ​

BaseRigidBody._center


_linearVelocity ​

protected _linearVelocity: Point

定義於: rigidbody.ts:73

繼承自 ​

BaseRigidBody._linearVelocity


_mass ​

protected _mass: number = 50

定義於: rigidbody.ts:72

繼承自 ​

BaseRigidBody._mass


_orientationAngle ​

protected _orientationAngle: number = 0

定義於: rigidbody.ts:75

繼承自 ​

BaseRigidBody._orientationAngle


_staticFrictionCoeff ​

protected _staticFrictionCoeff: number = 0.3

定義於: rigidbody.ts:79

繼承自 ​

BaseRigidBody._staticFrictionCoeff


angularDampingFactor ​

protected angularDampingFactor: number = 0.005

定義於: rigidbody.ts:83

繼承自 ​

BaseRigidBody.angularDampingFactor


collisionFilter ​

collisionFilter: CollisionFilter

定義於: rigidbody.ts:86

Collision filtering configuration

繼承自 ​

BaseRigidBody.collisionFilter


dynamicFrictionCoeff ​

protected dynamicFrictionCoeff: number = 0.3

定義於: rigidbody.ts:80

繼承自 ​

BaseRigidBody.dynamicFrictionCoeff


force ​

protected force: Point

定義於: rigidbody.ts:77

繼承自 ​

BaseRigidBody.force


frictionEnabled ​

protected frictionEnabled: boolean = false

定義於: rigidbody.ts:81

繼承自 ​

BaseRigidBody.frictionEnabled


isMovingStaticBody ​

protected isMovingStaticBody: boolean = false

定義於: rigidbody.ts:82

繼承自 ​

BaseRigidBody.isMovingStaticBody


isSleeping ​

isSleeping: boolean = false

定義於: rigidbody.ts:89

繼承自 ​

BaseRigidBody.isSleeping


isStaticBody ​

protected isStaticBody: boolean = false

定義於: rigidbody.ts:78

繼承自 ​

BaseRigidBody.isStaticBody


linearAcceleartion ​

protected linearAcceleartion: Point

定義於: rigidbody.ts:76

繼承自 ​

BaseRigidBody.linearAcceleartion


sleepThreshold ​

sleepThreshold: number = 0.01

定義於: rigidbody.ts:90

繼承自 ​

BaseRigidBody.sleepThreshold


sleepTime ​

sleepTime: number = 0.5

定義於: rigidbody.ts:91

繼承自 ​

BaseRigidBody.sleepTime


timeAtRest ​

timeAtRest: number = 0

定義於: rigidbody.ts:92

繼承自 ​

BaseRigidBody.timeAtRest

存取器 ​

AABB ​

Getter 簽章 ​

get AABB(): object

定義於: crescent-fan.ts:119

Axis-Aligned Bounding Box for broad phase collision

回傳 ​

object

max ​

max: Point

min ​

min: Point

Axis-Aligned Bounding Box for broad phase collision

覆寫了 ​

BaseRigidBody.AABB


angularVelocity ​

Getter 簽章 ​

get angularVelocity(): number

定義於: rigidbody.ts:130

Angular velocity (radians/second)

回傳 ​

number

Setter 簽章 ​

set angularVelocity(angularVelocity): void

定義於: rigidbody.ts:134

Angular velocity (radians/second)

參數 ​
angularVelocity ​

number

回傳 ​

void

Angular velocity (radians/second)

繼承自 ​

BaseRigidBody.angularVelocity


center ​

Getter 簽章 ​

get center(): Point

定義於: rigidbody.ts:290

Center position in world coordinates

回傳 ​

Point

Setter 簽章 ​

set center(dest): void

定義於: rigidbody.ts:294

Center position in world coordinates

參數 ​
dest ​

Point

回傳 ​

void

Center position in world coordinates

繼承自 ​

BaseRigidBody.center


linearVelocity ​

Getter 簽章 ​

get linearVelocity(): Point

定義於: rigidbody.ts:298

Linear velocity (pixels/second)

回傳 ​

Point

Setter 簽章 ​

set linearVelocity(dest): void

定義於: rigidbody.ts:302

Linear velocity (pixels/second)

參數 ​
dest ​

Point

回傳 ​

void

Linear velocity (pixels/second)

繼承自 ​

BaseRigidBody.linearVelocity


mass ​

Getter 簽章 ​

get mass(): number

定義於: rigidbody.ts:306

Mass in arbitrary units (affects force response)

回傳 ​

number

Mass in arbitrary units (affects force response)

繼承自 ​

BaseRigidBody.mass


momentOfInertia ​

Getter 簽章 ​

get momentOfInertia(): number

定義於: crescent-fan.ts:66

Moment of inertia (rotational mass)

回傳 ​

number

Moment of inertia (rotational mass)

覆寫了 ​

BaseRigidBody.momentOfInertia


orientationAngle ​

Getter 簽章 ​

get orientationAngle(): number

定義於: rigidbody.ts:138

Rotation angle in radians

回傳 ​

number

Rotation angle in radians

繼承自 ​

BaseRigidBody.orientationAngle


staticFrictionCoeff ​

Getter 簽章 ​

get staticFrictionCoeff(): number

定義於: rigidbody.ts:310

Static friction coefficient (0-1)

回傳 ​

number

Setter 簽章 ​

set staticFrictionCoeff(coeff): void

定義於: rigidbody.ts:314

Static friction coefficient (0-1)

參數 ​
coeff ​

number

回傳 ​

void

Static friction coefficient (0-1)

繼承自 ​

BaseRigidBody.staticFrictionCoeff

方法 ​

applyForce() ​

applyForce(force): void

定義於: rigidbody.ts:162

參數 ​

force ​

Point

回傳 ​

void

繼承自 ​

BaseRigidBody.applyForce


applyForceInOrientation() ​

applyForceInOrientation(force): void

定義於: rigidbody.ts:170

參數 ​

force ​

number | Point

回傳 ​

void

繼承自 ​

BaseRigidBody.applyForceInOrientation


getAdjacentFaces() ​

getAdjacentFaces(_collisionNormal): object[]

定義於: crescent-fan.ts:159

參數 ​

_collisionNormal ​

Point

回傳 ​

object[]

覆寫了 ​

BaseRigidBody.getAdjacentFaces


getCenter() ​

getCenter(): Point

定義於: rigidbody.ts:122

回傳 ​

Point

繼承自 ​

BaseRigidBody.getCenter


getCollisionAxes() ​

getCollisionAxes(relativeBody): Point[]

定義於: crescent-fan.ts:106

參數 ​

relativeBody ​

RigidBody

回傳 ​

Point[]

覆寫了 ​

BaseRigidBody.getCollisionAxes


getMinMaxProjection() ​

getMinMaxProjection(unitvector): object

定義於: crescent-fan.ts:70

參數 ​

unitvector ​

Point

回傳 ​

object

max ​

max: number

min ​

min: number

覆寫了 ​

BaseRigidBody.getMinMaxProjection


getNormalOfSignificantFace() ​

getNormalOfSignificantFace(collisionNormal): Point

定義於: crescent-fan.ts:155

參數 ​

collisionNormal ​

Point

回傳 ​

Point

覆寫了 ​

BaseRigidBody.getNormalOfSignificantFace


getOrientationAngle() ​

getOrientationAngle(): number

定義於: rigidbody.ts:126

回傳 ​

number

繼承自 ​

BaseRigidBody.getOrientationAngle


getSignificantVertices() ​

getSignificantVertices(collisionNormal): Point[]

定義於: crescent-fan.ts:151

參數 ​

collisionNormal ​

Point

回傳 ​

Point[]

覆寫了 ​

BaseRigidBody.getSignificantVertices


isMovingStatic() ​

isMovingStatic(): boolean

定義於: rigidbody.ts:146

回傳 ​

boolean

繼承自 ​

BaseRigidBody.isMovingStatic


isStatic() ​

isStatic(): boolean

定義於: rigidbody.ts:142

回傳 ​

boolean

繼承自 ​

BaseRigidBody.isStatic


move() ​

move(delta): void

定義於: crescent-fan.ts:61

參數 ​

delta ​

Point

回傳 ​

void

覆寫了 ​

BaseRigidBody.move


rotateRadians() ​

rotateRadians(angle): void

定義於: rigidbody.ts:118

參數 ​

angle ​

number

回傳 ​

void

繼承自 ​

BaseRigidBody.rotateRadians


setLinearVelocity() ​

setLinearVelocity(linearVelocity): void

定義於: rigidbody.ts:150

參數 ​

linearVelocity ​

Point

回傳 ​

void

繼承自 ​

BaseRigidBody.setLinearVelocity


setMovingStatic() ​

setMovingStatic(movingStatic): void

定義於: rigidbody.ts:154

參數 ​

movingStatic ​

boolean

回傳 ​

void

繼承自 ​

BaseRigidBody.setMovingStatic


setOrientationAngle() ​

setOrientationAngle(angle): void

定義於: rigidbody.ts:158

參數 ​

angle ​

number

回傳 ​

void

繼承自 ​

BaseRigidBody.setOrientationAngle


setSleeping() ​

setSleeping(sleeping): void

定義於: rigidbody.ts:334

參數 ​

sleeping ​

boolean

回傳 ​

void

繼承自 ​

BaseRigidBody.setSleeping


significantVertex() ​

significantVertex(collisionNormal): Point

定義於: crescent-fan.ts:137

參數 ​

collisionNormal ​

Point

回傳 ​

Point

覆寫了 ​

BaseRigidBody.significantVertex


step() ​

step(deltaTime): void

定義於: crescent-fan.ts:52

參數 ​

deltaTime ​

number

回傳 ​

void

覆寫了 ​

BaseRigidBody.step


updateSleeping() ​

updateSleeping(deltaTime): void

定義於: rigidbody.ts:345

參數 ​

deltaTime ​

number

回傳 ​

void

繼承自 ​

BaseRigidBody.updateSleeping