librtl

rtl_triangle Class Reference

A renderable object which can be grouped with other triangles. More...

#include <polyhedron.h>

Inherits rtl_groupmem.

List of all members.

Public Members

Protected Members


Detailed Description

A renderable object which can be grouped with other triangles.


Member Function Documentation

rtl_triangle::rtl_triangle( rtl_polyhedron*, jUInt, jUInt, jUInt )

Constructs a triangle from the three vertices that are indicis into the table in the given polyhedron. The face normal is calculated assuming that the vertices are in clock-wise order.

jInt rtl_triangle::vertex( jByte i ) const

Returns the index for the ith vertex in the triangle, i must be in 0..2.

rtl_material* rtl_triangle::material()

Returns the material for this group member. Returns the default value from the base class if the index has not been set. The material returned depends if the last intersection hit the back face of the polygon.

Reimplemented from rtl_subobject.

void rtl_triangle::backrtl_materialindex( jInt i )

Set the material for the back face.

const rtl_polyhedron* rtl_triangle::poly() const [protected]

const rtl_polyhedron* rtl_triangle::poly() const [protected]

jFlt rtl_triangle::intersect( const rtl_ray&, bool = false ) [protected]

Reimplemented from rtl_subobject.

bool rtl_triangle::volintersect( const jBBox& ) const [protected]

Reimplemented from rtl_subobject.

jNorm3 rtl_triangle::normal() [protected]

Reimplemented from rtl_subobject.


Member Data Documentation

jNorm3 rtl_triangle::N [protected]

The face normal for the triangle.

jInt rtl_triangle::bm_idx [protected]

Back face material for the triangle.

jByte rtl_triangle::i1 [protected]

Non-major axis indices of polygon normal.

jByte rtl_triangle::i2 [protected]

Non-major axis indices of polygon normal.

jFlt rtl_triangle::d [protected]

Discriminant of face direction.

jUInt rtl_triangle::p[3] [protected]

Indices into the vertex array in the polyhedron.


The documentation for this class was generated from the following file:
JSP / librtl v0.2 mtigges@cpsc.ucalgary.ca