PlayRho  2.0.0
An interactive physics engine & library.
playrho::d2::detail::ShapeConcept Struct Referenceabstract

Internal shape concept interface. More...

#include <playrho/d2/detail/ShapeConcept.hpp>

Inheritance diagram for playrho::d2::detail::ShapeConcept:
[legend]

Public Member Functions

virtual std::unique_ptr< ShapeConceptClone_ () const =0
 Clones this concept and returns a pointer to a mutable copy. More...
 
virtual DistanceProxy GetChild_ (ChildCounter index) const =0
 Gets the "child" specified by the given index.
 
virtual ChildCounter GetChildCount_ () const noexcept=0
 Gets the "child" count.
 
virtual const void * GetData_ () const noexcept=0
 Gets the data for the underlying configuration.
 
virtual NonNegative< AreaDensityGetDensity_ () const noexcept=0
 Gets the density.
 
virtual Filter GetFilter_ () const noexcept=0
 Gets the filter. More...
 
virtual NonNegativeFF< RealGetFriction_ () const noexcept=0
 Gets the friction.
 
virtual MassData GetMassData_ () const =0
 Gets the mass data.
 
virtual Real GetRestitution_ () const noexcept=0
 Gets the restitution.
 
virtual TypeID GetType_ () const noexcept=0
 Gets the use type information. More...
 
virtual NonNegative< LengthGetVertexRadius_ (ChildCounter idx) const =0
 Gets the vertex radius. More...
 
virtual bool IsEqual_ (const ShapeConcept &other) const noexcept=0
 Equality checking function.
 
virtual bool IsSensor_ () const noexcept=0
 Gets whether or not this shape is a sensor. More...
 
virtual void Rotate_ (const UnitVec &value)=0
 Rotates all of the shape's vertices by the given amount.
 
virtual void Scale_ (const Vec2 &value)=0
 Scales all of the shape's vertices by the given amount.
 
virtual void SetDensity_ (NonNegative< AreaDensity >) noexcept=0
 Sets the density.
 
virtual void SetFilter_ (Filter value)=0
 Sets the filter. More...
 
virtual void SetFriction_ (NonNegative< Real > value)=0
 Sets the friction.
 
virtual void SetRestitution_ (Real value)=0
 Sets the restitution.
 
virtual void SetSensor_ (bool value)=0
 Sets whether or not this shape is a sensor. More...
 
virtual void SetVertexRadius_ (ChildCounter idx, NonNegative< Length > value)=0
 Sets the vertex radius. More...
 
virtual void Translate_ (const Length2 &value)=0
 Translates all of the shape's vertices by the given amount.
 

Detailed Description

Internal shape concept interface.

Provides an internal pure virtual interface for runtime value polymorphism.

Member Function Documentation

◆ Clone_()

virtual std::unique_ptr<ShapeConcept> playrho::d2::detail::ShapeConcept::Clone_ ( ) const
pure virtual

Clones this concept and returns a pointer to a mutable copy.

Note
This may throw std::bad_alloc or any exception that's thrown by the constructor for the model's underlying data type.
Exceptions
std::bad_allocif there's a failure allocating storage.

Implemented in playrho::d2::detail::ShapeModel< T >.

◆ GetFilter_()

virtual Filter playrho::d2::detail::ShapeConcept::GetFilter_ ( ) const
pure virtualnoexcept

Gets the filter.

See also
SetFilter_.

Implemented in playrho::d2::detail::ShapeModel< T >.

◆ GetType_()

virtual TypeID playrho::d2::detail::ShapeConcept::GetType_ ( ) const
pure virtualnoexcept

Gets the use type information.

Returns
Type info of the underlying value's type.

Implemented in playrho::d2::detail::ShapeModel< T >.

◆ GetVertexRadius_()

virtual NonNegative<Length> playrho::d2::detail::ShapeConcept::GetVertexRadius_ ( ChildCounter  idx) const
pure virtual

Gets the vertex radius.

Parameters
idxChild index to get vertex radius for.

Implemented in playrho::d2::detail::ShapeModel< T >.

◆ IsSensor_()

virtual bool playrho::d2::detail::ShapeConcept::IsSensor_ ( ) const
pure virtualnoexcept

Gets whether or not this shape is a sensor.

See also
SetSensor_.

Implemented in playrho::d2::detail::ShapeModel< T >.

◆ SetFilter_()

virtual void playrho::d2::detail::ShapeConcept::SetFilter_ ( Filter  value)
pure virtual

Sets the filter.

See also
GetFilter_.

Implemented in playrho::d2::detail::ShapeModel< T >.

◆ SetSensor_()

virtual void playrho::d2::detail::ShapeConcept::SetSensor_ ( bool  value)
pure virtual

Sets whether or not this shape is a sensor.

See also
IsSensor_.

Implemented in playrho::d2::detail::ShapeModel< T >.

◆ SetVertexRadius_()

virtual void playrho::d2::detail::ShapeConcept::SetVertexRadius_ ( ChildCounter  idx,
NonNegative< Length value 
)
pure virtual

Sets the vertex radius.

Parameters
idxChild index to set vertex radius for.
valueValue to set the vertex radius to.

Implemented in playrho::d2::detail::ShapeModel< T >.


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