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

#include <P2Rect.hpp>

Inherits s3d::P2Shape.

Public Member Functions

SIV3D_NODISCARD_CXX20 P2Rect (b2Body &body, const RectF &rect, const P2Material &material, const P2Filter &filter)
 
P2ShapeType getShapeType () const noexcept override
 
const P2Shapedraw (const ColorF &color=Palette::White) const override
 
const P2Shapedraw (const ColorF(&colors)[4]) const
 
const P2Shapedraw (Arg::top_< ColorF > topColor, Arg::bottom_< ColorF > bottomColor) const
 
const P2Shapedraw (Arg::left_< ColorF > leftColor, Arg::right_< ColorF > rightColor) const
 
const P2ShapedrawFrame (double thickness, const ColorF &color=Palette::White) const override
 
const P2ShapedrawWireframe (double thickness, const ColorF &color=Palette::White) const override
 
Quad getQuad () 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

◆ P2Rect()

SIV3D_NODISCARD_CXX20 s3d::P2Rect::P2Rect ( b2Body &  body,
const RectF rect,
const P2Material material,
const P2Filter filter 
)

Member Function Documentation

◆ draw() [1/4]

const P2Shape& s3d::P2Rect::draw ( Arg::left_< ColorF leftColor,
Arg::right_< ColorF rightColor 
) const

◆ draw() [2/4]

const P2Shape& s3d::P2Rect::draw ( Arg::top_< ColorF topColor,
Arg::bottom_< ColorF bottomColor 
) const

◆ draw() [3/4]

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

Implements s3d::P2Shape.

◆ draw() [4/4]

const P2Shape& s3d::P2Rect::draw ( const ColorF(&)  colors[4]) const

◆ drawFrame()

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

Implements s3d::P2Shape.

◆ drawWireframe()

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

Implements s3d::P2Shape.

◆ getQuad()

Quad s3d::P2Rect::getQuad ( ) const

◆ getShapeType()

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

Implements s3d::P2Shape.


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