Collider3.h
Go to the documentation of this file.
55 void ResolveCollision(double radius, double restitutionCoefficient, Vector3D* position, Vector3D* velocity);
100 void GetClosestPoint(const Surface3Ptr& surface, const Vector3D& queryPoint, ColliderQueryResult* result) const;
103 bool IsPenetrating(const ColliderQueryResult& colliderPoint, const Vector3D& position, double radius);
std::shared_ptr< Collider3 > Collider3Ptr
Shared pointer type for the Collider3.
Definition: Collider3.h:112
void Update(double currentTimeInSeconds, double timeIntervalInSeconds)
Updates the collider state.
std::function< void(Collider3 *, double, double)> OnBeginUpdateCallback
Callback function type for update calls.
Definition: Collider3.h:36
void ResolveCollision(double radius, double restitutionCoefficient, Vector3D *position, Vector3D *velocity)
virtual Vector3D VelocityAt(const Vector3D &point) const =0
Returns the velocity of the collider at given point.
Internal query result structure.
Definition: Collider3.h:88
void SetFrictionCoefficient(double newFrictionCoeffient)
Sets the friction coefficient.
Definition: pybind11Utils.h:24
std::shared_ptr< Surface3 > Surface3Ptr
Shared pointer for the Surface3 type.
Definition: Surface3.h:100
void GetClosestPoint(const Surface3Ptr &surface, const Vector3D &queryPoint, ColliderQueryResult *result) const
Outputs closest point's information.
bool IsPenetrating(const ColliderQueryResult &colliderPoint, const Vector3D &position, double radius)
Returns true if given point is in the opposite side of the surface.
double GetFrictionCoefficient() const
Returns friction coefficient.
void SetOnBeginUpdateCallback(const OnBeginUpdateCallback &callback)
Sets the callback function to be called when Collider3::update function is invoked.
void SetSurface(const Surface3Ptr &newSurface)
Assigns the surface instance from the subclass.