Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

A3DL::Light Class Reference

#include <light.hh>

Inheritance diagram for A3DL::Light:

MetaObject List of all members.

Public Member Functions

Static Public Member Functions

Protected Attributes


Constructor & Destructor Documentation

Light::Light (  MetaObject *  superobject  ) 
 

Definition at line 29 of file light.cc.

Referenced by new_Light().

Light::~Light (   )  [virtual]
 

Definition at line 34 of file light.cc.


Member Function Documentation

void Light::getColor (  double &  r,
double &  g,
double &  b
)  throw (NoSuchObjectError) [virtual]
 

Get the light's color.

See setColor() for details.

Parameters:
r the red component
g the green component
b the blue component

Definition at line 105 of file light.cc.

void Light::getPosition (  double &  x,
double &  y,
double &  z
)  throw (NoSuchObjectError) [virtual]
 

Get position of this light.

Parameters:
x X translation, relative to origin of parent object
y Y translation, relative to origin of parent object
z Z translation, relative to origin of parent object
Exceptions:
NoSuchObjectError if "position" subobject does not exist, or is not a property.

Definition at line 50 of file light.cc.

PropertyAccessControl* A3DL::Light::getPropertyAccessControl (   )  [inline]
 

Definition at line 50 of file light.hh.

double Light::getRadius (   )  throw (NoSuchObjectError) [virtual]
 

Get light radius.

See setRadius() to see what this value means.

Returns:
the light radius

Definition at line 79 of file light.cc.

bool Light::getStatic (   )  throw (NoSuchObjectError) [virtual]
 

Get light's "static" property.

Definition at line 132 of file light.cc.

const string Light::getType (   )  [virtual]
 

Definition at line 165 of file light.cc.

virtual void A3DL::Light::initialize (   )  [inline, virtual]
 

Definition at line 115 of file light.hh.

void Light::initialize (  bool  is_static,
PropertyAccessControl *  access = NULL
)  [virtual]
 

Initialize subproperties: position=(0,0,0), radius=1, color=(1,1,1).

Parameters:
is_static If true, this will be a static light, and the properties cannot be changed. (Allows optimizations by rendering agent). Default is false.
access Access control object for subproperties. Default is none.
Warning:
sets No access control by default!

Definition at line 149 of file light.cc.

MetaObject * Light::new_Light (  MetaObject *  superobject,
const string &  type
)  [static]
 

Definition at line 160 of file light.cc.

void Light::registerExtenders (   )  [static]
 

Definition at line 170 of file light.cc.

void Light::setColor (  double  r,
double  g,
double  b
)  throw (NoSuchObjectError) [virtual]
 

Set the light's color.

Components are specified between 0 (black) and 1 (full saturation).

Parameters:
r the red component
g the green component
b the blue component

Definition at line 94 of file light.cc.

Referenced by initialize().

void Light::setPosition (  double  x,
double  y,
double  z
)  throw (NoSuchObjectError) [virtual]
 

Set position of this light.

Parameters:
x X translation, relative to origin of parent object
y Y translation, relative to origin of parent object
z Z translation, relative to origin of parent object
Exceptions:
NoSuchObjectError if "position" subobject does not exist, or is not a property.

Definition at line 38 of file light.cc.

Referenced by initialize().

void A3DL::Light::setPropertyAccessControl (  PropertyAccessControl *  pac  )  [inline]
 

Definition at line 49 of file light.hh.

void Light::setRadius (  double  r  )  throw (NoSuchObjectError) [virtual]
 

Set light radius.

Light falls off as a function of of the proportional distance between the center and radius distance. You could also think of this (along with the intensity or saturation of the light's color) it as a brightness factor.

Parameters:
r 
Exceptions:
NoSuchObjectError if "position" subobject does not exist, or is not a property.

Definition at line 70 of file light.cc.

Referenced by initialize().

void Light::setStatic (  bool  is_static  )  throw (NoSuchObjectError) [virtual]
 

Set light's "static" property.

Should only be set once, at creation.

Definition at line 118 of file light.cc.

Referenced by initialize().


Member Data Documentation

PropertyAccessControl* A3DL::Light::accesscontrol [protected]
 

Definition at line 44 of file light.hh.

Referenced by initialize().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:59 2003 for Interreality Project - VOS by doxygen 1.3.2