Loading...
Searching...
No Matches
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. | |
| ColliderSet (const ConstArrayView1< std::shared_ptr< Collider< N > > > &others) | |
| Constructs with other colliders. | |
| Vector< double, N > | VelocityAt (const Vector< double, N > &point) const override |
Returns the velocity of the collider at given point. | |
| void | AddCollider (const std::shared_ptr< Collider< N > > &collider) |
| Adds a collider to the set. | |
| size_t | NumberOfColliders () const |
| Returns number of colliders. | |
| std::shared_ptr< Collider< N > > | GetCollider (size_t i) const |
Returns collider at index i. | |
Public Member Functions inherited from CubbyFlow::Collider< N > | |
| Collider ()=default | |
| Default constructor. | |
| virtual | ~Collider ()=default |
| Default virtual destructor. | |
| Collider (const Collider &other)=default | |
| Default copy constructor. | |
| Collider (Collider &&other) noexcept=default | |
| Default move constructor. | |
| Collider & | operator= (const Collider &other)=default |
| Default copy assignment operator. | |
| Collider & | operator= (Collider &&other) noexcept=default |
| Default move assignment operator. | |
| void | ResolveCollision (double radius, double restitutionCoefficient, Vector< double, N > *position, Vector< double, N > *velocity) |
| double | GetFrictionCoefficient () const |
| Returns friction coefficient. | |
| void | SetFrictionCoefficient (double newFrictionCoefficient) |
| Sets the friction coefficient. | |
| const std::shared_ptr< Surface< N > > & | GetSurface () const |
| Returns the surface instance. | |
| void | Update (double currentTimeInSeconds, double timeIntervalInSeconds) |
| Updates the collider state. | |
| void | SetOnBeginUpdateCallback (const OnBeginUpdateCallback &callback) |
| Sets the callback function to be called when Collider::update function is invoked. | |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns builder for ColliderSet. | |
Additional Inherited Members | |
Public Types inherited from CubbyFlow::Collider< N > | |
| using | OnBeginUpdateCallback = std::function< void(Collider *, double, double)> |
| Callback function type for update calls. | |
Protected Member Functions inherited from CubbyFlow::Collider< N > | |
| void | SetSurface (const std::shared_ptr< Surface< N > > &newSurface) |
| Assigns the surface instance from the subclass. | |
| void | GetClosestPoint (const std::shared_ptr< Surface< N > > &surface, const Vector< double, N > &queryPoint, ColliderQueryResult *result) const |
| Outputs closest point's information. | |
| 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. | |
Detailed Description
template<size_t N>
class CubbyFlow::ColliderSet< 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.9.8