Box2D  3.0.0
A Real-Time-Oriented 2-D Physics Engine
Classes | Public Types | Public Member Functions | List of all members
box2d::TOIOutput Class Reference

TimeOfImpact Output data. More...

#include <TimeOfImpact.hpp>

Classes

struct  Stats
 

Public Types

enum  State : std::uint16_t {
  e_unknown, e_failed, e_overlapped, e_touching,
  e_separated
}
 
using toi_iter_type = std::remove_const< decltype(DefaultMaxToiIters)>::type
 
using dist_iter_type = std::remove_const< decltype(DefaultMaxDistanceIters)>::type
 
using root_iter_type = std::remove_const< decltype(DefaultMaxToiRootIters)>::type
 
using toi_sum_type = Wider< toi_iter_type >::type
 
using dist_sum_type = Wider< dist_iter_type >::type
 
using root_sum_type = Wider< root_iter_type >::type
 

Public Member Functions

 TOIOutput ()=default
 
constexpr TOIOutput (State state, RealNum time, Stats stats)
 
State get_state () const noexcept
 Gets the state at time factor. More...
 
RealNum get_t () const noexcept
 Gets time factor at which state occurs. More...
 
toi_iter_type get_toi_iters () const noexcept
 
dist_sum_type get_sum_dist_iters () const noexcept
 
dist_iter_type get_max_dist_iters () const noexcept
 
root_sum_type get_sum_root_iters () const noexcept
 
root_iter_type get_max_root_iters () const noexcept
 

Detailed Description

TimeOfImpact Output data.

Member Typedef Documentation

◆ dist_iter_type

using box2d::TOIOutput::dist_iter_type = std::remove_const<decltype(DefaultMaxDistanceIters)>::type

◆ dist_sum_type

◆ root_iter_type

using box2d::TOIOutput::root_iter_type = std::remove_const<decltype(DefaultMaxToiRootIters)>::type

◆ root_sum_type

◆ toi_iter_type

using box2d::TOIOutput::toi_iter_type = std::remove_const<decltype(DefaultMaxToiIters)>::type

◆ toi_sum_type

Member Enumeration Documentation

◆ State

enum box2d::TOIOutput::State : std::uint16_t
Enumerator
e_unknown 
e_failed 
e_overlapped 
e_touching 
e_separated 

Constructor & Destructor Documentation

◆ TOIOutput() [1/2]

box2d::TOIOutput::TOIOutput ( )
default

◆ TOIOutput() [2/2]

constexpr box2d::TOIOutput::TOIOutput ( State  state,
RealNum  time,
Stats  stats 
)
inline

Member Function Documentation

◆ get_max_dist_iters()

dist_iter_type box2d::TOIOutput::get_max_dist_iters ( ) const
inlinenoexcept

◆ get_max_root_iters()

root_iter_type box2d::TOIOutput::get_max_root_iters ( ) const
inlinenoexcept

◆ get_state()

State box2d::TOIOutput::get_state ( ) const
inlinenoexcept

Gets the state at time factor.

◆ get_sum_dist_iters()

dist_sum_type box2d::TOIOutput::get_sum_dist_iters ( ) const
inlinenoexcept

◆ get_sum_root_iters()

root_sum_type box2d::TOIOutput::get_sum_root_iters ( ) const
inlinenoexcept

◆ get_t()

RealNum box2d::TOIOutput::get_t ( ) const
inlinenoexcept

Gets time factor at which state occurs.

Returns
Time factor in range of [0,1] into the future.

◆ get_toi_iters()

toi_iter_type box2d::TOIOutput::get_toi_iters ( ) const
inlinenoexcept

The documentation for this class was generated from the following file: