![]() |
Colliding Shapes
Ian Parberry's "Introduction to Game Physics"
|
Circle descriptor. More...
#include <Circle.h>
Public Member Functions | |
CCircleDesc () | |
Constructor. More... | |
CCircleDesc (const Vector2 &, float, float=1.0f) | |
Constructor. More... | |
![]() | |
CShapeDesc (eShape) | |
Constructor. More... | |
CShapeDesc () | |
Default constructor. More... | |
Public Attributes | |
float | m_fRadius = 0.0f |
Radius. | |
![]() | |
eShape | m_eShapeType = eShape::Unknown |
Type of shape. | |
Vector2 | m_vPos |
Position. | |
float | m_fElasticity = 1.0f |
Elasticity, aka restitution, bounciness. | |
eMotion | m_eMotionType = eMotion::Static |
How shape moves. | |
bool | m_bIsSensor = false |
Sensor only, no rebound. | |
The circle descriptor describes a circle shape.
CCircleDesc::CCircleDesc | ( | ) |
The default contructor creates a circle descriptor of zero radius.
CCircleDesc::CCircleDesc | ( | const Vector2 & | p, |
float | r, | ||
float | e = 1.0f |
||
) |
This constructor creates a circle descriptor given the circle's center, radius, and elasticity.
p | Center point. |
r | Radius. |
e | Elasticity. |