Struct nphysics3d::object::RigidBody[][src]

pub struct RigidBody<N: RealField + Copy> { /* fields omitted */ }
Expand description

A rigid body.

Implementations

Retrieves a reference to the user-defined user-data attached to this object.

Retrieves a mutable reference to the user-defined user-data attached to this object.

Sets the user-defined data attached to this object.

Replace by None the user-defined data attached to this object and returns the old value.

Check if linear motion interpolation is enabled for CCD.

If this is disabled, non-linear interpolation will be used.

Enable linear motion interpolation for CCD.

If this is disabled, non-linear interpolation will be used.

Mark some translational degrees of freedom as kinematic.

Mark some rotational degrees of freedom as kinematic.

Flags indicating which translational degrees of freedoms are kinematic.

Flags indicating which rotational degrees of freedoms are kinematic.

Disable all rotations of this rigid body.

This is the same as setting all the rotations of this rigid body as kinematic and setting its angular velocity to zero. The rotations will still be controllable at the velocity level by the user afterwards.

Enable all rotations for this rigid body.

This is the same as setting all the rotations of this rigid body as non-kinematic.

Disable all translations of this rigid body.

This is the same as setting all the translations of this rigid body as kinematic and setting its linear velocity to zero. The translations will still be controllable at the velocity level by the user afterwards.

Enable all translations for this rigid body.

This is the same as setting all the translations of this rigid body as non-kinematic.

Sets the linear damping coefficient of this rigid body.

Linear damping will make the rigid body loose linear velocity automatically velocity at each timestep. There is no damping by default.

The linear damping coefficient of this rigid body.

Sets the angular damping coefficient of this rigid body.

Angular damping will make the rigid body loose angular velocity automatically velocity at each timestep. There is no damping by default.

The angular damping coefficient of this rigid body.

Caps the linear velocity of this rigid body to the given maximum.

This will prevent a rigid body from having a linear velocity with magnitude greater than max_vel.

The maximum allowed linear velocity of this rigid body.

Caps the angular velocity of this rigid body to the given maximum.

This will prevent a rigid body from having a angular velocity with magnitude greater than max_vel.

The maximum allowed angular velocity of this rigid body.

Mutable information regarding activation and deactivation (sleeping) of this rigid body.

Set the center of mass of this rigid body, expressed in its local space.

Set the local inertia of this rigid body, expressed in its local space.

Set the mass of this rigid body.

Set the angular inertia of this rigid body, expressed in its local space.

Sets the position of this rigid body.

Set the velocity of this rigid body.

Set the linear velocity of this rigid body.

Set the angular velocity of this rigid body.

The augmented mass (inluding gyroscropic terms) in world-space of this rigid body.

The inverse augmented mass (inluding gyroscropic terms) in world-space of this rigid body.

The position of this rigid body.

The velocity of this rigid body.

Trait Implementations

Information regarding activation and deactivation (sleeping) of this body.

Force the activation of this body with the given level of energy.

Put this body to sleep.

Sets the energy bellow which this body is put to sleep. Read more

The flags tracking what modifications were applied to a body.

The status of this body.

Set the status of this body.

If this is a deformable body, returns its deformed positions.

If this is a deformable body, returns a mutable reference to its deformed positions.

The companion ID of this body.

Set the companion ID of this body (may be reinitialized by nphysics).

The number of degrees of freedom of this body.

The generalized velocities of this body.

The mutable generalized velocities of this body.

The generalized accelerations at each degree of freedom of this body.

Integrate the position of this body.

Reset the timestep-specific dynamic information of this body.

Clear all the update flags of this body.

Updates the kinematics, e.g., positions and jacobians, of this body.

Update the dynamics property of this body.

Update the acceleration of this body given the forces it is subject to and the gravity.

The number of parts of this body.

A reference to the specified body part.

Applies a generalized displacement to this body.

Transform the given point expressed in material coordinates to world-space.

Transform the given point expressed in material coordinates to world-space.

Transform the given point expressed in material coordinates to world-space.

Whether this body is affected by gravity.

Enable or disable gravity for this body.

Gets the velocity of the given point of this body.

Fills all the jacobians (and the jacobians multiplied by the inverse augmented mass matrix) for a constraint applying a force at the point center (relative to the body part’s center of mass) and the direction dir. Read more

Returns true if this bodies contains internal constraints that need to be solved.

Initializes the internal velocity constraints of a body.

For warmstarting the solver, modifies the delta velocity applied by the internal constraints of this body.

Execute one step for the iterative resolution of this body’s internal velocity constraints.

Execute one step for the iterative resolution of this body’s internal position constraints.

Add the given inertia to the local inertia of this body part.

Apply a force at the center of mass of a part of this body.

Apply a local force at the center of mass of a part of this body.

Apply a force at a given point of a part of this body.

Apply a local force at a given point of a part of this body.

Apply a force at a given local point of a part of this body.

Apply a local force at a given local point of a part of this body.

Returns true if this body is the ground.

Update whether this body needs to be waken up after a user-interaction.

The number of degrees of freedom (DOF) of this body, taking its status into account. Read more

The velocity of the specified body part, taking this body status into account. Read more

Check if this body is active.

Whether or not the status of this body is dynamic.

Whether or not the status of this body is kinematic.

Whether or not the status of this body is static.

Force the activation of this body.

Returns true if this body part is the ground.

The velocity of this body part.

The position of this body part wrt. the ground.

If CCD is enabled, this is the last position known to be tunnelling-free.

The local-space inertia of this body part.

The world-space inertia of this body part.

The center of mass of this body part.

The local center of mass of this body part.

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.