Output data for time of impact. More...
#include <TimeOfImpact.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 (Real t, Statistics s, State z) noexcept | |
Initializing constructor. | |
Public Attributes | |
Real | time = 0 |
Time factor in range of [0,1] into the future. | |
Statistics | stats |
Statistics. | |
State | state = e_unknown |
State at time factor. | |
Related Functions | |
(Note that these are not member functions.) | |
TOIOutput | GetToiViaSat (const DistanceProxy &proxyA, const Sweep &sweepA, const DistanceProxy &proxyB, const Sweep &sweepB, 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,tMax
]. 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.
tMax
is not between 0 and 1 inclusive. 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. |