PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::d2::Shape::Concept Struct Referenceabstract

Internal configuration concept. More...

Inheritance diagram for playrho::d2::Shape::Concept:
[legend]

Public Member Functions

virtual std::unique_ptr< ConceptClone_ () const =0
 Clones this concept and returns a pointer to a mutable copy. More...
 
virtual ChildCounter GetChildCount_ () const noexcept=0
 Gets the "child" count.
 
virtual DistanceProxy GetChild_ (ChildCounter index) const =0
 Gets the "child" specified by the given index.
 
virtual MassData GetMassData_ () const noexcept=0
 Gets the mass data.
 
virtual NonNegative< LengthGetVertexRadius_ (ChildCounter idx) const =0
 Gets the vertex radius. More...
 
virtual NonNegative< AreaDensityGetDensity_ () const noexcept=0
 Gets the density.
 
virtual Real GetFriction_ () const noexcept=0
 Gets the friction.
 
virtual Real GetRestitution_ () const noexcept=0
 Gets the restitution.
 
virtual void Transform_ (const Mat22 &m)=0
 Transforms all of the shape's vertices by the given transformation matrix. More...
 
virtual bool IsEqual_ (const Concept &other) const noexcept=0
 Equality checking method.
 
virtual TypeID GetType_ () const noexcept=0
 Gets the use type information. More...
 
virtual const void * GetData_ () const noexcept=0
 Gets the data for the underlying configuration.
 

Friends

bool operator== (const Concept &lhs, const Concept &rhs) noexcept
 Equality operator.
 
bool operator!= (const Concept &lhs, const Concept &rhs) noexcept
 Inequality operator.
 

Detailed Description

Internal configuration concept.

Note
Provides the interface for runtime value polymorphism.

Member Function Documentation

◆ Clone_()

virtual std::unique_ptr<Concept> playrho::d2::Shape::Concept::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::Shape::Model< T >.

◆ GetType_()

virtual TypeID playrho::d2::Shape::Concept::GetType_ ( ) const
pure virtualnoexcept

Gets the use type information.

Returns
Type info of the underlying value's type.

Implemented in playrho::d2::Shape::Model< T >.

◆ GetVertexRadius_()

virtual NonNegative<Length> playrho::d2::Shape::Concept::GetVertexRadius_ ( ChildCounter  idx) const
pure virtual

Gets the vertex radius.

Parameters
idxChild index to get vertex radius for.

Implemented in playrho::d2::Shape::Model< T >.

◆ Transform_()

virtual void playrho::d2::Shape::Concept::Transform_ ( const Mat22 m)
pure virtual

Transforms all of the shape's vertices by the given transformation matrix.

See also
https://en.wikipedia.org/wiki/Transformation_matrix

Implemented in playrho::d2::Shape::Model< T >.


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