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

Shape Descriptor. More...

#include <Shape.h>

Inheritance diagram for CShapeDesc:
CCircleDesc CLineSegDesc CPointDesc CArcDesc CDynamicCircleDesc

Public Member Functions

 CShapeDesc (eShape)
 Constructor. More...
 
 CShapeDesc ()
 Default constructor. More...
 

Public Attributes

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 shape descriptor is a simple structure that holds basic information about a shape.

Constructor & Destructor Documentation

◆ CShapeDesc() [1/2]

CShapeDesc::CShapeDesc ( eShape  s)

This constructor creates a shape descriptor given a shape type.

Parameters
sShape type.

◆ CShapeDesc() [2/2]

CShapeDesc::CShapeDesc ( )

The default contructor creates a shape descriptor of unknown type.