Dura2D  v0.1.0
An educational 2D game physics library
Loading...
Searching...
No Matches
d2BoxShape Struct Reference

#include <d2Shape.h>

Inheritance diagram for d2BoxShape:
d2PolygonShape d2Shape

Public Member Functions

 d2BoxShape (real width, real height)
 
virtual ~d2BoxShape ()
 
d2ShapeType GetType () const override
 
d2ShapeClone () const override
 
real GetMomentOfInertia () const override
 
- Public Member Functions inherited from d2PolygonShape
 d2PolygonShape ()=default
 
 d2PolygonShape (const d2Vec2 *vertices, int vertexCount)
 
virtual ~d2PolygonShape ()
 
d2ShapeType GetType () const override
 
d2ShapeClone () const override
 
d2Vec2 EdgeAt (int index) const
 
real FindMinSeparation (const d2PolygonShape *other, int &indexReferenceEdge, d2Vec2 &supportPoint) const
 
int FindIncidentEdge (const d2Vec2 &normal) const
 
int ClipSegmentToLine (const std::vector< d2Vec2 > &contactsIn, std::vector< d2Vec2 > &contactsOut, const d2Vec2 &c0, const d2Vec2 &c1) const
 
real PolygonArea () const
 
d2Vec2 PolygonCentroid () const
 
real GetMomentOfInertia () const override
 
void UpdateVertices (const d2Transform &transform) override
 
- Public Member Functions inherited from d2Shape
virtual ~d2Shape ()=default
 

Additional Inherited Members

- Public Attributes inherited from d2PolygonShape
real width
 
real height
 
int m_vertexCount
 
d2Vec2localVertices
 
d2Vec2worldVertices
 

Constructor & Destructor Documentation

◆ d2BoxShape()

d2BoxShape::d2BoxShape ( real width,
real height )

◆ ~d2BoxShape()

virtual d2BoxShape::~d2BoxShape ( )
virtual

Member Function Documentation

◆ Clone()

d2Shape * d2BoxShape::Clone ( ) const
overridevirtual

Implements d2Shape.

◆ GetMomentOfInertia()

real d2BoxShape::GetMomentOfInertia ( ) const
overridevirtual

Implements d2Shape.

◆ GetType()

d2ShapeType d2BoxShape::GetType ( ) const
overridevirtual

Implements d2Shape.


The documentation for this struct was generated from the following file: