class Triangle

Trivial class to represent a triangle with its normal

Public Fields

[more]Vertex v[3]
The three vertexes

Public Methods

[more] Triangle()
Default constructor
[more] Triangle(Point3f const &v0, Point3f const &v1, Point3f const &v2)
Three Vertex constructor
[more]void CalcNormal()
Compute the normal of the face starting from the three vertexes and store it in the \Ref{n[]} member
[more]void Flip()
Flip the triangle
[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 vertex with normals and colors. Note that this is a very naive approach, we do not take into account that vertexes can be shared.

Version History

o Triangle()
Default constructor

o Triangle(Point3f const &v0, Point3f const &v1, Point3f const &v2)
Three Vertex constructor. It computes also the normals.

oVertex v[3]
The three vertexes

ovoid CalcNormal()
Compute the normal of the face starting from the three vertexes and store it in the \Ref{n[]} member

ovoid Flip()
Flip the triangle. And then recalculate the new (flat) normals

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++.