Light Class Reference
 
 
 
Light Class Reference

#include <xsi_light.h>


Class Description

The Light object represents a Softimage light, such as a point light or a spot light.

You can create lights with X3DObject::AddLight. To get an existing light from a LightRig, you can use LightRig::GetLight.

See also:
OGLLight
Example:
                using namespace XSI;
                Application app;
                Model root = app.GetActiveSceneRoot();

                Light myPointLight;
                root.AddLight( L"Point", false,L"MyLight" ,myPointLight );

                app.LogMessage( L"Light name: " + myPointLight.GetName() );
Inheritance diagram for Light:
Directed X3DObject SceneItem ProjectItem SIObject CBase

List of all members.

Public Member Functions

  Light ()
  ~Light ()
  Light (const CRef &in_ref)
  Light (const Light &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
Light operator= (const Light &in_obj)
Light operator= (const CRef &in_ref)
CRefArray  GetShaders () const
OGLLight  GetOGLLight () const
siShaderParameterType  GetShaderInputType (const CString &in_paramscriptname) const
CRefArray  FindShaders (const CString &in_filtername) const
CRefArray  GetAllShaders () const
CRefArray  GetAllImageClips () const

Constructor & Destructor Documentation

Light ( )

Constructs a Light object.

~Light ( )

Destroys a Light object.

Light ( const CRef in_ref )

Constructs a Light object from a CRef object.

Parameters:
in_ref A reference to a light.
Light ( const Light in_obj )

Constructs a new Light object from an existing Light object.

Parameters:
in_obj An existing Light object to copy into this Light object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns True if this object supports the functionality of a specified class. For example, a Light is a type of X3DObject, so a Light object supports X3DObject functionality.

Parameters:
in_ClassID Test if this object supports this class.
Returns:
True if this object supports the specified class, and false otherwise.

Reimplemented from Directed.

siClassID GetClassID ( ) const [virtual]

Returns the class ID for this object.

Returns:
The class ID.

Reimplemented from Directed.

Light& operator= ( const Light in_obj )

Assigns a Light object to an existing Light object.

Parameters:
in_obj A Light object to be copied into this object.
Returns:
The reinitialized Light object.
Light& operator= ( const CRef in_ref )

Assigns a CRef to this Light object. The Light object is cleared if the CRef is not a reference to an object that supports the Light class.

Parameters:
in_ref A reference to an object that supports the Light class.
Returns:
The reinitialized Light object.

Reimplemented from Directed.

CRefArray GetShaders ( ) const

Returns an array of references to the Shader objects connected to this light.

Returns:
An array of references to shader objects.
See also:
CRefArray, Shader
OGLLight GetOGLLight ( ) const

Returns the OGLLight for this light. The OGLLight object holds the light rendering information used by OpenGL.

Note:
The behavior of this method changed in Softimage 2013. Previously, OGLLight was being re-evaluated for each data request. As of Softimage 2013, a snapshot of the OGLLight parameters is taken when calling Light.GetOGLLight(). This means that Light.GetOGLLight() needs to be called again when parameters affecting the OGLLight are modified.
Returns:
The OGLLight for this light.
siShaderParameterType GetShaderInputType ( const CString in_paramscriptname ) const

Returns the input type of a light parameter. Before you connect a shader to the parameter, use Parameter::GetCapabilities to make sure that the parameter supports the siTexturable capability.

Parameters:
in_paramscriptname The script name of a parameter.
Returns:
The shader input type. If the parameter cannot be connected to a shader, siUnknownParameterType is returned.
Since:
5.0
CRefArray FindShaders ( const CString in_filtername ) const

Returns all shaders that match a filter. For example, you can write a custom Filter that matches shaders with texturespace and colormap parameters, and then use this custom filter with this function.

Parameters:
in_filtername The name of a shader Filter (for example, siShaderFilter).
Returns:
An array of shaders that match the filter.
Since:
5.0
CRefArray GetAllShaders ( ) const

Returns a list of shaders nested under this Light.

Returns:
CRefArray of references to the nested Shader objects.
Since:
7.0
CRefArray GetAllImageClips ( ) const

Returns a list of the image clips nested under this Light.

Returns:
CRefArray of references to the nested ImageClip2 objects.
See also:
Camera::GetAllImageClips, Material::GetAllImageClips, Pass:GetAllImageClips, Shader::GetAllImageClips, Override::GetAllImageClips
Since:
7.0

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