The Shapes Library
Game Physics with Bespoke Code
Loading...
Searching...
No Matches
Shapes::CPointDesc Class Reference

Point descriptor. More...

#include <Point.h>

Inheritance diagram for Shapes::CPointDesc:
Collaboration diagram for Shapes::CPointDesc:

Public Member Functions

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

Additional Inherited Members

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