Angulos
Loading...
Searching...
No Matches
Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent Class Reference

A component that represents a rigid body in the physics engine. More...

Inheritance diagram for Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent:
Angulos._3d.Components.IAngulosComponent Angulos._3d.Components.PhysicsComponents.ICompoundCollideable Angulos._3d.Components.IAngulosComponent

Public Member Functions

 PhysicsRigidBodyComponent (SimulatedObject parent)
void Destroy ()
 Permanently remove the component/clean up.
void Disable ()
 Pause the work.
bool PointInTriangle (Vector3 point, Triangle3D tri)
 Essentially copied from https://blackpawn.com/texts/pointinpoly/default.html.
void TickCall ()
 Called every frame.
void HandleCollision (PhysicsCollisionData? pcd, bool CalledFromCollided)
void Start ()
 Start the work.
void UpdateCall ()
 Called every [UpdateTiming] frames.
void ParentMeshUpdate ()
 Called when a the parent mesh changes.
Public Member Functions inherited from Angulos._3d.Components.IAngulosComponent
void FrameIndependentUpdate ()
 Called every [FrameIndependentUpdateTiming] units of time. Will be constant, even if a the renderer is frozen. This should not be overused.
Public Member Functions inherited from Angulos._3d.Components.PhysicsComponents.ICompoundCollideable
void HandleCollision (PhysicsCollisionData pcd, bool CalledFromCollided)
 Handles a collision. Normally this moves the object when called in some way.

Static Public Member Functions

static Vector3 QuaternionAsVector3 (Quaternion q)
static float VolumeFromDensityAndMesh (Mesh mesh, Vector3 scale, out Vector3 centerOfMass)

Public Attributes

Stopwatch ActualElapsed
 The actual elapsed time since the start of physics calculation. This is necessary to run the physics the correct number of times, instead of being based on FPS.
long ElapsedMilis
 The number of milliseconds elapsed since the component started.
long CalculatedTime
 The number of milliseconds that the component has accounted for for physics calculation.
float TimeMultiplier
Vector3 CenterOfMass
float MaxDistanceFromCenter = 0
float Volume = 0
Movement Movement

Properties

ushort calls [get, set]
 See IAngulosComponent.calls.
bool Working [get, set]
 See If the rigid body is being simulated.
ushort UpdateTiming [get, set]
 The timing of updates in frames. Update() gets called every [UpdateTiming] frames. See IAngulosComponent.UpdateTiming.
int TargetDT [get, set]
int TicksPerSecond [get, set]
 The number of ticks per second.
float Density = 1.0f [get, set]
float Mass [get, set]
MeshOverrideColliderMesh [get, set]
SimulatedObject Parent [get, set]
 The parent object of the component.
bool HasBeenInitialized [get, set]
 If the component has been initialized. If false, the ECS will call Start() on the component.
bool EnableFrameIndependentUpdate = false [get, set]
 If frame independant updates should be performed. This should only be used for time-sensitive components like animation.

Detailed Description

A component that represents a rigid body in the physics engine.

Member Function Documentation

◆ Destroy()

void Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.Destroy ( )
inline

Permanently remove the component/clean up.

Implements Angulos._3d.Components.IAngulosComponent.

◆ Disable()

void Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.Disable ( )
inline

Pause the work.

Implements Angulos._3d.Components.IAngulosComponent.

◆ ParentMeshUpdate()

void Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.ParentMeshUpdate ( )
inline

Called when a the parent mesh changes.

Implements Angulos._3d.Components.IAngulosComponent.

◆ PointInTriangle()

bool Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.PointInTriangle ( Vector3 point,
Triangle3D tri )
inline

Essentially copied from https://blackpawn.com/texts/pointinpoly/default.html.

Parameters
p
tri
Returns

◆ Start()

void Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.Start ( )
inline

Start the work.

Implements Angulos._3d.Components.IAngulosComponent.

◆ TickCall()

void Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.TickCall ( )
inline

Called every frame.

Implements Angulos._3d.Components.IAngulosComponent.

◆ UpdateCall()

void Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.UpdateCall ( )
inline

Called every [UpdateTiming] frames.

Implements Angulos._3d.Components.IAngulosComponent.

Property Documentation

◆ calls

ushort Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.calls
getset

◆ EnableFrameIndependentUpdate

bool Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.EnableFrameIndependentUpdate = false
getset

If frame independant updates should be performed. This should only be used for time-sensitive components like animation.

Implements Angulos._3d.Components.IAngulosComponent.

◆ HasBeenInitialized

bool Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.HasBeenInitialized
getset

If the component has been initialized. If false, the ECS will call Start() on the component.

Implements Angulos._3d.Components.IAngulosComponent.

◆ Parent

SimulatedObject Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.Parent
getset

The parent object of the component.

Implements Angulos._3d.Components.IAngulosComponent.

◆ UpdateTiming

ushort Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.UpdateTiming
getset

The timing of updates in frames. Update() gets called every [UpdateTiming] frames. See IAngulosComponent.UpdateTiming.

Implements Angulos._3d.Components.IAngulosComponent.

◆ Working

bool Angulos._3d.Components.PhysicsComponents.PhysicsRigidBodyComponent.Working
getset

The documentation for this class was generated from the following file:
  • Sharp/_3d/Components/PhysicsComponents/PhysicsRigidBodyComponent.cs