PlayRho  2.0.0
An interactive physics engine & library.
playrho::d2::detail::JointModel< T > Struct Template Referencefinal

Internal joint model type. More...

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

Inheritance diagram for playrho::d2::detail::JointModel< T >:
[legend]
Collaboration diagram for playrho::d2::detail::JointModel< T >:
[legend]

Public Types

using data_type = T
 Type alias for the type of the data held.
 

Public Member Functions

template<typename U , std::enable_if_t<!std::is_same_v< U, JointModel >, int > = 0>
 JointModel (U &&arg) noexcept(std::is_nothrow_constructible_v< T, U >)
 Initializing constructor.
 
std::unique_ptr< JointConceptClone_ () const override
 Clones this concept and returns a pointer to a mutable copy. More...
 
BodyID GetBodyA_ () const noexcept override
 Gets the ID of body-A. More...
 
BodyID GetBodyB_ () const noexcept override
 Gets the ID of body-B. More...
 
bool GetCollideConnected_ () const noexcept override
 Gets whether collision handling should be done for connected bodies. More...
 
const void * GetData_ () const noexcept override
 Gets the data for the underlying configuration. More...
 
void * GetData_ () noexcept override
 Gets the data for the underlying configuration. More...
 
TypeID GetType_ () const noexcept override
 Gets the use type information. More...
 
void InitVelocity_ (const Span< BodyConstraint > &bodies, const playrho::StepConf &step, const ConstraintSolverConf &conf) override
 Initializes the velocities for this joint. More...
 
bool IsEqual_ (const JointConcept &other) const noexcept override
 Equality checking function.
 
bool ShiftOrigin_ (const Length2 &value) noexcept override
 Call to notify joint of a shift in the world origin. More...
 
bool SolvePosition_ (const Span< BodyConstraint > &bodies, const ConstraintSolverConf &conf) const override
 Solves the positions for this joint. More...
 
bool SolveVelocity_ (const Span< BodyConstraint > &bodies, const playrho::StepConf &step) override
 Solves the velocities for this joint. More...
 
- Public Member Functions inherited from playrho::d2::detail::JointConcept
virtual ~JointConcept ()=default
 Explicitly declared virtual destructor.
 

Public Attributes

data_type data
 Data.
 

Detailed Description

template<typename T>
struct playrho::d2::detail::JointModel< T >

Internal joint model type.

Note
Provides the implementation for runtime value polymorphism.

Member Function Documentation

◆ Clone_()

template<typename T >
std::unique_ptr<JointConcept> playrho::d2::detail::JointModel< T >::Clone_ ( ) const
inlineoverridevirtual

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.

Implements playrho::d2::detail::JointConcept.

◆ GetBodyA_()

template<typename T >
BodyID playrho::d2::detail::JointModel< T >::GetBodyA_ ( ) const
inlineoverridevirtualnoexcept

Gets the ID of body-A.

Implements playrho::d2::detail::JointConcept.

◆ GetBodyB_()

template<typename T >
BodyID playrho::d2::detail::JointModel< T >::GetBodyB_ ( ) const
inlineoverridevirtualnoexcept

Gets the ID of body-B.

Implements playrho::d2::detail::JointConcept.

◆ GetCollideConnected_()

template<typename T >
bool playrho::d2::detail::JointModel< T >::GetCollideConnected_ ( ) const
inlineoverridevirtualnoexcept

Gets whether collision handling should be done for connected bodies.

Implements playrho::d2::detail::JointConcept.

◆ GetData_() [1/2]

template<typename T >
const void* playrho::d2::detail::JointModel< T >::GetData_ ( ) const
inlineoverridevirtualnoexcept

Gets the data for the underlying configuration.

Implements playrho::d2::detail::JointConcept.

◆ GetData_() [2/2]

template<typename T >
void* playrho::d2::detail::JointModel< T >::GetData_ ( )
inlineoverridevirtualnoexcept

Gets the data for the underlying configuration.

Implements playrho::d2::detail::JointConcept.

◆ GetType_()

template<typename T >
TypeID playrho::d2::detail::JointModel< T >::GetType_ ( ) const
inlineoverridevirtualnoexcept

Gets the use type information.

Returns
Type info of the underlying value's type.

Implements playrho::d2::detail::JointConcept.

Referenced by playrho::d2::detail::JointModel< T >::IsEqual_().

◆ InitVelocity_()

template<typename T >
void playrho::d2::detail::JointModel< T >::InitVelocity_ ( const Span< BodyConstraint > &  bodies,
const playrho::StepConf step,
const ConstraintSolverConf conf 
)
inlineoverridevirtual

Initializes the velocities for this joint.

Implements playrho::d2::detail::JointConcept.

◆ ShiftOrigin_()

template<typename T >
bool playrho::d2::detail::JointModel< T >::ShiftOrigin_ ( const Length2 value)
inlineoverridevirtualnoexcept

Call to notify joint of a shift in the world origin.

Implements playrho::d2::detail::JointConcept.

◆ SolvePosition_()

template<typename T >
bool playrho::d2::detail::JointModel< T >::SolvePosition_ ( const Span< BodyConstraint > &  bodies,
const ConstraintSolverConf conf 
) const
inlineoverridevirtual

Solves the positions for this joint.

Implements playrho::d2::detail::JointConcept.

◆ SolveVelocity_()

template<typename T >
bool playrho::d2::detail::JointModel< T >::SolveVelocity_ ( const Span< BodyConstraint > &  bodies,
const playrho::StepConf step 
)
inlineoverridevirtual

Solves the velocities for this joint.

Implements playrho::d2::detail::JointConcept.


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