Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

RayGina::CORE::RobAABB Class Reference

The Abstract base class for all renderable objects in rayGina. More...

#include <RobAABB.hxx>

Inheritance diagram for RayGina::CORE::RobAABB:

RayGina::CORE::RobGeometry RayGina::CORE::RobBase RayGina::CORE::RObject List of all members.

Public Member Functions

virtual const RExtensiongetInstanceExtension () const
 RobAABB (RVec3f min=RVec3f(-1,-1,-1), RVec3f max=RVec3f(1, 1, 1), RssBase *shader=NULL)
 RobAABB (RobAABB &old)
 RobAABB (RobAABB *old)
virtual ~RobAABB ()
virtual const RBool intersect (RRay *ray)
 Methode to calc the intersection of an object with a single ray.
virtual const RBool occlude (const RRay *ray)
 Method to calc the intersection of an object with a single shadow ray.
virtual const RVec3r getNormal (RRay *ray)
 get the normal from the object according to the given ray
virtual const RVec2r getUV (RRay *ray)
 get the uv from the object according to the given ray
virtual const RBool getRenderObjects (RobAccelerator *renderlist)
 adds several objects to the list that describe the geometry or the instance itself on simple objects
virtual const RStatus setSurfaceShader (RssBase *newShader)
 This methids sets the surface shader for the object that will be used when a valid intersection is found with this object.
virtual const RStatus setVolumeShader (RvsBase *newShader)
 This methods sets the volume shader for the object that will be used when a valid intersection is found with this object.
virtual RvsBasegetVolumeShader ()
virtual RssBasegetSurfaceShader () const
 Method to get the shader used for rendering the object.
virtual const RBool intersectAABB (RobAABB *voxel) const
 Check for intersections of the object with a given axis-aligned-box.
virtual const RStatus getBoundingAABB (RobAABB *theBB) const
RVec3f getMin () const
void setMin (RVec3f newMin)
RVec3f getMax () const
void setMax (RVec3f newMax)
void setMinMax (RVec3f newMin, RVec3f newMax)
bool Clip (const RRay ray, RReal32 &t0, RReal32 &t1, RVec3f &den) const
void grow (const RobAABB bb2)
void growAll (const RReal32 add)
void shrinkAll (const RReal32 add)

Static Private Member Functions

RObject_createInstance ()
RatStaticContainer_getAttributes ()
const RStatus _initialize (RatStaticContainer *attributes)

Private Attributes

RVec3f _min
RVec3f _max
RssBase_shader

Static Private Attributes

const RExtension _extensionData

Detailed Description

The Abstract base class for all renderable objects in rayGina.

This abstract class provides the interface to be implemented by a renderable rayGina object.

Author:
rayGina::CORE Developers

Definition at line 18 of file RobAABB.hxx.


Constructor & Destructor Documentation

RayGina::CORE::RobAABB::RobAABB RVec3f  min = RVec3f(-1,-1,-1),
RVec3f  max = RVec3f(1,1,1),
RssBase shader = NULL
[inline]
 

Definition at line 43 of file RobAABB.hxx.

RayGina::CORE::RobAABB::RobAABB RobAABB old  )  [inline]
 

Definition at line 44 of file RobAABB.hxx.

RayGina::CORE::RobAABB::RobAABB RobAABB old  )  [inline]
 

Definition at line 45 of file RobAABB.hxx.

virtual RayGina::CORE::RobAABB::~RobAABB  )  [inline, virtual]
 

Definition at line 46 of file RobAABB.hxx.


Member Function Documentation

RObject* RayGina::CORE::RobAABB::_createInstance  )  [inline, static, private]
 

Definition at line 21 of file RobAABB.hxx.

RatStaticContainer* RayGina::CORE::RobAABB::_getAttributes  )  [inline, static, private]
 

Definition at line 25 of file RobAABB.hxx.

const RStatus RayGina::CORE::RobAABB::_initialize RatStaticContainer attributes  )  [inline, static, private]
 

Definition at line 28 of file RobAABB.hxx.

bool RayGina::CORE::RobAABB::Clip const RRay  ray,
RReal32 t0,
RReal32 t1,
RVec3f den
const [inline]
 

Definition at line 135 of file RobAABB.hxx.

virtual const RStatus RayGina::CORE::RobAABB::getBoundingAABB RobAABB theBB  )  const [inline, virtual]
 

Implements RayGina::CORE::RobGeometry.

Definition at line 108 of file RobAABB.hxx.

virtual const RExtension* RayGina::CORE::RobAABB::getInstanceExtension  )  const [inline, virtual]
 

returns the RExtension for the instance If it returns NULL this instance is not able to act as an extension

Implements RayGina::CORE::RObject.

Definition at line 38 of file RobAABB.hxx.

RVec3f RayGina::CORE::RobAABB::getMax  )  const [inline]
 

Definition at line 124 of file RobAABB.hxx.

RVec3f RayGina::CORE::RobAABB::getMin  )  const [inline]
 

Definition at line 118 of file RobAABB.hxx.

const RVec3r RobAABB::getNormal RRay ray  )  [virtual]
 

get the normal from the object according to the given ray

returns the normal from the surface according to the last intersection tes with the given ray THE GIVEN RAY MUST BE THE SAME LIKE THE ONE YOU PERFORMED THE LAST INTESECTION TEST WITH THE OBJECT!!

Implements RayGina::CORE::RobGeometry.

Definition at line 29 of file RobAABB.cxx.

virtual const RBool RayGina::CORE::RobAABB::getRenderObjects RobAccelerator renderlist  )  [inline, virtual]
 

