COLLADA 1.4 DOM: domLight Class Reference

COLLADA

domLight Class Reference

#include <domLight.h>

Inheritance diagram for domLight:

Inheritance graph
[legend]
Collaboration diagram for domLight:

Collaboration graph
[legend]
List of all members.

Detailed Description

The light element declares a light source that illuminates the scene.

The light element may be referenced by an instance element to position and orient the light in the scene. A light that is not instantiated in the scene is not active. If the type attribute value is 'DIRECTIONAL' or 'SPOT' then the light's default direction vector in local coordinates is [0,0,-1], pointing down the -Z axis. If the type attribute value is 'POINT' or 'SPOT' then two additional param elements are required: one named 'ATTENUATION', and one named 'ATTENUATION_SCALE', as defined in the COMMON Profile. If the type attribute value is 'SPOT' then all the param elements required by 'POINT' are required. In addition three more param elements are required: one named 'ANGLE' for the cone shape, one named 'FALLOFF', and one named 'FALLOFF_SCALE', as defined in the COMMON Profile.

Public Member Functions

xsID getId () const
 Gets the id attribute.
void setId (xsID atId)
 Sets the id attribute.
xsNCName getName () const
 Gets the name attribute.
void setName (xsNCName atName)
 Sets the name attribute.
domLightType getType () const
 Gets the type attribute.
void setType (domLightType atType)
 Sets the type attribute.
const domAssetRef getAsset () const
 Gets the asset element.
domParam_ArraygetParam_array ()
 Gets the param element array.
const domParam_ArraygetParam_array () const
 Gets the param element array.

Static Public Member Functions

static daeElementRef create (daeInt bytes)
 Creates an instance of this class and returns a daeElementRef referencing it.
static daeMetaElementregisterElement ()
 Creates a daeMetaElement object that describes this element in the meta object reflection framework.

Static Public Attributes

static daeMetaElement_Meta = NULL
 The daeMetaElement that describes this element in the meta object reflection framework.

Protected Member Functions

 domLight ()
 Constructor.
virtual ~domLight ()
 Destructor.
 domLight (const domLight &cpy)
 Copy Constructor.
virtual domLightoperator= (const domLight &cpy)
 Overloaded assignment operator.

Protected Attributes

xsID attrId
 The id attribute is a text string containing the unique identifier of the light element.
xsNCName attrName
 The name attribute is the text string name of this element.
domLightType attrType
 The type attribute indicates the basic type of light source.
domAssetRef elemAsset
 The asset element may occur zero or one time.
domParam_Array elemParam_array
 The child param elements describe the values that the light contributes to a material's computation.

Member Function Documentation

daeElementRef domLight::create daeInt  bytes  )  [static]
 

Creates an instance of this class and returns a daeElementRef referencing it.

Parameters:
bytes The size allocated for this instance.
Returns:
a daeElementRef referencing an instance of this object.

const domAssetRef domLight::getAsset  )  const [inline]
 

Gets the asset element.

Returns:
a daeSmartRef to the asset element.

xsID domLight::getId  )  const [inline]
 

Gets the id attribute.

Returns:
Returns a xsID of the id attribute.

xsNCName domLight::getName  )  const [inline]
 

Gets the name attribute.

Returns:
Returns a xsNCName of the name attribute.

const domParam_Array& domLight::getParam_array  )  const [inline]
 

Gets the param element array.

Returns:
Returns a constant reference to the array of param elements.

domParam_Array& domLight::getParam_array  )  [inline]
 

Gets the param element array.

Returns:
Returns a reference to the array of param elements.

domLightType domLight::getType  )  const [inline]
 

Gets the type attribute.

Returns:
Returns a domLightType of the type attribute.

daeMetaElement * domLight::registerElement  )  [static]
 

Creates a daeMetaElement object that describes this element in the meta object reflection framework.

If a daeMetaElement already exists it will return that instead of creating a new one.

Returns:
A daeMetaElement describing this COLLADA element.

void domLight::setId xsID  atId  )  [inline]
 

Sets the id attribute.

Parameters:
atId The new value for the id attribute.

void domLight::setName xsNCName  atName  )  [inline]
 

Sets the name attribute.

Parameters:
atName The new value for the name attribute.

void domLight::setType domLightType  atType  )  [inline]
 

Sets the type attribute.

Parameters:
atType The new value for the type attribute.


Member Data Documentation

xsID domLight::attrId [protected]
 

The id attribute is a text string containing the unique identifier of the light element.

This value must be unique within the instance document. Optional attribute.

xsNCName domLight::attrName [protected]
 

The name attribute is the text string name of this element.

Optional attribute.

domLightType domLight::attrType [protected]
 

The type attribute indicates the basic type of light source.

The default value is 'POINT'. Optional attribute.

domAssetRef domLight::elemAsset [protected]
 

The asset element may occur zero or one time.

See also:
domAsset

domParam_Array domLight::elemParam_array [protected]
 

The child param elements describe the values that the light contributes to a material's computation.

The name attribute of one of the param elements must have the value 'COLOR' as it is defined in the COMMON Profile for all light types. The 'COLOR' value of the light element modulates the COMMON Profile parameters named 'AMBIENT', 'DIFFUSE', and 'SPECULAR' of a material element, according to the type attribute value of the light element. If the type attribute value is 'AMBIENT' then the material's 'AMBIENT' parameter is modulated. If the type attribute value is 'DIRECTIONAL', 'POINT', or 'SPOT' then the material's 'DIFFUSE' and 'SPECULAR' parmeters are modulated.

See also:
domParam


The documentation for this class was generated from the following files:
  • C:/SVN_wf/COLLADA_DOM/include/1.3/dom/domLight.h
  • C:/SVN_wf/COLLADA_DOM/src/1.3/dom/domLight.cpp

©2005 Sony Computer Entertainment Inc.. All Rights Reserved.
Generated on Fri Feb 10 16:48:47 2006 for COLLADA 1.4 DOM by doxygen 1.4.3