librtl

rtl_csg Class Reference

Base class for constructive solid geometry. More...

#include <csg.h>

Inherits rtl_object.

Inherited by rtl_difference, rtl_intersection and rtl_union.

List of all members.

Public Members

Static Public Members

Protected Members

Static Protected Members


Detailed Description

Base class for constructive solid geometry.

This class implements the framework implementation necessary for all CSG classes. Each CSG operation that inherits from this class must implement:

combine

Note that instances objects derived from this class should never be passed to rtl_world::add(). Rather they should be built up with rtl_world::begin() and rtl_world::end() pairs of calls.

It is possible to derive from a class that derives from this class. For instance both the Cone and Cylinder classes inherit from rtl_intersection which inherits from rtl_csg. Please see the implementation of these classes to learn how to inherit from rtl_union, rtl_intersection and rtl_ifference.

Examples: rtl_union, rtl_intersection, rtl_difference


Member Function Documentation

rtl_object* rtl_csg::leftobject()

Returns the left object for this CSG tree.

rtl_object* rtl_csg::rightobject()

Returns the right object for this CSG tree.

Type rtl_csg::type() const

Reimplemented from rtl_object.

Reimplemented in rtl_cylinder and rtl_cone.

rtl_csg::rtl_csg( rtl_object*, rtl_object* ) [protected]

rtl_csg::~rtl_csg() [protected]

inline jFlt rtl_csg::lclintersect( const rtl_ray& ) [protected]

Reimplemented from rtl_object.

inline jNorm3 rtl_csg::lclnormal( const jVec3& ) [protected]

Reimplemented from rtl_object.

inline jFlt rtl_csg::rehit() [protected]

Reimplemented from rtl_object.

jVec2 rtl_csg::uv( const jVec3& p ) [protected]

Reimplemented from rtl_object.

Reimplemented in rtl_cylinder and rtl_cone.

inline jFlt rtl_csg::nexthit( const rtl_ray&, rtl_object*, jFlt, bool ) [protected]

inline void rtl_csg::newhit( rtl_object*, jFlt, jULng ) [protected]

inline void rtl_csg::processhits(bool, bool) [protected]

void rtl_csg::sethit( const csghit& hit, bool nn = false ) [protected]

virtual jFlt rtl_csg::combine() = 0 [protected, pure virtual]

Reimplemented in rtl_union, rtl_intersection and rtl_difference.

const jVec3& rtl_csg::objectspace() const [protected]

Reimplemented from rtl_object.

void rtl_csg::objectspace( const jVec3& osi ) [protected]

Reimplemented from rtl_object.

rtl_object* rtl_csg::laststruck() [protected]

Reimplemented from rtl_object.


Member Data Documentation

const jULng rtl_csg::Debug [static]

rtl_object* rtl_csg::left [protected]

rtl_object* rtl_csg::right [protected]

rtl_object* rtl_csg::struck [protected]

jInt rtl_csg::hitcnt [protected]

jInt rtl_csg::hiti [protected]

jInt rtl_csg::lhit [protected]

struct rtl_csg::csghit * rtl_csg::hits [protected]

const jULng rtl_csg::Left [static, protected]

const jULng rtl_csg::Right [static, protected]

const jULng rtl_csg::LeftEntrance [static, protected]

const jULng rtl_csg::LeftExit [static, protected]

const jULng rtl_csg::RightEntrance [static, protected]

const jULng rtl_csg::RightExit [static, protected]

const jFlt rtl_csg::Delta [static, protected]


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