adds several objects to the list that describe the geometry or the instance itself on simple objects

This method is for complex objects, compound objects or objects that needs a tesselation for efficient rayTracing It adds a representation of the object in the list by using one or more other geometries. Example: A tessalation of a NURBS-patch could add lots of triangles which approximate the NURBS-patch

Implements RayGina::CORE::RobGeometry.

Definition at line 75 of file RobAABB.hxx.

virtual RssBase* RayGina::CORE::RobAABB::getSurfaceShader  )  const [inline, virtual]
 

Method to get the shader used for rendering the object.

Every object can use a separate shader, so you can use this method to get the stored shader for this object and so you can use it for shading calculations.

Returns:
The pointer to the used shader; if there is no shader available the return value is NULL

Implements RayGina::CORE::RobGeometry.

Definition at line 100 of file RobAABB.hxx.

virtual const RVec2r RayGina::CORE::RobAABB::getUV RRay ray  )  [inline, virtual]
 

get the uv from the object according to the given ray

returns the uv from the surface according to the last intersection tes with the given ray THE GIVEN RAY MUST BE THE SAME LIKE THE ONE YOU PERFORMED THE LAST INTESECTION TEST WITH THE OBJECT!!

Implements RayGina::CORE::RobGeometry.

Definition at line 65 of file RobAABB.hxx.

virtual RvsBase* RayGina::CORE::RobAABB::getVolumeShader  )  [inline, virtual]
 

Definition at line 92 of file RobAABB.hxx.

void RayGina::CORE::RobAABB::grow const RobAABB  bb2  )  [inline]
 

Definition at line 206 of file RobAABB.hxx.

void RayGina::CORE::RobAABB::growAll const RReal32  add  )  [inline]
 

Definition at line 214 of file RobAABB.hxx.

const RBool RobAABB::intersect RRay ray  )  [virtual]
 

Methode to calc the intersection of an object with a single ray.

Parameters:
ray a pointer to the ray used for intersection calculation
Return values:
true if the ray intersects the objeect and stores infos about intersection point within the ray
false if there is no intersection between the ray and the object => no raydata is been modified

Implements RayGina::CORE::RobGeometry.

Definition at line 19 of file RobAABB.cxx.

const RBool RobAABB::intersectAABB RobAABB voxel  )  const [virtual]
 

Check for intersections of the object with a given axis-aligned-box.

Performs a intersection test with a axis-aligned bounding-volume Needed for generation of acceleration strcutures

Implements RayGina::CORE::RobGeometry.

Definition at line 34 of file RobAABB.cxx.

const RBool RobAABB::occlude const RRay ray  )  [virtual]
 

Method to calc the intersection of an object with a single shadow ray.

returns true if there is an intersection with the object and the given ray but NO other information like distance are saved in the ray

Implements RayGina::CORE::RobGeometry.

Definition at line 24 of file RobAABB.cxx.

void RayGina::CORE::RobAABB::setMax RVec3f  newMax  )  [inline]
 

Definition at line 127 of file RobAABB.hxx.

void RayGina::CORE::RobAABB::setMin RVec3f  newMin  )  [inline]
 

Definition at line 121 of file RobAABB.hxx.

void RayGina::CORE::RobAABB::setMinMax RVec3f  newMin,
RVec3f  newMax
[inline]
 

Definition at line 130 of file RobAABB.hxx.

virtual const RStatus RayGina::CORE::RobAABB::setSurfaceShader RssBase newShader  )  [inline, virtual]
 

This methids sets the surface shader for the object that will be used when a valid intersection is found with this object.

attach a shader to the object, the previous one will be overwritten (BUT NOT DELETED!) (ONLY 1 shader per object)

Parameters:
newShader DESCRIPTION!!!

Implements RayGina::CORE::RobGeometry.

Definition at line 84 of file RobAABB.hxx.

virtual const RStatus RayGina::CORE::RobAABB::setVolumeShader RvsBase newShader  )  [inline, virtual]
 

This methods sets the volume shader for the object that will be used when a valid intersection is found with this object.

attach a shader to the object, the previous one will be overwritten (BUT NOT DELETED!) (ONLY 1 shader per object)

Parameters:
newShader DESCRIPTION!!!

Implements RayGina::CORE::RobGeometry.

Definition at line 89 of file RobAABB.hxx.

void RayGina::CORE::RobAABB::shrinkAll const RReal32  add  )  [inline]
 

Definition at line 222 of file RobAABB.hxx.


Member Data Documentation

const RExtension RobAABB::_extensionData [static, private]
 

Initial value:

 RExtension(RExtension::SUPERCLASSID_PRIMITIVE,
                                                                                                                                1001,
                                                                                                                                1,
                                                                                                                                1,
                                                                                                                                "Axis-Aligned Bounding-Volume",
                                                                                                                                "RobAABB",
                                                                                                                                "rayGina::CORE::Team",
                                                                                                                                "core@raygina.de",
                                                                                                                                "www.raygina.de",
                                                                                                                                RobAABB::_createInstance,
                                                                                                                                RobAABB::_initialize)

Definition at line 7 of file RobAABB.cxx.

RVec3f RayGina::CORE::RobAABB::_max [private]
 

Definition at line 33 of file RobAABB.hxx.

RVec3f RayGina::CORE::RobAABB::_min [private]
 

Definition at line 32 of file RobAABB.hxx.

RssBase* RayGina::CORE::RobAABB::_shader [private]
 

Definition at line 34 of file RobAABB.hxx.


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 17:01:10 2007 for rayGina by  doxygen 1.3.9.1