QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::RayInfo Struct Reference
[QServer]

Information returned successful ray casts. More...

#include <Q/q.h>

List of all members.

Public Member Functions

 RayInfo ()
bool valid () const
const Instanceinstance () const
Instanceinstance ()
Maths::Vec3f coord () const
Maths::Vec3f normal () const
float distance () const
const Shadershader () const
Shadershader ()
unsigned int index () const
void setValid (bool v)
void setInstance (const Instance &i)
void setCoord (const Maths::Vec3f &v)
void setDistance (float dist)
void setNormal (const Maths::Vec3f &v)
void setShader (const Shader &s)
void setIndex (unsigned int i)


Detailed Description

Information returned successful ray casts.

The RayInfo structure represents the information returned from a ray test.

See also:
CameraLayer, Zone


Constructor & Destructor Documentation

Q::RayInfo::RayInfo  )  [inline]
 

Create a new ray info structure.


Member Function Documentation

Maths::Vec3f Q::RayInfo::coord  )  const [inline]
 

Return the world coordinate in the scene where the ray intersected the object.

float Q::RayInfo::distance  )  const [inline]
 

Return the distance from the ray's origin to the hit point.

unsigned int Q::RayInfo::index  )  const [inline]
 

Return the index of the component within a compound instance (e.g. a ClusterInstance) which this ray hit. For non-compound instances, the index will always be zero.

Instance& Q::RayInfo::instance  )  [inline]
 

Return the instance object which the ray hit.

const Instance& Q::RayInfo::instance  )  const [inline]
 

Return the instance object which the ray hit.

Maths::Vec3f Q::RayInfo::normal  )  const [inline]
 

Return the normal vector (in world coordinates) at the point where the ray intersected the object.

void Q::RayInfo::setCoord const Maths::Vec3f v  )  [inline]
 

Set the ray info's world coordinate.

void Q::RayInfo::setDistance float  dist  )  [inline]
 

Set the ray info's distance.

void Q::RayInfo::setIndex unsigned int  i  )  [inline]
 

Set the component index for a ray which hits a compound instance.

void Q::RayInfo::setInstance const Instance i  )  [inline]
 

Set the ray info's instance.

void Q::RayInfo::setNormal const Maths::Vec3f v  )  [inline]
 

Set the ray info's world normal.

void Q::RayInfo::setShader const Shader s  )  [inline]
 

Set the ray info's shader.

void Q::RayInfo::setValid bool  v  )  [inline]
 

Set the ray info's valid flag.

Shader& Q::RayInfo::shader  )  [inline]
 

Return the shader used for the triangle at the hit point.

const Shader& Q::RayInfo::shader  )  const [inline]
 

Return the shader used for the triangle at the hit point.

bool Q::RayInfo::valid  )  const [inline]
 

Return true if the ray info represents a valid object, i.e. the ray test hit some object within the scene.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004