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

Circle descriptor. More...

#include <Circle.h>

Inheritance diagram for Shapes::CCircleDesc:
Collaboration diagram for Shapes::CCircleDesc:

Public Member Functions

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

Public Attributes

float m_fRadius = 0.0f
 Radius.
 
- 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 circle descriptor describes a circle shape.

Constructor & Destructor Documentation

◆ CCircleDesc() [1/2]

CCircleDesc::CCircleDesc ( )

The default contructor creates a circle descriptor of zero radius.

◆ CCircleDesc() [2/2]

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.

Parameters
pCenter point.
rRadius.
eElasticity.