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

Shape Descriptor. More...

#include <Shape.h>

Inheritance diagram for Shapes::CShapeDesc:

Public Member Functions

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

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.