VisualizationFoundation CAT3DLightSourceGP

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


public class CAT3DLightSourceGP

Class to create light source graphic primitives.
Role: A light source graphic primitive indicates the position and orientation of lights in the viewer. A light source can be of two different types :
LS_INFINITE infinitely distant like the sun, LS_SPOT spotlight with a cutoff angle between 0 and 90 degrees, or equal to 180 degrees (lightbulb equivalent) A light source can be of two differents modes :
Local attached to the viewpoint Global attached to the model By default, one light source is created and activated. A viewer can handle a maximum of eight light source graphic primitives. To add a light source, prefer adding a CAT3DLightSourceRep.


Constructor and Destructor Index


o CAT3DLightSourceGP()
Constructs an empty light source graphic primitive of type LS_INFINITE.
o CAT3DLightSourceGP(CATLightSourceType,CATLightSourceMode,CATMathPointf&,CATMathDirectionf&,float,float,float,float,float)
Constructs a light source graphic primitive.

Method Index


o GatherDirectionalLightInfo(CATMathDirectionf&,float*,float&)
o GatherPointLightInfo(CATMathPointf&,float*,float&)
o GatherSpotLightInfo(CATMathPointf&,CATMathDirectionf&,float*,float&,float&,float&)
o Get(CATLightSourceType&,CATLightSourceMode&,CATMathPointf&,CATMathDirectionf&,float*,float*,float*,float*,float*)
Retrieves the parameters of a light source.
o GetColor(float*[4],float*[4],float*[4])
Retrieves the color components of the light source.
o GetDirection(CATMathDirectionf&)
o GetLightSourceMode()
o GetMode()
o GetMotherRepConnection()
o GetOrigin(CATMathPointf&)
o GetSpotAngle()
o GetType()
o GetVolUpdateNeeded()
o SetColor(float[4],float[4],float[4])
Sets the color components of the light source.
o SetMotherRepConnection(CAT3DLightSourceRep*)
o SetVolUpdateNeeded(unsigned int)

Constructor and Destructor


o CAT3DLightSourceGP
public CAT3DLightSourceGP()
Constructs an empty light source graphic primitive of type LS_INFINITE.
o CAT3DLightSourceGP
public CAT3DLightSourceGP( iType,
iMode,
const iOrigin,
const iDirection,
const iSpotAngle= 180.f,
const iSpotExponent= 0.f,
const iConstantAttenuation= 1.f,
const iLinearAttenuation= 0.f,
const iQuadraticAttenuation= 0.f)
Constructs a light source graphic primitive.
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.
iSpotExponent
value used for specular component calculations
iConstantAttenuation
The constant factor of the attenuation equation.
iLinearAttenuation
The linear factor of the attenuation equation.
iQuadraticAttenuation
The quadraric factor of the attenuation equation.

Methods


o GatherDirectionalLightInfo
public GatherDirectionalLightInfo( oDirection,
oDiffuse,
oRadiance)
o GatherPointLightInfo
public GatherPointLightInfo( oOrigin,
oDiffuse,
power)
o GatherSpotLightInfo
public GatherSpotLightInfo( oOrigin,
oDirection,
oDiffuse,
power,
oInnerAngle,
oOuterAngle)
o Get
public Get( iType,
oMode,
oOrigin,
oDirection,
oSpotAngle,
oSpotExponent,
oConstantAttenuation,
oLinearAttenuation,
oQuadraticAttenuation)
Retrieves the parameters of a light source.
Parameters:
iType
The type of the light source.
oMode
The mode of the light source.
oOrigin
The point where the light source is located. This parameter has no meaning for LS_INFINITE light sources.
oDirection
The direction of the light source.
oSpotAngle
The half-angle aperture of the cone of the spotlight.
oSpotExponent
The exponent value used for specular component calculations.
oConstantAttenuation
The constant factor of the attenuation function.
oLinearAttenuation
The light factor of the attenuation function.
oQuadraticAttenuation
The quadratic factor of the attenuation function.
o GetColor
public GetColor( const oAmbient,
const oDiffuse,
const oSpecular)
Retrieves the color components of the light source. 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 GetDirection
public GetDirection( oDirection)
o GetLightSourceMode
public GetLightSourceMode()
o GetMode
public GetMode()
o GetMotherRepConnection
public GetMotherRepConnection()
o GetOrigin
public GetOrigin( oOrigin)
o GetSpotAngle
public GetSpotAngle()
o GetType
public GetType()
o GetVolUpdateNeeded
public GetVolUpdateNeeded()
o SetColor
public SetColor( const iAmbient,
const iDiffuse,
const iSpecular)
Sets the color components of the light source. All float values are in [0,1].
Parameters:
iAmbient
Red, green, blue and alpha values of ambient component.
iDiffuse
Red, green, blue and alpha values of diffuse component.
iSpecular
Red, green, blue and alpha values of specular component.
o SetMotherRepConnection
public SetMotherRepConnection( motherRep)
o SetVolUpdateNeeded
public SetVolUpdateNeeded( updated)

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

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