Colliding Shapes
Ian Parberry's "Introduction to Game Physics"
Public Member Functions | List of all members
CPointDesc Class Reference

Point descriptor. More...

#include <Point.h>

Inheritance diagram for CPointDesc:
CShapeDesc

Public Member Functions

 CPointDesc ()
 Default constructor. More...
 
 CPointDesc (const Vector2 &p, float e=1.0f)
 Constructor. More...
 
- Public Member Functions inherited from CShapeDesc
 CShapeDesc (eShape)
 Constructor. More...
 
 CShapeDesc ()
 Default constructor. More...
 

Additional Inherited Members

- Public Attributes inherited from CShapeDesc
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.
 

Detailed Description

The point descriptor describes a point shape.

Constructor & Destructor Documentation

◆ CPointDesc() [1/2]

CPointDesc::CPointDesc ( )

The default contructor creates a point descriptor from the default shape descriptor.

◆ CPointDesc() [2/2]

CPointDesc::CPointDesc ( const Vector2 &  p,
float  e = 1.0f 
)

This constructor creates a point descriptor given the point's position and elasticity.

Parameters
pPosition.
eElasticity.