coolray.org FAQ Contact Us
CoolRay Banner
CoolRay / Documentation
Main Page   Class Hierarchy   Compound List   Compound Members   Related Pages  

Object Class Reference

The base class for all raytracing objects. More...

#include <Object.h>

Inheritance diagram for Object

Inheritance graph
[legend]
List of all members.

Public Types

typedef Object thisclass
typedef Object baseclass
typedef RegClass<thisclass,
baseclass> 
MetaClass
enum  { is_abstract = true }

Public Methods

 Object ()
virtual ~Object ()
virtual ClassgetClass ()const
 Get the runtime class for this object instance. More...

virtual void setProperty (int nProperty,const Variant &vValue)
 Set the property of an object to a specified value. More...

virtual void getProperty (int nProperty,Variant &vValue)const
 Get the property of an object. More...

virtual void invokeMethod (int nMethod,int argc,Variant *args,Variant *pRetval=NULL)
 Invoke a method on an object. More...

virtual void acceptOperation (Visitor *pVisitor)
 acceptOperation(..) let a Visitor object perform a arbitrary operation on the object. More...

virtual void initStatistic (Statistic *pStatistic)
 basic statistic support.

virtual void initRender (Scene *pScene)
 Prepare for rendering. More...


Static Public Methods

const MethodInfo* clsGetMethodInfo (int &nMethodCount)

Friends

class  ObjectPointerBase

Detailed Description

The base class for all raytracing objects.


Member Function Documentation

void Object::acceptOperation ( Visitor * pVisitor ) [virtual]
 

acceptOperation(..) let a Visitor object perform a arbitrary operation on the object.

It's a implenmentation of the visitor pattern. First the doOperation() method of the Visitor is called and than all childs are traversed via acceptOperation. This allows easy traversal of "messages" to every object in a scene graph or a subtree.

Implementations call simply the base class implemenation an afterwards forward the call to all associated objects. NOTE: If object sharing is done one object might get the same acceptOperation call more than once.

Parameters:
pVisitor   the visitor

Class * Object::getClass ( ) const [inline, virtual]
 

Get the runtime class for this object instance.

Returns:
: the runtime class object for this object type

void Object::getProperty ( int nProperty,
Variant & vValue ) const [virtual]
 

Get the property of an object.

NOTE: The default implementation does nothing but throwing a NoSuchPropertyError exception.

Parameters:
nProperty   : the property id for this object to access
vValue   : a Variant receiving the value of the property
Exceptions:
NoSuchPropertyError  

void Object::initRender ( Scene * pScene ) [virtual]
 

Prepare for rendering.

This method is called on all objects before rendering starts. One time precalculations and initializations can be performed here.

void Object::invokeMethod ( int nMethod,
int argc,
Variant * args,
Variant * pRetval = NULL ) [virtual]
 

Invoke a method on an object.

NOTE: The default implementation does nothing but throwing a NoSuchMethodError exception.

Parameters:
nMethod   : the method id
argc   : number of arguments for the method
args   : pointer to an array of variants (the arguments)
retval   : pointer to retval (if there is one expected)
Exceptions:
NoSuchMethodError  

void Object::setProperty ( int nProperty,
const Variant & vValue ) [virtual]
 

Set the property of an object to a specified value.

NOTE: The default implementation does nothing but throwing a NoSuchPropertyError exception.

Parameters:
nProperty   : the property id for this object to access
vValue   : a Variant specifing the value for the property
Exceptions:
NoSuchPropertyError  


The documentation for this class was generated from the following file:
  • Object.h
You are visitor No.

counter

Copyright (c) 2001 Stefan Michel, All Rights Reserved.
Last modified: