Click or drag to resize
RigidBody Class
A rigid body is the basic dynamic object of the physics world. They are affected by forces, collide with each other, and trigger different events.
Inheritance Hierarchy

Namespace:  GeonBit.Core.Physics
Assembly:  GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class RigidBody : BasicPhysicalBody

The RigidBody type exposes the following members.

Constructors
  NameDescription
Public methodRigidBody
Create the physical entity.
Top
Properties
  NameDescription
Public propertyAngularDamping
Get / set angular damping.
Public propertyAngularFactor
Get / set angular factor.
Public propertyAngularVelocity
Get / set angular velocity.
Public propertyBoundingBox
Get the axis-aligned bounding box of this physical body.
Public propertyCollisionGroup
The collision group this body belongs to. Note: compare bits mask.
(Inherited from BasicPhysicalBody.)
Public propertyCollisionMask
With which collision groups this body will collide? Note: compare bits mask.
(Inherited from BasicPhysicalBody.)
Public propertyEnableSimulation
If false, will not simulate forces on this body and will make it behave like a kinematic body.
(Inherited from BasicPhysicalBody.)
Public propertyFriction
Get / set body friction.
(Inherited from BasicPhysicalBody.)
Public propertyGravity
Set / get body gravity factor.
Public propertyHasCustomGravity
Return true if this body has alternative gravity (instead of default world gravity).
Public propertyInvokeCollisionEvents
If true (default) will invoke collision events. You can turn this off for optimizations.
(Inherited from BasicPhysicalBody.)
Public propertyIsActive
Return if the physical body is currently active.
(Inherited from BasicPhysicalBody.)
Public propertyIsDirty
Get if the physical body currently have any forces on it.
Public propertyIsEthereal
If true, this object will not have a physical body (eg other objects will pass through it), but will still trigger contact events.
(Inherited from BasicPhysicalBody.)
Public propertyIsKinematic
Return if this is a kinematic object.
(Inherited from BasicPhysicalBody.)
Public propertyIsStatic
Return if this is a static object.
(Inherited from BasicPhysicalBody.)
Public propertyLinearDamping
Get / set linear damping.
Public propertyLinearFactor
Get / set linear factor.
Public propertyLinearVelocity
Get / set linear velocity.
Public propertyPosition
Get / set body position.
(Inherited from BasicPhysicalBody.)
Public propertyRestitution
Get / set body restitution.
(Inherited from BasicPhysicalBody.)
Public propertyScale
Get / Set body scale.
(Inherited from BasicPhysicalBody.)
Public propertyShape
Get the collision shape.
(Inherited from BasicPhysicalBody.)
Public propertyWorldTransform
Get world transform from physical body.
(Inherited from BasicPhysicalBody.)
Top
Methods
  NameDescription
Public methodApplyForce(Vector3)
Apply force on the body, from its center.
Public methodApplyForce(Vector3, Vector3)
Apply force on the body, from a given position.
Public methodApplyImpulse(Vector3)
Apply impulse on the body, from its center.
Public methodApplyImpulse(Vector3, Vector3)
Apply impulse on the body, from a given position.
Public methodApplyTorque
Apply torque force on the body.
Public methodCallCollisionEnd
Called when this physical body stop colliding with another body.
(Inherited from BasicPhysicalBody.)
Public methodCallCollisionProcess
Called while this physical body is colliding with another body.
(Inherited from BasicPhysicalBody.)
Public methodCallCollisionStart
Called when this physical body start colliding with another body.
(Inherited from BasicPhysicalBody.)
Public methodClearForces
Clear all forces from the body.
Public methodClearVelocity
Clear current velocity.
Public methodCopyConditionFrom
Copy transformation, forces, velocity etc. from another physical body.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetDamping
Set damping.
Public methodSetMassAndInertia
Update the mass and inertia of this body.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also