OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::P2Polygon Class Reference

#include <P2Polygon.hpp>

Inherits s3d::P2Shape.

Public Member Functions

SIV3D_NODISCARD_CXX20 P2Polygon (b2Body &body, const Polygon &polygon, const P2Material &material, const P2Filter &filter)
 
P2ShapeType getShapeType () const noexcept override
 
const P2Shapedraw (const ColorF &color=Palette::White) const override
 
const P2ShapedrawFrame (double thickness, const ColorF &color=Palette::White) const override
 
const P2ShapedrawWireframe (double thickness, const ColorF &color=Palette::White) const override
 
Polygon getPolygon () const
 
- Public Member Functions inherited from s3d::P2Shape
virtual ~P2Shape ()=default
 
void setDensity (double density) noexcept
 
double getDensity () const noexcept
 
void setRestitution (double restitution) noexcept
 
double getRestitution () const noexcept
 
void setFriction (double friction) noexcept
 
double getFriction () const noexcept
 
void setRestitutionThreshold (double restitutionThreshold) noexcept
 
double getRestitutionThreshold () const noexcept
 
void setFilter (const P2Filter &filter) noexcept
 
P2Filter getFilter () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from s3d::P2Shape
Array< b2Fixture * > m_fixtures
 

Constructor & Destructor Documentation

◆ P2Polygon()

SIV3D_NODISCARD_CXX20 s3d::P2Polygon::P2Polygon ( b2Body &  body,
const Polygon polygon,
const P2Material material,
const P2Filter filter 
)

Member Function Documentation

◆ draw()

const P2Shape& s3d::P2Polygon::draw ( const ColorF color = Palette::White) const
overridevirtual

Implements s3d::P2Shape.

◆ drawFrame()

const P2Shape& s3d::P2Polygon::drawFrame ( double  thickness,
const ColorF color = Palette::White 
) const
overridevirtual

Implements s3d::P2Shape.

◆ drawWireframe()

const P2Shape& s3d::P2Polygon::drawWireframe ( double  thickness,
const ColorF color = Palette::White 
) const
overridevirtual

Implements s3d::P2Shape.

◆ getPolygon()

Polygon s3d::P2Polygon::getPolygon ( ) const

◆ getShapeType()

P2ShapeType s3d::P2Polygon::getShapeType ( ) const
overridevirtualnoexcept

Implements s3d::P2Shape.


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