VisualizationFoundation CAT3DLightSourceRep

Usage: you must use this class as is. You should never derive it.


public class CAT3DLightSourceRep

Class to create light source representations.
Role: A light source representation indicates the position and orientation of lights in the viewer. A light source representation can be of two different types :

  1. LS_INFINITE infinitely distant like the sun,
  2. LS_SPOT spotlight with a cutoff angle between 0 and 90 degrees, or equal to 180 degrees (lightbulb equivalent)
A light source representation can be of two differents modes :
  1. Local attached to the viewpoint
  2. Global attached to the model
By default, one light source is created and activated. A viewer can handle a maximum of eight light source representations.


Constructor and Destructor Index


o CAT3DLightSourceRep()
o CAT3DLightSourceRep(CAT3DLightSourceRep&)
o CAT3DLightSourceRep(CATLightSourceType,CATLightSourceMode,CATMathPointf&,CATMathDirectionf&,float)
o ~CAT3DLightSourceRep()

Method Index


o CreateRep()
Constructs an empty light source graphic representation.
o CreateRep(CAT3DLightSourceRep&)
Copy constructor.
o CreateRep(CATLightSourceType,CATLightSourceMode,CATMathPointf&,CATMathDirectionf&,float)
Constructs the representation of a light source.
o GetAttenuationParameters(float&,float&,float&)
Retrieves the attenuation parameters of the light source representation.
o GetColorParameters(float**,float**,float**)
Retrieves the color components of the light source representation.
o GetLocationParameters(CATMathPointf&,CATMathDirectionf&)
Retrieves the location and direction of a light source representation.
o GetMode(CATLightSourceMode&)
Retrieves the mode of the light source.
o GetSpotLightParameters(float&,float&)
Retrieves the specific parameters of a spotlight source representation.
o GetType(CATLightSourceType&)
Retrieves the type of the light source.
o SetAttenuationParameters(float,float,float)
Sets the attenuation parameters of the light source representation.
o SetColorParameters(float*,float*,float*)
Sets the color components of the light source representation.
o SetLocationParameters(CATMathPointf&,CATMathDirectionf&)
Sets the location and direction of a light source representation.
o SetMode(CATLightSourceMode)
Sets the mode of the light source representation.
o SetSpotLightParameters(float,float)
Sets the specific parameters of a spotlight source representation.
o SetType(CATLightSourceType)
Sets the type of the light source representation.
o operator =(CAT3DLightSourceRep&)
Assignement operator.

Constructor and Destructor


o CAT3DLightSourceRep
public CAT3DLightSourceRep()
Deprecated:
R417 : Use CreateRep instead.
o CAT3DLightSourceRep
public CAT3DLightSourceRep( const iLightSourceRep)
Deprecated:
R417 : Use CreateRep instead.
o CAT3DLightSourceRep
public CAT3DLightSourceRep( const iType,
const iMode,
const iOrigin,
const iDirection,
const iSpotAngle= 180.f)
Deprecated:
R417 : Use CreateRep instead.
o ~CAT3DLightSourceRep
public virtual ~CAT3DLightSourceRep()

Methods


o CreateRep
public static CreateRep()
Constructs an empty light source graphic representation.
o CreateRep
public static CreateRep( const iLightSourceRep)
Copy constructor.
Parameters:
iLightSourceRep
The light source representation to be duplicated
o CreateRep
public static CreateRep( const iType,
const iMode,
const iOrigin,
const iDirection,
const iSpotAngle= 180.f)
Constructs the representation of a light source.
Parameters:
iType
The type of the light source.
iMode
The mode of the light source.
iOrigin
The location of the light source.
iDirection
The direction of the light source.
iSpotAngle
The cutoff angle of a spotlight.
Legal Values: in the range [0,90] or 180.
Default Value: 180. This constructs an equivalent to a lightbulb.
o GetAttenuationParameters
public GetAttenuationParameters( oConstant,
oLinear,
oQuadratic)
Retrieves the attenuation parameters of the light source representation.
Parameters:
oConstant
The constant factor of the attenuation function.
oLinear
The light factor of the attenuation function.
oQuadratic
The quadratic factor of the attenuation function.
o GetColorParameters
public GetColorParameters( const oAmbient,
const oDiffuse,
const oSpecular)
Retrieves the color components of the light source representation. All float values are in [0,1].
Parameters:
oAmbient
Red, green, blue and alpha values of ambient component.
oDiffuse
Red, green, blue and alpha values of diffuse component.
oSpecular
Red, green, blue and alpha values of specular component.
o GetLocationParameters
public GetLocationParameters( oOrigin,
oDirection)
Retrieves the location and direction of a light source representation.
Parameters:
oOrigin
The point where the light source is located. This parameter has no meaning for LS_INFINITE>/tt> light source representations.
oDirection
The direction of the light source.
o GetMode
public GetMode( oMode)
Retrieves the mode of the light source.
Parameters:
oMode
The mode of the light source representation.
o GetSpotLightParameters
public GetSpotLightParameters( oSpotAngle,
oSpotExponent)
Retrieves the specific parameters of a spotlight source representation. This method has no meaning for LS_INFINITE light source representations.
Parameters:
oSpotAngle
The half-angle aperture of the cone of the spotlight.
oSpotExponent
The exponent value used for specular component calculations.
o GetType
public GetType( oType)
Retrieves the type of the light source.
Parameters:
oType
The type of the light source representation.
o SetAttenuationParameters
public SetAttenuationParameters( const iConstant,
const iLinear,
const iQuadratic)
Sets the attenuation parameters of the light source representation.
Parameters:
iConstant
The constant parameter of the attenuation function
iLinear
The light parameter of the attenuation function
iQuadratic
The quadratic parameter of the attenuation function
o SetColorParameters
public SetColorParameters( const iAmbient,
const iDiffuse,
const iSpecular)
Sets the color components of the light source representation. All float values are in [0,1].
Parameters:
iAmbient
Red, green, blue and alpha values of ambient component (array of four floats).
iDiffuse
Red, green, blue and alpha values of diffuse component (array of four floats).
iSpecular
Red, green, blue and alpha values of specular component (array of four floats).
o SetLocationParameters
public SetLocationParameters( const iOrigin,
const iDirection)
Sets the location and direction of a light source representation. This method has no meaning for LS_INFINITE light source representations.
Parameters:
iOrigin
The point where the light source is located. This parameter has no meaning for LS_INFINITE light source representations.
iDirection
The direction of the light source.
o SetMode
public SetMode( const iMode)
Sets the mode of the light source representation.
Parameters:
iMode
The mode of the light source representation.
o SetSpotLightParameters
public SetSpotLightParameters( const iSpotAngle,
const iSpotExponent)
Sets the specific parameters of a spotlight source representation.
Parameters:
iSpotAngle
The half-angle aperture of the cone of the spotlight.
iSpotExponent
The exponent value used for specular component calculations.
o SetType
public SetType( const iType)
Sets the type of the light source representation.
Parameters:
iType
The type of the light source representation.
o operator =
public operator =( const iLightSourceRep)
Assignement operator.
Parameters:
iLightSourceRep
The light source representation to be copied

This object is included in the file: CAT3DLightSourceRep.h
If needed, your Imakefile.mk should include the module: CATVisFoundation

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.