Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult::PointMass Class Reference

#include <PointMass.h>

Inheritance diagram for Ult::PointMass:
Ult::PhysicsObject Ult::SpringMass

Public Member Functions

 PointMass ()
 
virtual ~PointMass ()
 
virtual void Update (float dt)
 
virtual float GetDragArea ()
 
virtual float GetDragCoefficient ()
 
virtual float GetLiftCoefficient ()
 
virtual float GetVolumeUnderHeight (float height)
 
virtual Matrix4x4 GetTransformation ()
 
void SetVelocityDamper (const float damper)
 
- Public Member Functions inherited from Ult::PhysicsObject
 PhysicsObject ()
 
virtual ~PhysicsObject ()
 
virtual void SetMass (const float m)
 
virtual float GetMass () const
 
virtual float GetMassInv () const
 
virtual float GetVolume () const
 
virtual void SetLift (const float lVal, const Vector3D &lVec)
 
virtual float GetLift () const
 
virtual Vector3D GetLiftVec () const
 
virtual float GetSpeed () const
 
virtual Vector3D GetOldPosition () const
 
virtual void SetPosition (const Vector3D &pos)
 
virtual Vector3D GetPosition ()
 
virtual void SetForce (const Vector3D &f)
 
virtual Vector3D GetForce () const
 
virtual void AddForce (const Vector3D &f)
 
virtual void SetVelocity (const Vector3D &v)
 
virtual Vector3D GetVelocity () const
 
virtual void AddVelocity (const Vector3D &v)
 
virtual Vector3D GetAcceleration () const
 

Protected Attributes

float mVelocityDamper
 
- Protected Attributes inherited from Ult::PhysicsObject
float mMass
 
float mMassInv
 
float mVolume
 
float mLift
 
float mSpeed
 
Vector3D mOldPosition
 
Vector3D mPosition
 
Vector3D mForce
 
Vector3D mVelocity
 
Vector3D mAcceleration
 
Vector3D mLiftVector
 

Detailed Description

Represents a collection of 0-volume bodies

Constructor & Destructor Documentation

◆ PointMass()

Ult::PointMass::PointMass ( )
inline

PointMass constructor

◆ ~PointMass()

virtual Ult::PointMass::~PointMass ( )
inlinevirtual

PointMass destructor

Member Function Documentation

◆ GetDragArea()

virtual float Ult::PointMass::GetDragArea ( )
inlinevirtual

Get drag area - returns 0.

Implements Ult::PhysicsObject.

◆ GetDragCoefficient()

virtual float Ult::PointMass::GetDragCoefficient ( )
inlinevirtual

Get drag coefficient - returns 0.05

Implements Ult::PhysicsObject.

◆ GetLiftCoefficient()

virtual float Ult::PointMass::GetLiftCoefficient ( )
inlinevirtual

Get lift coefficient - returns 0.

Implements Ult::PhysicsObject.

◆ GetTransformation()

Matrix4x4 Ult::PointMass::GetTransformation ( )
virtual

Returns the translation matrix for it's position.

Implements Ult::PhysicsObject.

◆ GetVolumeUnderHeight()

virtual float Ult::PointMass::GetVolumeUnderHeight ( float height)
inlinevirtual

If y-position >= height, returns 0; else returns 1.

Implements Ult::PhysicsObject.

◆ SetVelocityDamper()

void Ult::PointMass::SetVelocityDamper ( const float damper)
inline

Sets the value which scales velocity during Update.

◆ Update()

void Ult::PointMass::Update ( float dt)
virtual

Applies acceleration/velocity, updates speed, and resets force for the given timestep (in seconds).

Implements Ult::PhysicsObject.

Member Data Documentation

◆ mVelocityDamper

float Ult::PointMass::mVelocityDamper
protected

The documentation for this class was generated from the following files: