Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
PointMass.h
Go to the documentation of this file.
1#ifndef ULT_PHYSICS_POINT_MASS_H_INCLUDED
2#define ULT_PHYSICS_POINT_MASS_H_INCLUDED
3
4#include "PhysicsObject.h"
5
6namespace Ult
7{
8
14{
15public:
20 mVelocityDamper(1.0f)
21 {}
22
25 virtual ~PointMass()
26 {}
27
32 virtual void Update(float dt);
33
35 virtual float GetDragArea() { return 0.0f; }
37 virtual float GetDragCoefficient() { return 0.05f; }
39 virtual float GetLiftCoefficient() { return 0.0f; }
41 virtual float GetVolumeUnderHeight(float height) {
42 if (mPosition.y >= height) {
43 return 0.0f;
44 }
45 return 1.0f;
46 }
47
50
52 void SetVelocityDamper(const float damper) { mVelocityDamper = damper; }
53
54protected:
56};
57
58} // namespace Ult
59
60#endif // ULT_PHYSICS_POINT_MASS_H_INCLUDED
61
Definition Matrix4x4.h:14
Vector3D mPosition
Definition PhysicsObject.h:109
PhysicsObject()
Definition PhysicsObject.h:20
virtual void Update(float dt)
Definition PointMass.cpp:6
virtual float GetLiftCoefficient()
Definition PointMass.h:39
PointMass()
Definition PointMass.h:19
virtual float GetDragCoefficient()
Definition PointMass.h:37
float mVelocityDamper
Definition PointMass.h:55
virtual float GetDragArea()
Definition PointMass.h:35
virtual float GetVolumeUnderHeight(float height)
Definition PointMass.h:41
virtual Matrix4x4 GetTransformation()
Definition PointMass.cpp:21
virtual ~PointMass()
Definition PointMass.h:25
void SetVelocityDamper(const float damper)
Definition PointMass.h:52
Definition Archive.h:13