SmoothTriangle Class Reference

#include <SmoothTriangle.h>

Inheritance diagram for SmoothTriangle:

Triangle Primitive TexturedSmoothTriangle

Detailed Description

Inherits from Triangle. This Triangle represents a triangle with vertex normals.

Definition at line 16 of file SmoothTriangle.h.


Public Member Functions

 SmoothTriangle (Vector3D a, Vector3D b, Vector3D c)
 The constructor of the triangle.
 SmoothTriangle (Vector3D a, Vector3D b, Vector3D c, Vector3D na, Vector3D nb, Vector3D nc)
 The constructor of the triangle.
virtual ~SmoothTriangle ()
 Destructor.
void SetNormals (const Vector3D &_na, const Vector3D &_nb, const Vector3D &_nc)
 Sets the vertex normals.
Vector3D GetNormal (Ray &ray)
 Returns a smooth normal.

Private Attributes

Vector3D na
 The vertex normal of the first point of the triangle.
Vector3D nb
 The vertex normal of the second point of the triangle.
Vector3D nc
 The vertex normal of the third point of the triangle.

Constructor & Destructor Documentation

SmoothTriangle::SmoothTriangle ( Vector3D  a,
Vector3D  b,
Vector3D  c 
) [inline]

The constructor of the triangle.

Definition at line 43 of file SmoothTriangle.h.

SmoothTriangle::SmoothTriangle ( Vector3D  a,
Vector3D  b,
Vector3D  c,
Vector3D  na,
Vector3D  nb,
Vector3D  nc 
) [inline]

The constructor of the triangle.

Definition at line 51 of file SmoothTriangle.h.

virtual SmoothTriangle::~SmoothTriangle (  )  [inline, virtual]

Destructor.

Definition at line 56 of file SmoothTriangle.h.


Member Function Documentation

void SmoothTriangle::SetNormals ( const Vector3D _na,
const Vector3D _nb,
const Vector3D _nc 
) [inline]

Sets the vertex normals.

Definition at line 64 of file SmoothTriangle.h.

References na, nb, and nc.

Vector3D SmoothTriangle::GetNormal ( Ray ray  )  [inline, virtual]

Returns a smooth normal.

Reimplemented from Triangle.

Definition at line 75 of file SmoothTriangle.h.

References na, nb, nc, Vector3D::Normalized(), Ray::u, and Ray::v.


Field Documentation

Vector3D SmoothTriangle::na [private]

The vertex normal of the first point of the triangle.

Vector3D na

Definition at line 23 of file SmoothTriangle.h.

Referenced by GetNormal(), and SetNormals().

Vector3D SmoothTriangle::nb [private]

The vertex normal of the second point of the triangle.

Vector3D nb

Definition at line 29 of file SmoothTriangle.h.

Referenced by GetNormal(), and SetNormals().

Vector3D SmoothTriangle::nc [private]

The vertex normal of the third point of the triangle.

Vector3D nc

Definition at line 35 of file SmoothTriangle.h.

Referenced by GetNormal(), and SetNormals().


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 21:48:58 2008 for RayTracer by  doxygen 1.5.4