Cafu Engine
cf::ClipSys::TraceResultT Struct Reference

This class describes the result of tracing an object (a ray, a bounding-box, or a convex solid) through a collision model, a clip model, or a clip world. More...

#include "TraceResult.hpp"

Public Member Functions

 TraceResultT (double Fraction_=1.0)
 The constructor. More...
 

Public Attributes

double Fraction
 How much of the trace could be completed before a hit occurred (if any). More...
 
bool StartSolid
 Did the trace start in a solid part of the collision or clip model? More...
 
Vector3dT ImpactNormal
 On impact, this is the normal vector of the hit surface. More...
 
MaterialTMaterial
 The material at the point of impact. Can be NULL when an edge (i.e. a bevel plane) was hit. More...
 

Detailed Description

This class describes the result of tracing an object (a ray, a bounding-box, or a convex solid) through a collision model, a clip model, or a clip world.

  • If StartSolid is true, the trace started in solid. In this case, Fraction is accordingly set to 0.0.
  • If Fraction is smaller than the value that the trace was started with, something was hit along the trace. Fraction, ImpactNormal and Material provide details about the point of impact.
  • If Fraction did not change, the entire trace succeeded without hitting anything.

Constructor & Destructor Documentation

cf::ClipSys::TraceResultT::TraceResultT ( double  Fraction_ = 1.0)
inline

The constructor.

Member Data Documentation

double cf::ClipSys::TraceResultT::Fraction

How much of the trace could be completed before a hit occurred (if any).

Vector3dT cf::ClipSys::TraceResultT::ImpactNormal

On impact, this is the normal vector of the hit surface.

MaterialT* cf::ClipSys::TraceResultT::Material

The material at the point of impact. Can be NULL when an edge (i.e. a bevel plane) was hit.

bool cf::ClipSys::TraceResultT::StartSolid

Did the trace start in a solid part of the collision or clip model?


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