Output data for time of impact. More...
#include <playrho/ToiOutput.hpp>
Classes | |
struct | Statistics |
Time of impact statistics. More... | |
Public Types | |
enum | State : std::uint8_t { e_unknown , e_touching , e_separated , e_overlapped , e_maxRootIters , e_nextAfter , e_maxToiIters , e_belowMinTarget , e_maxDistIters , e_targetDepthExceedsTotalRadius , e_minTargetSquaredOverflow , e_maxTargetSquaredOverflow , e_notFinite } |
State. More... | |
Public Member Functions | |
ToiOutput ()=default | |
Default constructor. | |
ToiOutput (UnitIntervalFF< Real > t, Statistics s, State z) noexcept | |
Initializing constructor. | |
Public Attributes | |
State | state = e_unknown |
State at time factor. | |
Statistics | stats |
Statistics. | |
UnitIntervalFF< Real > | time {} |
Time factor in range of [0,1] into the future. | |
Related Functions | |
(Note that these are not member functions.) | |
ToiOutput | GetToiViaSat (const DistanceProxy &proxyA, const Sweep &sweepA, const DistanceProxy &proxyB, const Sweep &sweepB, const ToiConf &conf=GetDefaultToiConf()) |
Gets the time of impact for two disjoint convex sets using the Separating Axis Theorem. More... | |
Output data for time of impact.
enum playrho::ToiOutput::State : std::uint8_t |
State.
|
related |
Gets the time of impact for two disjoint convex sets using the Separating Axis Theorem.
Computes the upper bound on time before two shapes penetrate too much. Time is represented as a fraction between [0,timeMax
]. This uses a swept separating axis and may miss some intermediate, non-tunneling collision. If you change the time interval, you should call this function again.
proxyA | Proxy A. The proxy's vertex count must be 1 or more. |
sweepA | Sweep A. Sweep of motion for shape represented by proxy A. |
proxyB | Proxy B. The proxy's vertex count must be 1 or more. |
sweepB | Sweep B. Sweep of motion for shape represented by proxy B. |
conf | Configuration details for on calculation. Like the targeted depth of penetration. |