BodyResources class

Constructors

BodyResources(Pointer<cpBody> _body)

Properties

hashCode int
The hash code for this object.
no setterinherited
isExist bool
no setter
isSleeping bool
no setter
kineticEnergy double
no setter
p ↔ Vector2
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sleeping Sleeping
no setter
toPointer Pointer<cpBody>
no setter
transform → Matrix4
no setter
v ↔ Vector2
getter/setter pair

Methods

activate() → void
activateStatic(Shape filter) → void
applyForceAtLocalPoint({required Vector2 force, required Vector2 point}) → void
applyForceAtWorldPoint({required Vector2 force, required Vector2 point}) → void
applyImpulseAtLocalPoint({required Vector2 impulse, required Vector2 point}) → void
applyImpulseAtWorldPoint({required Vector2 impulse, required Vector2 point}) → void
destroy() → void
eachArbiter(void arbiterFunc(Body body, Arbiter arbiter)) → void
eachConstraint(void constraintFunc(Body body, Constraint constraint)) → void
eachShape(void shapeFunc(Body body, Shape shape)) → void
getAngle() double
getAngularVelocity() double
getCenterOfGravity() → Vector2
getForce() → Vector2
getMass() double
getMoment() double
getPosition() → Vector2
getRotation() → Vector2
getSpace() Space
getTorque() double
getType() BodyType
getVelocity() → Vector2
getVelocityAtLocalPoint(dynamic body) → Vector2
getVelocityAtWorldPoint({required Vector2 point}) → Vector2
localToWorld(Vector2 point) → Vector2
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAngle(double a) → void
setAngularVelocity(double angularVelocity) → void
setCenterOfGravity(Vector2 cog) → void
setForce(Vector2 force) → void
setMass(double m) → void
setMoment(double i) → void
setPosition({required Vector2 pos}) → void
setPositionUpdateFunc(void positionFunc(Body body, double dt)) → void
setTorque(double torque) → void
setType(BodyType type) → void
setVelocity({required Vector2 vel}) → void
setVelocityUpdateFunc(void velocityFunc(Body body, Vector2 gravity, double damping, double dt)) → void
sleep() → void
sleepWithGroup(Body body) → void
toString() String
A string representation of this object.
inherited
updatePosition(double dt) → void
updateVelocity({required Vector2 gravity, required double damping, required double dt}) → void
worldToLocal(Vector2 point) → Vector2

Operators

operator ==(Object other) bool
The equality operator.
inherited