gk::RTTriangle Struct Reference

representation d'un triangle pour l'intersecteur rayon / triangle. More...

#include <RTTriangle.h>

List of all members.

Public Member Functions

 RTTriangle ()
 constructeur par defaut.
 RTTriangle (const Point &_a, const Point &_b, const Point &_c)
 construit un triangle connaissant ses 3 sommets.
 RTTriangle (const Triangle &triangle)
 construit un triangle a partir d'un triangle 'geometrique'.
 ~RTTriangle ()
 destructeur.
float getArea () const
BBox getBBox () const
void getTriangleNormal (Normal &n) const
 calcule la normale geometrique du triangle.
Normal getTriangleNormal () const
bool Intersect (const Ray &ray, const float htmax, float &rt, float &ru, float &rv) const
 intersection avec un rayon.

Public Attributes

Point a
Vector ab
Vector ac

Detailed Description

representation d'un triangle pour l'intersecteur rayon / triangle.


Member Function Documentation

bool gk::RTTriangle::Intersect ( const Ray ray,
const float  htmax,
float &  rt,
float &  ru,
float &  rv 
) const [inline]

intersection avec un rayon.

renvoie faux s'il n'y a pas d'intersection, une intersection peut exister mais peut ne pas se trouver dans [tmin tmax] du rayon. renvoie vrai + les coordonnees barycentriques du point d'intersection + sa position le long du rayon. convention barycentrique : t(u, v)= (1 - u - v) * a + u * b + v * c

"Fast, Minimum Storage Ray/Triangle Intersection" cf http://www.acm.org/jgt/papers/MollerTrumbore97/

References gk::Cross(), gk::Ray::d, gk::Dot(), and gk::Ray::o.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Friends
Generated on Mon Jan 9 15:57:18 2012 for gKitGL by  doxygen 1.6.3