Loading...
Searching...
No Matches
Ray< RealT >::TimeSpan Struct Reference

`#include <nanovdb/util/Ray.h>`

## Public Member Functions

__hostdev__ | TimeSpan ()
| Default constructor.
__hostdev__ | TimeSpan (RealT _t0, RealT _t1)
| Constructor.
__hostdev__ void | set (RealT _t0, RealT _t1)
| Set both times.
__hostdev__ void | get (RealT &_t0, RealT &_t1) const
| Get both times.
__hostdev__ bool | valid (RealT eps=Delta< RealT >::value()) const
| Return `true` if t1 is larger than t0 by at least eps.
__hostdev__ RealT | mid () const
| Return the midpoint of the ray.
__hostdev__ void | scale (RealT s)
| Multiplies both times.
__hostdev__ bool | test (RealT t) const
| Return `true` if time is inclusive.

## Public Attributes

RealT | t0
RealT | t1

## Constructor & Destructor Documentation

## TimeSpan() [1/2]

template<typename RealT>

__hostdev__ TimeSpan | ( |  | ) |

inline

Default constructor.

## TimeSpan() [2/2]

template<typename RealT>

__hostdev__ TimeSpan | ( | RealT | _t0,
|  | RealT | _t1 )

inline

Constructor.

## Member Function Documentation

## get()

template<typename RealT>

__hostdev__ void get | ( | RealT & | _t0,
|  | RealT & | _t1 ) const

inline

Get both times.

## mid()

template<typename RealT>

__hostdev__ RealT mid | ( |  | ) | const

inline

Return the midpoint of the ray.

## scale()

template<typename RealT>

__hostdev__ void scale | ( | RealT | s | ) |

inline

Multiplies both times.

## set()

template<typename RealT>

__hostdev__ void set | ( | RealT | _t0,
|  | RealT | _t1 )

inline

Set both times.

## test()

template<typename RealT>

__hostdev__ bool test | ( | RealT | t | ) | const

inline

Return `true` if time is inclusive.

## valid()

template<typename RealT>

__hostdev__ bool valid | ( | RealT | eps = Delta<RealT>::value() | ) | const

inline

Return `true` if t1 is larger than t0 by at least eps.

## Member Data Documentation

## t0

template<typename RealT>

RealT t0

## t1

template<typename RealT>

RealT t1