Image Component Library (ICL)
Public Member Functions | Public Attributes | Friends | List of all members
icl::geom::Hit Struct Reference

utility structure that defines a hit between a ViewRay and SceneObjects More...

#include <Hit.h>

Public Member Functions

 Hit ()
 constructor (initializes obj with 0 and dist with -1) More...
 
bool operator< (const Hit &h) const
 for sorting by closest distance ot viewray origin More...
 
 operator bool () const
 can be used to check wheter there was a hit at all More...
 

Public Attributes

SceneObject * obj
 hit SceneObject More...
 
Vec pos
 exact position in the world where it was hit More...
 
float dist
 distance to the originating viewrays origin More...
 

Friends

std::ostream & operator<< (std::ostream &str, const Hit &h)
 friendly implemented ostream operator ... More...
 

Detailed Description

utility structure that defines a hit between a ViewRay and SceneObjects

Constructor & Destructor Documentation

◆ Hit()

icl::geom::Hit::Hit ( )
inline

constructor (initializes obj with 0 and dist with -1)

Member Function Documentation

◆ operator bool()

icl::geom::Hit::operator bool ( ) const
inline

can be used to check wheter there was a hit at all

◆ operator<()

bool icl::geom::Hit::operator< ( const Hit &  h) const
inline

for sorting by closest distance ot viewray origin

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  str,
const Hit &  h 
)
friend

friendly implemented ostream operator ...

Member Data Documentation

◆ dist

float icl::geom::Hit::dist

distance to the originating viewrays origin

◆ obj

SceneObject* icl::geom::Hit::obj

◆ pos

Vec icl::geom::Hit::pos

exact position in the world where it was hit


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