Loading...
Searching...
No Matches
Collider.hpp
Go to the documentation of this file.
void Update(double currentTimeInSeconds, double timeIntervalInSeconds)
Updates the collider state.
double GetFrictionCoefficient() const
Returns friction coefficient.
void SetOnBeginUpdateCallback(const OnBeginUpdateCallback &callback)
Sets the callback function to be called when Collider::update function is invoked.
Collider & operator=(const Collider &other)=default
Default copy assignment operator.
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.
void GetClosestPoint(const std::shared_ptr< Surface< N > > &surface, const Vector< double, N > &queryPoint, ColliderQueryResult *result) const
Outputs closest point's information.
std::function< void(Collider *, double, double)> OnBeginUpdateCallback
Callback function type for update calls.
Definition Collider.hpp:40
Collider & operator=(Collider &&other) noexcept=default
Default move assignment operator.
void SetFrictionCoefficient(double newFrictionCoefficient)
Sets the friction coefficient.
const std::shared_ptr< Surface< N > > & GetSurface() const
Returns the surface instance.
virtual Vector< double, N > VelocityAt(const Vector< double, N > &point) const =0
Returns the velocity of the collider at given point.
void SetSurface(const std::shared_ptr< Surface< N > > &newSurface)
Assigns the surface instance from the subclass.
void ResolveCollision(double radius, double restitutionCoefficient, Vector< double, N > *position, Vector< double, N > *velocity)
Definition Matrix.hpp:30
Definition pybind11Utils.hpp:21
std::shared_ptr< Collider2 > Collider2Ptr
Shared pointer type for the Collider2.
Definition Collider.hpp:141
std::shared_ptr< Collider3 > Collider3Ptr
Shared pointer type for the Collider3.
Definition Collider.hpp:144
Vector< double, N > velocity
Definition Collider.hpp:112
Vector< double, N > normal
Definition Collider.hpp:111
1.9.8