class Triangle

Trivial class to represent a triangle with its normal

Public Fields

[more]Point3f v[3]
The three vertexes
[more]Point3f N
The Normal of the face

Public Methods

[more]void CalcNormal()
Compute the normal of the face starting from the three vertexes and store it in the N member
[more]bool operator < ( Triangle const & p ) const
Less operator needed for stl containers
[more]bool operator == ( Triangle const & p ) const
Equal operator needed for some stl containers


Documentation

Trivial class to represent a triangle with its normal. For each triangle we store three point3f and a normal. Note that this is a very naive approach, we do not take into account that vertexes can be shared or that normal can be per vertex instead of per-face.
oPoint3f v[3]
The three vertexes

oPoint3f N
The Normal of the face

ovoid CalcNormal()
Compute the normal of the face starting from the three vertexes and store it in the N member

obool operator < ( Triangle const & p ) const
Less operator needed for stl containers

obool operator == ( Triangle const & p ) const
Equal operator needed for some stl containers


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.