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

#include <Spring.h>

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

Public Member Functions

 SpringMass ()
 
Vector3D GetNormal () const
 
Vector3DGetNormalPtr ()
 
void SetNormal (const Vector3D &n)
 
void NormalizeNormal ()
 
bool IsFixed () const
 
void SetIsFixed (const bool val)
 
- Public Member Functions inherited from Ult::PointMass
 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
 

Additional Inherited Members

- Protected Attributes inherited from Ult::PointMass
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 point mass with a spring constraint.

Constructor & Destructor Documentation

◆ SpringMass()

Ult::SpringMass::SpringMass ( )
inline

SpringMass constructor.

Member Function Documentation

◆ GetNormal()

Vector3D Ult::SpringMass::GetNormal ( ) const
inline

Returns a copy of the spring normal.

◆ GetNormalPtr()

Vector3D * Ult::SpringMass::GetNormalPtr ( )
inline

Returns a pointer to the spring normal.

◆ IsFixed()

bool Ult::SpringMass::IsFixed ( ) const
inline

Returns if the spring is fixed or not.

◆ NormalizeNormal()

void Ult::SpringMass::NormalizeNormal ( )
inline

Make the spring normal unit length.

◆ SetIsFixed()

void Ult::SpringMass::SetIsFixed ( const bool val)
inline

Set whether the spring is fixed or not.

◆ SetNormal()

void Ult::SpringMass::SetNormal ( const Vector3D & n)
inline

Set the spring normal.


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