Interface IPhysicBody3D
Interface for body of 3D physics.
Inherited Members
Namespace: Evergine.Framework.Physics3D
Assembly: Evergine.Framework.dll
Syntax
public interface IPhysicBody3D : IDisposable
Properties
AnisotropicFriction
Gets or sets the anisotropic friction.
Declaration
Vector3 AnisotropicFriction { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
BodyComponent
Gets or sets the associated body component.
Declaration
PhysicBody3D BodyComponent { get; set; }
Property Value
Type | Description |
---|---|
PhysicBody3D |
CcdMotionThreshold
Gets or sets the CCD motion threshold.
Declaration
float CcdMotionThreshold { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
CCD motion clamping activates for convex objects that exceed a (squared to avoid taking square roots) velocity threshold. By default this threshold is zero, which means this feature is disabled for rigid bodies.
CcdSweptSphereRadius
Gets or sets the CCD swept shere radius.
Declaration
float CcdSweptSphereRadius { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
CCD works on an embedded sphere of radius, make sure this radius is embedded inside the convex objects, preferably smaller.
ColliderShapes
Gets the colliders enumerable.
Declaration
IEnumerable<IColliderShape3D> ColliderShapes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IColliderShape3D> |
CollisionCategories
Gets or sets the collision category bits.
Declaration
CollisionCategory3D CollisionCategories { get; set; }
Property Value
Type | Description |
---|---|
CollisionCategory3D |
CompanionId
Gets or sets the Companion ID.
Declaration
int CompanionId { get; set; }
Property Value
Type | Description |
---|---|
int |
ContactDamping
Gets the contact damping.
Declaration
float ContactDamping { get; }
Property Value
Type | Description |
---|---|
float |
ContactProcessingThreshold
Gets or sets the contact processing threshold.
Declaration
float ContactProcessingThreshold { get; set; }
Property Value
Type | Description |
---|---|
float |
ContactStiffness
Gets the contact stiffness.
Declaration
float ContactStiffness { get; }
Property Value
Type | Description |
---|---|
float |
DeactivationTime
Gets or sets the deactivation time.
Declaration
float DeactivationTime { get; set; }
Property Value
Type | Description |
---|---|
float |
Flags
Gets or sets the static body flags.
Declaration
StaticBody3DFlags Flags { get; set; }
Property Value
Type | Description |
---|---|
StaticBody3DFlags |
Friction
Gets or sets the friction of the rigid body.
Declaration
float Friction { get; set; }
Property Value
Type | Description |
---|---|
float |
HasContactResponse
Gets a value indicating whether has contact response.
Declaration
bool HasContactResponse { get; }
Property Value
Type | Description |
---|---|
bool |
HitFraction
Gets or sets the hit fraction.
Declaration
float HitFraction { get; set; }
Property Value
Type | Description |
---|---|
float |
InternalBody
Gets the internal body.
Declaration
object InternalBody { get; }
Property Value
Type | Description |
---|---|
object |
InterpolationAngularVelocity
Gets or sets the angular velocity interpolated.
Declaration
Vector3 InterpolationAngularVelocity { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
InterpolationLinearVelocity
Gets or sets the linear velocity interpolated.
Declaration
Vector3 InterpolationLinearVelocity { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
InterpolationWorldTransform
Gets or sets the world transform interpolated.
Declaration
Matrix4x4 InterpolationWorldTransform { get; set; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
IsActive
Gets a value indicating whether this body is active.
Declaration
bool IsActive { get; }
Property Value
Type | Description |
---|---|
bool |
IsSensor
Gets or sets a value indicating whether this body collects contact information but never generates a collision response.
Declaration
bool IsSensor { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsStaticObject
Gets a value indicating whether this body is static.
Declaration
bool IsStaticObject { get; }
Property Value
Type | Description |
---|---|
bool |
IslandTag
Gets or sets the island tag.
Declaration
int IslandTag { get; set; }
Property Value
Type | Description |
---|---|
int |
MaskBits
Gets or sets the collision mask bits.
Declaration
CollisionCategory3D MaskBits { get; set; }
Property Value
Type | Description |
---|---|
CollisionCategory3D |
Restitution
Gets or sets the restitution of the rigid body.
Declaration
float Restitution { get; set; }
Property Value
Type | Description |
---|---|
float |
RollingFriction
Gets or sets the rolling friction.
Declaration
float RollingFriction { get; set; }
Property Value
Type | Description |
---|---|
float |
SpinningFriction
Gets or sets the spinning fraction.
Declaration
float SpinningFriction { get; set; }
Property Value
Type | Description |
---|---|
float |
Transform
Gets the wolrd transform of the body.
Declaration
Matrix4x4 Transform { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
Methods
AddColliderShape(IColliderShape3D)
Add collider shape to the body.
Declaration
void AddColliderShape(IColliderShape3D shape)
Parameters
Type | Name | Description |
---|---|---|
IColliderShape3D | shape | The shape. |
GetColliderShapeByIndex(int)
Gets collider shape by index.
Declaration
IColliderShape3D GetColliderShapeByIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index. |
Returns
Type | Description |
---|---|
IColliderShape3D | The collider shape. |
RemoveColliderShape(IColliderShape3D)
Remove collider shape to the body.
Declaration
void RemoveColliderShape(IColliderShape3D shape)
Parameters
Type | Name | Description |
---|---|---|
IColliderShape3D | shape | The shape to remove. |
SetTransform(Vector3, Quaternion, Vector3)
Set the position of the body's origin and rotation. This breaks any contacts and wakes the other bodies. Manipulating a body's transform may cause non-physical behavior.
Declaration
void SetTransform(Vector3 position, Quaternion orientation, Vector3 scale)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | the world position of the body's local origin. |
Quaternion | orientation | the world rotation as a quaternion. |
Vector3 | scale | the world scale. |