Main Page | Class Hierarchy | Class List | File List | Class Members

TrianglePatch Class Reference

#include <trianglepatch.h>

Inheritance diagram for TrianglePatch:

SurfacePatch3D List of all members.

Public Member Functions

 TrianglePatch (Vector3 *edge1, Vector3 *edge2, Vector3 *edge3)
SurfacePatch3Dduplicate () const
bool hasFinitBounding () const
Vector3 getBoundingMin () const
Vector3 getBoundingMax () const
DBL intersectBounding (const Ray &r) const
DBL intersectBounding (const Ray &r, DBL tmax) const
IntersectionintersectLimitedTime (const Ray &r, DBL maxtime) const

Detailed Description

A single triangle for a mesh (SharedPointPatchObject).
Author:
Micha Riser


Constructor & Destructor Documentation

TrianglePatch::TrianglePatch Vector3 edge1,
Vector3 edge2,
Vector3 edge3
[inline]
 

Creates triangle that can share its vertices with others.


Member Function Documentation

SurfacePatch3D * TrianglePatch::duplicate  )  const [virtual]
 

Create a duplicate of the object. Must be of the same type!

Returns:
An exact duplicate of the object.

Implements SurfacePatch3D.

Vector3 TrianglePatch::getBoundingMax  )  const [virtual]
 

Get bounding dimension (maximum edge).

Implements SurfacePatch3D.

Vector3 TrianglePatch::getBoundingMin  )  const [virtual]
 

Get bounding dimension (minimum edge).

Implements SurfacePatch3D.

bool TrianglePatch::hasFinitBounding  )  const [virtual]
 

Returns true if the surface can be enclosed by a finit box.

Implements SurfacePatch3D.

DBL TrianglePatch::intersectBounding const Ray r,
DBL  tmax
const [virtual]
 

Intersect Bounding with Ray limited to maximum time.

Parameters:
r the Ray
tmax Maximum intersection time.
Returns:
-1 if no intersection, INTERSECTION_TIME_EPSILON if Ray's origin is inside the bounding. Otherwise it returns the time of first intersection with box.

Implements SurfacePatch3D.

DBL TrianglePatch::intersectBounding const Ray r  )  const [virtual]
 

Intersect Bounding with Ray.

Parameters:
r the Ray
Returns:
-1 if no intersection, INTERSECTION_TIME_EPSILON if Ray's origin is inside the bounding. Otherwise it returns the time of first intersection with box.

Implements SurfacePatch3D.

Intersection * TrianglePatch::intersectLimitedTime const Ray r,
DBL  maxtime
const [virtual]
 

Intersect object with ray limited to maximum time.

Parameters:
r the Ray
maxtime maximal intersecting time
Returns:
0 if no intersection else Intersection object

Implements SurfacePatch3D.


The documentation for this class was generated from the following files:
Generated on Thu Jan 27 12:16:07 2005 for raytracer.kdevelop by doxygen 1.3.8