interreality.org [VOS]
[Home] [About]
[Screenshots]
[Download]
[News]
[Community]
[Documentation] [Manual]
[Bugs & Requests] [Wiki]

A3DL::Light Class Reference

#include <light.hh>

Inheritance diagram for A3DL::Light:

VOS::MetaObject VOS::Vobject VOS::Dispatchable VUtil::RefCounted csMetaLight List of all members.

Detailed Description

Definition at line 40 of file light.hh.

Public Member Functions

Static Public Member Functions


Constructor & Destructor Documentation

A3DL::Light::Light ( VOS::VobjectBase superobject  ) 

virtual A3DL::Light::~Light (  )  [virtual]


Member Function Documentation

virtual void A3DL::Light::doInitialize (  )  [virtual]

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

Reimplemented from VOS::MetaObject.

virtual void A3DL::Light::getColor ( float &  r,
float &  g,
float &  b 
) [virtual]

Get the light's color.

See setColor() for details.

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

virtual VUtil::vRef<VOS::Property> A3DL::Light::getColorObj (  )  [virtual]

virtual void A3DL::Light::getPosition ( double &  x,
double &  y,
double &  z 
) [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.

virtual VUtil::vRef<VOS::Property> A3DL::Light::getPositionObj (  )  [virtual]

virtual double A3DL::Light::getRadius (  )  [virtual]

Get light radius.

See setRadius() to see what this value means.

Returns:
the light radius

virtual VUtil::vRef<VOS::Property> A3DL::Light::getRadiusObj (  )  [virtual]

virtual bool A3DL::Light::getStatic (  )  [virtual]

Get light's "static" property.

virtual const std::string A3DL::Light::getVOSType (  )  [virtual]

Returns:
the specific VOS type name that represents the VOS interface this object is supplying. This should always be overridden by the subclass.

Reimplemented from VOS::MetaObject.

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

virtual void A3DL::Light::setColor ( float  r,
float  g,
float  b 
) [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

virtual void A3DL::Light::setPosition ( double  x,
double  y,
double  z 
) [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.

virtual void A3DL::Light::setRadius ( double  r  )  [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.

virtual void A3DL::Light::setStatic ( bool  is_static  )  [virtual]

Set light's "static" property.

Should only be set once, at creation.


The documentation for this class was generated from the following file: