123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273 |
- /****************************************************************************************
-
- Copyright (C) 2015 Autodesk, Inc.
- All rights reserved.
-
- Use of this software is subject to the terms of the Autodesk license agreement
- provided at the time of installation or download, or which otherwise accompanies
- this software in either electronic or hard copy form.
-
- ****************************************************************************************/
- //! \file fbxlight.h
- #ifndef _FBXSDK_SCENE_GEOMETRY_LIGHT_H_
- #define _FBXSDK_SCENE_GEOMETRY_LIGHT_H_
- #include <fbxsdk/fbxsdk_def.h>
- #include <fbxsdk/scene/geometry/fbxnodeattribute.h>
- #include <fbxsdk/fbxsdk_nsbegin.h>
- class FbxTexture;
- /** \brief This node attribute contains methods for accessing the properties of a light.
- * \nosubgrouping
- */
- class FBXSDK_DLL FbxLight : public FbxNodeAttribute
- {
- FBXSDK_OBJECT_DECLARE(FbxLight, FbxNodeAttribute);
- public:
- /**
- * \name Light Properties
- */
- //@{
- /** \enum EType Light types.
- * - \e ePoint
- * - \e eDirectional
- * - \e eSpot
- * - \e eArea
- * - \e eVolume
- */
- enum EType
- {
- ePoint,
- eDirectional,
- eSpot,
- eArea,
- eVolume
- };
- /** \enum EDecayType Decay types. Used for setting the attenuation of the light.
- * - \e eNone No decay. The light's intensity will not diminish with distance.
- * - \e eLinear Linear decay. The light's intensity will diminish linearly with the distance from the light.
- * - \e eQuadratic Quadratic decay. The light's intensity will diminish with the squared distance from the light.
- * This is the most physically accurate decay rate.
- * - \e eCubic Cubic decay. The light's intensity will diminish with the cubed distance from the light.
- */
- enum EDecayType
- {
- eNone,
- eLinear,
- eQuadratic,
- eCubic
- };
- /** \enum EAreaLightShape Supported area light types.
- * - \e eRectangle Rectangle (or often called a plane) area light type.
- * - \e eSphere Area light that illuminate all directions.
- */
- enum EAreaLightShape
- {
- eRectangle,
- eSphere
- };
- /** Set the shadow texture for the light.
- * \param pTexture The texture cast by the light shadow.
- */
- void SetShadowTexture(FbxTexture* pTexture);
- /** Get the light state.
- * \return Pointer to the texture cast by the light shadow, or \c NULL if the shadow texture has not been set.
- */
- FbxTexture* GetShadowTexture() const;
- //@}
- /**
- * \name Properties
- */
- //@{
- /** This property handles the light type.
- *
- * Default value is ePoint
- */
- FbxPropertyT<EType> LightType;
- /** This property handles the cast light on object flag.
- *
- * Default value is true
- */
- FbxPropertyT<FbxBool> CastLight;
- /** This property handles the draw volumetric light flag.
- *
- * Default value is true
- */
- FbxPropertyT<FbxBool> DrawVolumetricLight;
- /** This property handles the draw ground projection flag.
- *
- * Default value is true
- */
- FbxPropertyT<FbxBool> DrawGroundProjection;
- /** This property handles the draw facing volumetric projection flag.
- *
- * Default value is false
- */
- FbxPropertyT<FbxBool> DrawFrontFacingVolumetricLight;
- /** This property handles the light color.
- *
- * Default value is (1.0, 1.0, 1.0)
- */
- FbxPropertyT<FbxDouble3> Color;
- /** This property handles the light intensity.
- *
- * Default value is 100.0
- */
- FbxPropertyT<FbxDouble> Intensity;
- /** This property handles the light inner cone angle (in degrees). Also know as the HotSpot
- *
- * Default value is 45.0
- */
- FbxPropertyT<FbxDouble> InnerAngle;
- /** This property handles the light outer cone angle (in degrees). Also known as the Falloff
- *
- * Default value is 45.0
- */
- FbxPropertyT<FbxDouble> OuterAngle;
- /** This property handles the light fog intensity
- *
- * Default value is 50.0
- */
- FbxPropertyT<FbxDouble> Fog;
- /** This property handles the decay type
- *
- * Default value is eNone
- */
- FbxPropertyT<EDecayType> DecayType;
- /** This property handles the decay start distance
- *
- * Default value is 0.0
- */
- FbxPropertyT<FbxDouble> DecayStart;
- /** This property handles the gobo file name
- *
- * Default value is ""
- */
- FbxPropertyT<FbxString> FileName;
- /** This property handles the enable near attenuation flag
- *
- * Default value is false
- */
- FbxPropertyT<FbxBool> EnableNearAttenuation;
- /** This property handles the near attenuation start distance
- *
- * Default value is 0.0
- */
- FbxPropertyT<FbxDouble> NearAttenuationStart;
- /** This property handles the near end attenuation
- *
- * Default value is 0.0
- */
- FbxPropertyT<FbxDouble> NearAttenuationEnd;
- /** This property handles the enable far attenuation flag
- *
- * Default value is false
- */
- FbxPropertyT<FbxBool> EnableFarAttenuation;
- /** This property handles the far attenuation start distance
- *
- * Default value is 0.0
- */
- FbxPropertyT<FbxDouble> FarAttenuationStart;
- /** This property handles the attenuation end distance
- *
- * Default value is 0.0
- */
- FbxPropertyT<FbxDouble> FarAttenuationEnd;
- /** This property handles the cast shadow flag
- *
- * Default value is false
- */
- FbxPropertyT<FbxBool> CastShadows;
- /** This property handles the shadow color
- *
- * Default value is (0.0, 0.0, 0.0)
- */
- FbxPropertyT<FbxDouble3> ShadowColor;
- /** This property handles type when LightType is eArea
- *
- * Default value is eRectangle
- */
- FbxPropertyT<EAreaLightShape> AreaLightShape;
- /** This property handles the left barn door angle
- *
- * Default value is 20.0
- */
- FbxPropertyT<FbxFloat> LeftBarnDoor;
- /** This property handles the right barn door angle
- *
- * Default value is 20.0
- */
- FbxPropertyT<FbxFloat> RightBarnDoor;
- /** This property handles the top barn door angle
- *
- * Default value is 20.0
- */
- FbxPropertyT<FbxFloat> TopBarnDoor;
- /** This property handles the bottom barn door angle
- *
- * Default value is 20.0
- */
- FbxPropertyT<FbxFloat> BottomBarnDoor;
- /** This property handles active status of barn doors
- *
- * Default value is false
- */
- FbxPropertyT<FbxBool> EnableBarnDoor;
- //@}
- /*****************************************************************************************************************************
- ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
- *****************************************************************************************************************************/
- #ifndef DOXYGEN_SHOULD_SKIP_THIS
- virtual FbxNodeAttribute::EType GetAttributeType() const;
- protected:
- virtual void ConstructProperties(bool pForceSet);
- virtual FbxStringList GetTypeFlags() const;
- #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
- };
- inline EFbxType FbxTypeOf(const FbxLight::EType&){ return eFbxEnum; }
- inline EFbxType FbxTypeOf(const FbxLight::EDecayType&){ return eFbxEnum; }
- inline EFbxType FbxTypeOf(const FbxLight::EAreaLightShape&){ return eFbxEnum; }
- #include <fbxsdk/fbxsdk_nsend.h>
- #endif /* _FBXSDK_SCENE_GEOMETRY_LIGHT_H_ */
|