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

#include <PhysicsSpace.h>

Public Member Functions

 PhysicsSpace ()
 
virtual ~PhysicsSpace ()
 
void InfluenceObject (PhysicsObject *obj, float influencePct)
 
void SetDensity (const float density)
 
float GetDensity () const
 
void SetSurfaceHeight (const float height)
 
float GetSurfaceHeight () const
 
void SetGravity (const Vector3D &v)
 
Vector3D GetGravity () const
 
void SetIsAirAtmosphere (const bool b)
 
bool IsAirAtmosphere () const
 

Protected Attributes

float mDensity
 
float mSurfaceHeight
 
Vector3D mGravity
 
bool mIsAir
 

Detailed Description

Represents an area containing physical bodies.

Constructor & Destructor Documentation

◆ PhysicsSpace()

Ult::PhysicsSpace::PhysicsSpace ( )

PhysicsSpace constructor.

◆ ~PhysicsSpace()

Ult::PhysicsSpace::~PhysicsSpace ( )
virtual

PhysicsSpace destructor.

Member Function Documentation

◆ GetDensity()

float Ult::PhysicsSpace::GetDensity ( ) const
inline

Returns the density of the space.

◆ GetGravity()

Vector3D Ult::PhysicsSpace::GetGravity ( ) const
inline

Returns the gravity value of the space.

◆ GetSurfaceHeight()

float Ult::PhysicsSpace::GetSurfaceHeight ( ) const
inline

Returns the height of the space.

◆ InfluenceObject()

void Ult::PhysicsSpace::InfluenceObject ( PhysicsObject * obj,
float influencePct )

Apply the properties of this space (drag, buoyancy, gravity, lift) to the input object with the given influence percentage.

◆ IsAirAtmosphere()

bool Ult::PhysicsSpace::IsAirAtmosphere ( ) const
inline

Returns whether this space is air or not.

◆ SetDensity()

void Ult::PhysicsSpace::SetDensity ( const float density)
inline

Set the density of the space.

◆ SetGravity()

void Ult::PhysicsSpace::SetGravity ( const Vector3D & v)
inline

Set the gravity value of the space.

◆ SetIsAirAtmosphere()

void Ult::PhysicsSpace::SetIsAirAtmosphere ( const bool b)
inline

Set whether this space represents air or not. If true, buoyancy is not used/calculated.

◆ SetSurfaceHeight()

void Ult::PhysicsSpace::SetSurfaceHeight ( const float height)
inline

Sets the height of the space, for liquid/water sim.

Member Data Documentation

◆ mDensity

float Ult::PhysicsSpace::mDensity
protected

◆ mGravity

Vector3D Ult::PhysicsSpace::mGravity
protected

◆ mIsAir

bool Ult::PhysicsSpace::mIsAir
protected

◆ mSurfaceHeight

float Ult::PhysicsSpace::mSurfaceHeight
protected

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