RigidBody class

Inheritance

Constructors

RigidBody({Vec3? position, Quat? orientation, List<Shape>? shapes, String? name, RigidBodyType type = RigidBodyType.static, bool allowSleep = true, bool isSleeping = false, bool adjustPosition = true, Vec3? linearVelocity, Vec3? angularVelocity, double? mass, bool isTrigger = false})

Properties

addedToIsland bool
I indicates rigid body whether it has been added to the simulation Island.
getter/setter pair
allowSleep bool
It shows how to sleep rigid body.
getter/setter pair
angularVelocity Vec3
Is the angular velocity.
getter/setter pair
collide ↔ void Function(RigidBody body)?
getter/setter pair
getter/setter pair
fixedRotation bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int
getter/setter pair
initAngularVelocity Vec3
getter/setter pair
initLinearVelocity Vec3
getter/setter pair
initOrientation Quat
getter/setter pair
initPosition Vec3
Initilized parameters
getter/setter pair
inverseInertia Mat33
It is the inverse of the inertia tensor in the world system.
getter/setter pair
inverseLocalInertia Mat33
It is the inverse of the inertia tensor in the initial state.
getter/setter pair
inverseMass double
It is the reciprocal of the mass.
getter/setter pair
invScale double
getter/setter pair
isDynamic bool
I indicates that this rigid body to determine whether it is a rigid body dynamic.
no setter
isKinematic bool
no setter
isStatic bool
I will show this rigid body to determine whether it is a rigid body static.
no setter
isTrigger bool
getter/setter pair
It is the link array of joint that is connected to the rigid body.
getter/setter pair
linearVelocity Vec3
Is the translational velocity.
getter/setter pair
localInertia Mat33
It is the inertia tensor in the initial state.
getter/setter pair
mass double
This is the weight.
getter/setter pair
massInfo MassInfo
getter/setter pair
name String
getter/setter pair
next RigidBody?
getter/setter pair
numContacts int
getter/setter pair
numJoints int
The number of joints that are connected to the rigid body.
getter/setter pair
numShapes int
The number of shapes that are included in the rigid body.
getter/setter pair
orientation Quat
getter/setter pair
parent World?
It is a world that rigid body has been added.
getter/setter pair
position Vec3
getter/setter pair
prev RigidBody?
The maximum number of shapes that can be added to a one rigid.
getter/setter pair
rotation Mat33
It is a rotation matrix representing the orientation.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
getter/setter pair
shapes Shape?
An array of shapes that are included in the rigid body.
getter/setter pair
sleeping bool
I shows rigid body to determine whether it is a sleep state.
getter/setter pair
sleepOrientation Quat
It is a quaternion that represents the attitude of sleep just before.
getter/setter pair
sleepPosition Vec3
It is the world coordinate of the center of gravity in the sleep just before.
getter/setter pair
sleepTime double
This is the time from when the rigid body at rest.
getter/setter pair
tmpInertia Mat33
getter/setter pair
type RigidBodyType
getter/setter pair

Methods

addShape(Shape shape) → void
I'll add a shape to rigid body. If you add a shape, please call the setupMass method to step up to the start of the next. shape shape to Add
applyImpulse(Vec3 position, Vec3 force) → void
applyTorque(Vec3 torque) → void
awake() → void
Awake the rigid body.
override
checkContact(dynamic name) → void
dispose() → void
Dispose of the body
override
getAxis() Vec3
isLonely() bool
Get whether the rigid body has not any connection with others.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
Remove the body
override
removeShape(Shape shape) → void
I will delete the shape from the rigid body. If you delete a shape, please call the setupMass method to step up to the start of the next. shape shape to delete
resetPosition(double x, double y, double z) → void
resetQuaternion(Quat q) → void
resetRotation(double x, double y, double z) → void
rotateInertia(Mat33 rot, Mat33 inertia, Mat33 out) → void
setParent(World world) → void
Set the parent of the body
override
setPosition(Vec3 pos) → void
setQuaternion(Quat q) → void
setRotation(Quat rot) → void
setupInertia(Vec3 tmpV, bool adjustPosition) → void
setupMass([bool adjustPosition = true]) → void
Calulates mass datas(center of gravity, mass, moment inertia, etc...). If the parameter type is set to BODY_STATIC, the rigid body will be fixed to the space. If the parameter adjustPosition is set to true, the shapes' relative positions and the rigid body's position will be adjusted to the center of gravity. type type of rigid body adjustPosition
sleep() → void
Sleep the rigid body.
override
syncShapes() → void
testWakeUp() → void
toString() String
A string representation of this object.
inherited
updatePosition(double timeStep) → void
The time integration of the motion of a rigid body, you can update the information such as the shape. This method is invoked automatically when calling the step of the World, There is no need to call from outside usually.

Operators

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

Static Properties

idCounter int
getter/setter pair