Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DParticlePhysics Class Reference

The U4DParticlePhysics class is in charge of simulating gravity forces on 3D particles. More...

Public Member Functions

 U4DParticlePhysics ()
 class constructor
 
 ~U4DParticlePhysics ()
 class destructor
 
void updateForce (U4DVector3n uParticleSystemPosition, U4DParticle *uParticle, float dt)
 updates the forces affecting the 3D particle. More...
 
void integrate (U4DParticle *uParticle, float dt)
 Integrates the equation of motion. More...
 
void evaluateLinearAspect (U4DParticle *uModel, U4DVector3n &uLinearAcceleration, float dt, U4DVector3n &uVnew, U4DVector3n &uSnew)
 evaluates the final velocity and position of the 3D particle. Note, only linear velocity is computed. More...
 

Detailed Description

The U4DParticlePhysics class is in charge of simulating gravity forces on 3D particles.

Member Function Documentation

◆ evaluateLinearAspect()

void U4DEngine::U4DParticlePhysics::evaluateLinearAspect ( U4DParticle uModel,
U4DVector3n uLinearAcceleration,
float  dt,
U4DVector3n uVnew,
U4DVector3n uSnew 
)

evaluates the final velocity and position of the 3D particle. Note, only linear velocity is computed.

Parameters
uModelpointer to the 3D particle
uLinearAccelerationlinear acceleration
dttime-step
uVnewreference to new velocity
uSnewreference to new positon

◆ integrate()

void U4DEngine::U4DParticlePhysics::integrate ( U4DParticle uParticle,
float  dt 
)

Integrates the equation of motion.

Computes the final velocity and position for the 3D particle. Note, only linear velocity is computed.

Parameters
uParticlepointer to 3D particle
dttime-step

◆ updateForce()

void U4DEngine::U4DParticlePhysics::updateForce ( U4DVector3n  uParticleSystemPosition,
U4DParticle uParticle,
float  dt 
)

updates the forces affecting the 3D particle.

the only forces affecting a 3D particle is gravitational force

Parameters
uParticleSystemPositionparticle system position
uParticlepointer to particle
dttime-step