#include <FCDLight.h>
Inheritance diagram for FCDLight:
Public Types | |
enum | LightType { POINT, SPOT, AMBIENT, DIRECTIONAL } |
The types of lights supported by this class. More... | |
Public Member Functions | |
FCDLight (FCDocument *document) | |
Constructor: do not use directly. | |
virtual | ~FCDLight () |
Destructor. | |
virtual Type | GetType () const |
Retrieves the entity type for this class. | |
DEPRECATED (3.05A, GetExtra()->GetDefaultType()->GetTechniques()) virtual bool HasMaxExtras() const | |
Checks if the light uses a DCC specific representation Currently always returns false. | |
DEPRECATED (3.05A, GetExtra()->GetDefaultType()->GetTechniques()) virtual bool HasMayaExtras() const | |
See above. | |
DEPRECATED (3.05A, nothing) void SetHasMaxExtras(bool UNUSED(value)) | |
[INTERNAL] Set DCC specific flags. | |
DEPRECATED (3.05A, nothing) void SetHasMayaExtras(bool UNUSED(value)) | |
FCDParameterAnimatableColor3 & | GetColor () |
Retrieves the base color for the light. | |
const FCDParameterAnimatableColor3 & | GetColor () const |
See above. | |
void | SetColor (const FMVector3 &col) |
Sets the base color for the light. | |
void | SetColor (float r, float g, float b) |
Sets the base color for the light. | |
FCDParameterAnimatableFloat & | GetIntensity () |
Retrieves the intensity of the light. | |
const FCDParameterAnimatableFloat & | GetIntensity () const |
See above. | |
void | SetIntensity (float _intensity) |
Sets the intensity of the light. | |
LightType | GetLightType () const |
Retrieves the type of the light. | |
void | SetLightType (LightType type) |
Sets the type of the light. | |
FCDParameterAnimatableFloat & | GetConstantAttenuationFactor () |
Retrieves the constant attenuation factor for the light. | |
const FCDParameterAnimatableFloat & | GetConstantAttenuationFactor () const |
See above. | |
void | SetConstantAttenuationFactor (float factor) |
Sets the constant attenuation factor for the light. | |
FCDParameterAnimatableFloat & | GetLinearAttenuationFactor () |
Retrieves the linear attenuation factor for the light. | |
const FCDParameterAnimatableFloat & | GetLinearAttenuationFactor () const |
See above. | |
void | SetLinearAttenuationFactor (float factor) |
Sets the linear attenuation factor for the light. | |
FCDParameterAnimatableFloat & | GetQuadraticAttenuationFactor () |
Retrieves the quadratic attenuation factor for the light. | |
const FCDParameterAnimatableFloat & | GetQuadraticAttenuationFactor () const |
See above. | |
void | SetQuadraticAttenuationFactor (float factor) |
Sets the quadratic attenuation factor for the light. | |
FCDParameterAnimatableFloat & | GetFallOffExponent () |
Retrieves the fall-off exponent for the light. | |
const FCDParameterAnimatableFloat & | GetFallOffExponent () const |
See above. | |
void | SetFallOffExponent (float exponent) |
Sets the fall-off exponent for the light. | |
FCDParameterAnimatableFloat & | GetFallOffAngle () |
Retrieves the fall-off angle for the light. | |
const FCDParameterAnimatableFloat & | GetFallOffAngle () const |
See above. | |
void | SetFallOffAngle (float angle) |
Sets the fall-off angle for the light. | |
FCDParameterAnimatableFloat & | GetOuterAngle () |
Retrieves the outer angle for the light. | |
const FCDParameterAnimatableFloat & | GetOuterAngle () const |
See above. | |
void | SetOuterAngle (float angle) |
Sets the outer angle for the light. | |
DEPRECATED (3.05A, GetOuterAngle and GetFallOffAngle) float &GetPenumbraAngle() | |
Retrieves the penumbra angle for the light. | |
DEPRECATED (3.05A, GetOuterAngle and GetFallOffAngle) const float &GetPenumbraAngle() const | |
See above. | |
DEPRECATED (3.05A, SetOuterAngle and SetFallOffAngle) void SetPenumbraAngle(float angle) | |
Sets the penumbra angle for the light. | |
FCDParameterAnimatableFloat & | GetDropoff () |
Retrieves the drop-off for the light. | |
const FCDParameterAnimatableFloat & | GetDropoff () const |
See above. | |
void | SetDropoff (float factor) |
Sets the drop-off for the light. |
Based on the FCDTargetedEntity class to supported aimed lights. COLLADA defines four types of native lights: point, spot, ambient and directional. These four types are fully handled by this class: make sure to check the type flag as well as which information to expect for each light type.
A COLLADA ambient light has a global color, which should be added to all other lighting on all geometry.
A COLLADA directional light has a global color, which should be multiplied to the cosine of the angle between the normal vector of a triangle and the direction of the light. Note that the direction will be calculated from the transforms, for each instance, and is not provided by this class.
A COLLADA point light has a color which attenuates as the distance increases between the light position and the vertex being shaded. Note that the position will be calculated from the transforms, for each instance, and is not provided by this class.
A COLLADA spot light is a point light which lights only the objects that appear within a specific angle, with respect to the direction of the light. Note that the position and the direction will be calculated from the transforms, for each instance, and is not provided by this class.
|
The types of lights supported by this class.
|
|
Constructor: do not use directly. Create new lights using the FCDLibrary::AddEntity function.
|
|
Sets the penumbra angle for the light. This now actually doesn't nothing except sets a variable that you can read back with GetPenumbraAngle.
|
|
Retrieves the penumbra angle for the light. This value is valid only for spot lights. The value is only used by documents exported by ColladaMaya. This value is relative to the fall-off angle and may be negative. If this value is positive, it determines the outer angle, as described above. If this value is negative, the fall-off angle is used as the outer angle and the fall-off angle + the penumbra angle is used as the full-lighting angle. This now actually does nothing but gets the value assigned in SetPenumbraAngle
|
|
[INTERNAL] Set DCC specific flags.
|
|
Checks if the light uses a DCC specific representation Currently always returns false.
|
|
Retrieves the base color for the light. To calculate the light color, multiply the base color with the intensity.
|
|
Retrieves the constant attenuation factor for the light. This value is valid only for point and spot lights.
|
|
Retrieves the drop-off for the light. It defines the rate at which a spot light gets dimmer from the center of the beam to outside angles.
|
|
Retrieves the fall-off angle for the light. This value is valid only for spot lights. It defines the cone of the spot light.
|
|
Retrieves the fall-off exponent for the light. This value is valid only for spot lights. It determines how fast the lighting turns off, with respect to angles greater than the fall-off angle. This results in a smooth lighting at the spot light's edges. IMPORTANT NOTE: Neither ColladaMaya or ColladaMax use this value as neither Maya or 3dsMax use this technique for soft lighting.
|
|
Retrieves the intensity of the light. To calculate the light color, multiply the base color with the intensity.
|
|
Retrieves the type of the light. Make sure to check the type of light before using the values, as some values may not make sense with some types of light.
|
|
Retrieves the linear attenuation factor for the light. This value is valid only for point and spot lights.
|
|
Retrieves the outer angle for the light. This value is valid only for spot lights. This value is used by documents exported by ColladaMax and ColladaMaya. This value should always be greater than the fall-off angle. It represents the angle at which the lighting is black. All lighting between the fall-off angle and the outer angle is a linear interpolation between the light color and black.
|
|
Retrieves the quadratic attenuation factor for the light. This value is valid only for point and spot lights.
|
|
Retrieves the entity type for this class. This function is part of the FCDEntity interface.
Reimplemented from FCDEntity. |
|
Sets the base color for the light. To calculate the light color, multiply the base color with the intensity.
|
|
Sets the base color for the light. To calculate the light color, multiply the base color with the intensity.
|
|
Sets the constant attenuation factor for the light. This value is valid only for point and spot lights.
|
|
Sets the drop-off for the light.
|
|
Sets the fall-off angle for the light.
|
|
Sets the fall-off exponent for the light.
|
|
Sets the intensity of the light. To calculate the light color, multiply the base color with the intensity.
|
|
Sets the type of the light. The default type of a new light is POINT.
|
|
Sets the linear attenuation factor for the light. This value is valid only for point and spot lights.
|
|
Sets the outer angle for the light.
|
|
Sets the quadratic attenuation factor for the light. This value is valid only for point and spot lights.
|