CubbyFlow::ColliderSet< N > Class Template Referencefinal
Collection of N-D colliders. More...
#include <Core/Geometry/ColliderSet.hpp>
Inheritance diagram for CubbyFlow::ColliderSet< N >:
Classes | |
| class | Builder |
| Front-end to create ColliderSet objects step by step. More... | |
Public Member Functions | |
| ColliderSet () | |
| Default constructor. More... | |
| ColliderSet (const ConstArrayView1< std::shared_ptr< Collider< N >>> &others) | |
| Constructs with other colliders. More... | |
| Vector< double, N > | VelocityAt (const Vector< double, N > &point) const override |
Returns the velocity of the collider at given point. More... | |
| void | AddCollider (const std::shared_ptr< Collider< N >> &collider) |
| Adds a collider to the set. More... | |
| size_t | NumberOfColliders () const |
| Returns number of colliders. More... | |
| std::shared_ptr< Collider< N > > | GetCollider (size_t i) const |
Returns collider at index i. More... | |
Public Member Functions inherited from CubbyFlow::Collider< N > | |
| Collider ()=default | |
| Default constructor. More... | |
| virtual | ~Collider ()=default |
| Default virtual destructor. More... | |
| Collider (const Collider &other)=default | |
| Default copy constructor. More... | |
| Collider (Collider &&other) noexcept=default | |
| Default move constructor. More... | |
| Collider & | operator= (const Collider &other)=default |
| Default copy assignment operator. More... | |
| Collider & | operator= (Collider &&other) noexcept=default |
| Default move assignment operator. More... | |
| void | ResolveCollision (double radius, double restitutionCoefficient, Vector< double, N > *position, Vector< double, N > *velocity) |
| double | GetFrictionCoefficient () const |
| Returns friction coefficient. More... | |
| void | SetFrictionCoefficient (double newFrictionCoefficient) |
| Sets the friction coefficient. More... | |
| const std::shared_ptr< Surface< N > > & | GetSurface () const |
| Returns the surface instance. More... | |
| void | Update (double currentTimeInSeconds, double timeIntervalInSeconds) |
| Updates the collider state. More... | |
| void | SetOnBeginUpdateCallback (const OnBeginUpdateCallback &callback) |
| Sets the callback function to be called when Collider::update function is invoked. More... | |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns builder for ColliderSet. More... | |
Additional Inherited Members | |
Public Types inherited from CubbyFlow::Collider< N > | |
| using | OnBeginUpdateCallback = std::function< void(Collider *, double, double)> |
| Callback function type for update calls. More... | |
Protected Member Functions inherited from CubbyFlow::Collider< N > | |
| void | SetSurface (const std::shared_ptr< Surface< N >> &newSurface) |
| Assigns the surface instance from the subclass. More... | |
| void | GetClosestPoint (const std::shared_ptr< Surface< N >> &surface, const Vector< double, N > &queryPoint, ColliderQueryResult *result) const |
| Outputs closest point's information. More... | |
| bool | IsPenetrating (const ColliderQueryResult &colliderPoint, const Vector< double, N > &position, double radius) |
| Returns true if given point is in the opposite side of the surface. More... | |
Detailed Description
template<size_t N>
class CubbyFlow::ColliderSet< N >
Collection of N-D colliders.
Constructor & Destructor Documentation
◆ ColliderSet() [1/2]
template<size_t N>
| CubbyFlow::ColliderSet< N >::ColliderSet | ( | ) |
Default constructor.
◆ ColliderSet() [2/2]
template<size_t N>
|
explicit |
Constructs with other colliders.
Member Function Documentation
◆ AddCollider()
template<size_t N>
| void CubbyFlow::ColliderSet< N >::AddCollider | ( | const std::shared_ptr< Collider< N >> & | collider | ) |
Adds a collider to the set.
◆ GetBuilder()
template<size_t N>
|
static |
Returns builder for ColliderSet.
◆ GetCollider()
template<size_t N>
| std::shared_ptr<Collider<N> > CubbyFlow::ColliderSet< N >::GetCollider | ( | size_t | i | ) | const |
Returns collider at index i.
◆ NumberOfColliders()
template<size_t N>
| size_t CubbyFlow::ColliderSet< N >::NumberOfColliders | ( | ) | const |
Returns number of colliders.
◆ VelocityAt()
template<size_t N>
|
overridevirtual |
Returns the velocity of the collider at given point.
Implements CubbyFlow::Collider< N >.
The documentation for this class was generated from the following file:
- Core/Geometry/ColliderSet.hpp
Public Member Functions inherited from
1.8.13