Search Results for

    Show / Hide Table of Contents

    Class RigidBody3D

    RigidBody3D enable your entities to act under the control of physics. The Rigidbody can receive forces and torque to make your objects move in a realistic way. Any entity must contain a Rigidbody to be influenced by gravity, act under added forces or interact with other objects through physics engine.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Behavior
    PhysicBody3D
    PhysicBody3D<IRigidBody3D, RigidBodyDef3D>
    RigidBody3D
    Implements
    IDependencyObject
    Inherited Members
    PhysicBody3D<IRigidBody3D, RigidBodyDef3D>.InternalBody
    PhysicBody3D.Transform3D
    PhysicBody3D.BeginCollision
    PhysicBody3D.EndCollision
    PhysicBody3D.UpdateCollision
    PhysicBody3D.ProcessCollision
    PhysicBody3D.InternalBody
    PhysicBody3D.ColliderList
    PhysicBody3D.IsSensor
    PhysicBody3D.Friction
    PhysicBody3D.Restitution
    PhysicBody3D.RollingFriction
    PhysicBody3D.CcdMotionThreshold
    PhysicBody3D.CcdSweptSphereRadius
    PhysicBody3D.CollisionCategories
    PhysicBody3D.MaskBits
    PhysicBody3D.WorldToLocalPosition(Vector3)
    PhysicBody3D.WorldToLocalPosition(ref Vector3, out Vector3)
    PhysicBody3D.ContactTest(ICollection<ContactPoint3D>)
    PhysicBody3D.ContactPairTest(PhysicBody3D, ICollection<ContactPoint3D>)
    PhysicBody3D.ContactPairTest(Collider3D, PhysicBody3D, Collider3D, ICollection<ContactPoint3D>)
    PhysicBody3D.ResetTransform(Vector3, Quaternion, Vector3)
    PhysicBody3D.PointTest(Vector3)
    Behavior.Family
    Behavior.UpdateOrder
    Component.Owner
    Component.Managers
    Component.Clone()
    Component.Attach(Entity)
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.Framework.Physics3D
    Assembly: Evergine.Framework.dll
    Syntax
    public sealed class RigidBody3D : PhysicBody3D<IRigidBody3D, RigidBodyDef3D>, IDependencyObject

    Constructors

    RigidBody3D()

    Initializes a new instance of the RigidBody3D class.

    Declaration
    public RigidBody3D()

    Properties

    AngularDamping

    Gets or sets the angular Damping.

    Declaration
    [RenderProperty(Tooltip = "Angular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.")]
    public float AngularDamping { get; set; }
    Property Value
    Type Description
    float

    The angular damping.

    Remarks

    The Angular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.

    AngularFactor

    Gets or sets a value indicating whether [fixed rotation].

    Declaration
    [RenderProperty(Tooltip = "Should this body be prevented from rotating? Useful for characters.")]
    public Vector3 AngularFactor { get; set; }
    Property Value
    Type Description
    Vector3

    true if [fixed rotation]; otherwise, false.

    AngularVelocity

    Gets or sets the angular velocity of the physics entity.

    Declaration
    [RenderProperty(Tooltip = "The angular velocity of the body.")]
    public Vector3 AngularVelocity { get; set; }
    Property Value
    Type Description
    Vector3

    The angular velocity.

    Gravity

    Gets or sets the gravity applied to this body.

    Declaration
    [RenderProperty(AttachToTag = 1, AttachToValue = true, Tooltip = "Scale the gravity applied to this body.")]
    public Vector3 Gravity { get; set; }
    Property Value
    Type Description
    Vector3

    LinearDamping

    Gets or sets the linear damping.

    Declaration
    [RenderProperty(Tooltip = "Linear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.")]
    public float LinearDamping { get; set; }
    Property Value
    Type Description
    float

    The linear damping.

    Remarks

    Linear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.

    LinearFactor

    Gets or sets a value indicating whether [fixed rotation].

    Declaration
    [RenderProperty(Tooltip = "Should this body be prevented from rotating? Useful for characters.")]
    public Vector3 LinearFactor { get; set; }
    Property Value
    Type Description
    Vector3

    true if [fixed rotation]; otherwise, false.

    LinearVelocity

    Gets or sets the linear velocity of the physics entity.

    Declaration
    [RenderProperty(Tooltip = "The linear velocity of the body's origin in world co-ordinates.")]
    public Vector3 LinearVelocity { get; set; }
    Property Value
    Type Description
    Vector3

    The linear velocity.

    LocalInertia

    Gets the rotational inertia of the body about the local origin.

    Declaration
    public Vector3 LocalInertia { get; }
    Property Value
    Type Description
    Vector3

    Mass

    Gets or sets the total mass of the body.

    Declaration
    public float Mass { get; set; }
    Property Value
    Type Description
    float

    OverrideGravity

    Gets or sets a value indicating whether the gravity is overrided.

    Declaration
    [RenderProperty(Tag = 1, Tooltip = "Scale the gravity applied to this body.")]
    public bool OverrideGravity { get; set; }
    Property Value
    Type Description
    bool

    PhysicBodyType

    Gets or sets the type of the physic body.

    Declaration
    [RenderProperty(Tooltip = "The body type: static, kinematic, or dynamic. Note: if a dynamic body would have zero mass, the mass is set to one.")]
    public RigidBodyType3D PhysicBodyType { get; set; }
    Property Value
    Type Description
    RigidBodyType3D

    The type of the physic body.

    Methods

    ApplyForce(Vector3)

    Apply a central force to the rigid body.

    Declaration
    public void ApplyForce(Vector3 force)
    Parameters
    Type Name Description
    Vector3 force

    The force.

    ApplyForceAtPosition(Vector3, Vector3)

    Apply a force to the rigid body.

    Declaration
    public void ApplyForceAtPosition(Vector3 force, Vector3 position)
    Parameters
    Type Name Description
    Vector3 force

    The force vector in world coordinates.

    Vector3 position

    Position in world coordinates.

    ApplyImpulse(Vector3)

    Apply an impulse to the center of the rigid body.

    Declaration
    public void ApplyImpulse(Vector3 impulse)
    Parameters
    Type Name Description
    Vector3 impulse

    The impulse in world coordinates.

    ApplyImpulseAtPosition(Vector3, Vector3)

    Apply an impulse to the rigid body.

    Declaration
    public void ApplyImpulseAtPosition(Vector3 impulse, Vector3 position)
    Parameters
    Type Name Description
    Vector3 impulse

    The impulse in world coordinates.

    Vector3 position

    Position in world coordinates.

    ApplyTorque(Vector3)

    Apply a torque force to the rigid body.

    Declaration
    public void ApplyTorque(Vector3 torque)
    Parameters
    Type Name Description
    Vector3 torque

    The torque.

    ApplyTorqueImpulse(Vector3)

    Apply torque impulse to the rigid body.

    Declaration
    public void ApplyTorqueImpulse(Vector3 torque)
    Parameters
    Type Name Description
    Vector3 torque

    The torque impulse.

    ClearForces()

    Clear all forces applied to the rigid body.

    Declaration
    public void ClearForces()

    Update(TimeSpan)

    Allows this instance to execute custom logic during its Update.

    Declaration
    protected override void Update(TimeSpan gameTime)
    Parameters
    Type Name Description
    TimeSpan gameTime

    The game time.

    Overrides
    PhysicBody3D.Update(TimeSpan)
    Remarks

    This method will not be executed if the Component, or the Entity owning it are not Active.

    WakeUp()

    Wake up the rigid body.

    Declaration
    public void WakeUp()

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In This Article
    Back to top
    Generated by DocFX