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

RayGina::CORE::RobSphere Class Reference

#include <RobSphere.hxx>

Inheritance diagram for RayGina::CORE::RobSphere:

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

Public Member Functions

virtual const RExtensiongetInstanceExtension () const
 RobSphere (const RVec3r origin=RVec3r(0.0, 0.0, 0.0), const RReal radius=1.0)
 init a sphere with the given attributes
virtual ~RobSphere ()
 destructor
void setRadius (const RReal radius)
 sets the radius of the sphere
void setOrigin (const RVec3r origin)
 sets the origin of the sphere
RReal getRadius () const
 returns the radius of the sphere
RVec3r getOrigin () const
 return the origin of the sphere
RssBasegetSurfaceShader () const
 Method to get the shader used for rendering the object.
const RStatus setSurfaceShader (RssBase *newShader)
 return the origin of the sphere
virtual const RStatus setVolumeShader (RvsBase *newVolumeShader)
 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 const RBool intersect (RRay *ray)
 returns true if there is an intersection with the object and the given
virtual const RBool occlude (const RRay *ray)
 returns true if there is an intersection with the object and the given
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)
 returns true if there is an intersection with the object and the given
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

Static Public Member Functions

const RExtension__getExtension ()

Static Private Member Functions

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

Private Attributes

RVec3r _Origin
RReal _radius
RReal _squareRadius
RssBase_s_shader
RvsBase_v_shader

Static Private Attributes

const RExtension _extensionData

Constructor & Destructor Documentation

RayGina::CORE::RobSphere::RobSphere const RVec3r  origin = RVec3r(0.0,0.0,0.0),
const RReal  radius = 1.0
[inline]
 

init a sphere with the given attributes

Definition at line 47 of file RobSphere.hxx.

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

destructor

Definition at line 51 of file RobSphere.hxx.


Member Function Documentation

const RExtension* RayGina::CORE::RobSphere::__getExtension  )  [inline, static]
 

Definition at line 40 of file RobSphere.hxx.

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

Definition at line 16 of file RobSphere.hxx.

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

Definition at line 20 of file RobSphere.hxx.

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

Definition at line 23 of file RobSphere.hxx.

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

Implements RayGina::CORE::RobGeometry.

Definition at line 112 of file RobSphere.hxx.

virtual const RExtension* RayGina::CORE::RobSphere::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 37 of file RobSphere.hxx.

const RVec3r RobSphere::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 63 of file RobSphere.cxx.

RVec3r RayGina::CORE::RobSphere::getOrigin  )  const [inline]
 

return the origin of the sphere

Definition at line 67 of file RobSphere.hxx.

RReal RayGina::CORE::RobSphere::getRadius  )  const [inline]
 

returns the radius of the sphere

Definition at line 63 of file RobSphere.hxx.

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

returns true if there is an intersection with the object and the given

Implements RayGina::CORE::RobGeometry.

Definition at line 107 of file RobSphere.hxx.

RssBase* RayGina::CORE::RobSphere::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 71 of file RobSphere.hxx.

virtual const RVec2r RayGina::CORE::RobSphere::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 94 of file RobSphere.hxx.

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

Definition at line 83 of file RobSphere.hxx.

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

returns true if there is an intersection with the object and the given

Implements RayGina::CORE::RobGeometry.

Definition at line 20 of file RobSphere.cxx.

const RBool RobSphere::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 77 of file RobSphere.cxx.

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

returns true if there is an intersection with the object and the given

Implements RayGina::CORE::RobGeometry.

Definition at line 42 of file RobSphere.cxx.

void RayGina::CORE::RobSphere::setOrigin const RVec3r  origin  )  [inline]
 

sets the origin of the sphere

Definition at line 58 of file RobSphere.hxx.

void RayGina::CORE::RobSphere::setRadius const RReal  radius  )  [inline]
 

sets the radius of the sphere

Definition at line 54 of file RobSphere.hxx.

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

return the origin of the sphere

Implements RayGina::CORE::RobGeometry.

Definition at line 75 of file RobSphere.hxx.

virtual const RStatus RayGina::CORE::RobSphere::setVolumeShader RvsBase newVolumeShader  )  [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 79 of file RobSphere.hxx.


Member Data Documentation

const RExtension RobSphere::_extensionData [static, private]
 

Initial value:

 RExtension(RExtension::SUPERCLASSID_PRIMITIVE,
                                                                                                                                1004,
                                                                                                                                1,
                                                                                                                                1,
                                                                                                                                "Sphere",
                                                                                                                                "RobSphere",
                                                                                                                                "rayGina::CORE::Team",
                                                                                                                                "core@raygina.de",
                                                                                                                                "www.raygina.de",
                                                                                                                                RobSphere::_createInstance,
                                                                                                                                RobSphere::_initialize)

Definition at line 8 of file RobSphere.cxx.

RVec3r RayGina::CORE::RobSphere::_Origin [private]
 

Definition at line 30 of file RobSphere.hxx.

RReal RayGina::CORE::RobSphere::_radius [private]
 

Definition at line 31 of file RobSphere.hxx.

RssBase* RayGina::CORE::RobSphere::_s_shader [private]
 

Definition at line 33 of file RobSphere.hxx.

RReal RayGina::CORE::RobSphere::_squareRadius [private]
 

Definition at line 32 of file RobSphere.hxx.

RvsBase* RayGina::CORE::RobSphere::_v_shader [private]
 

Definition at line 34 of file RobSphere.hxx.


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