1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- //===========================================================================//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- #pragma once
- #define MLR_MLRSPOTLIGHT_HPP
- #include "MLR.hpp"
- #include "MLRInfiniteLightWithFalloff.hpp"
- namespace MidLevelRenderer {
- //##########################################################################
- //######################## MLRSpotLight ##############################
- //##########################################################################
- class MLRSpotLight:
- public MLRInfiniteLightWithFalloff
- {
- public:
- static void
- InitializeClass();
- static void
- TerminateClass();
- MLRSpotLight();
- MLRSpotLight(
- Stuff::MemoryStream *stream,
- int version
- );
- MLRSpotLight(Stuff::Page *page);
- ~MLRSpotLight();
- void
- Save(Stuff::MemoryStream *stream);
- void
- Write(Stuff::Page *page);
- virtual LightType
- GetLightType()
- { Check_Object(this); return SpotLight; }
- //
- // spotlight spread. This value is only valid if the light had falloff
- //
- bool
- GetSpreadAngle(Stuff::Radian *angle);
- void
- SetSpreadAngle(const Stuff::Radian &radian);
- void
- SetSpreadAngle(const Stuff::Degree °ree);
- Stuff::Scalar
- GetTanSpreadAngle()
- { Check_Object(this); return tanSpreadAngle; }
- Stuff::Scalar
- GetCosSpreadAngle()
- { Check_Object(this); return cosSpreadAngle; }
- virtual void
- LightVertex(const MLRVertexData&);
- void
- SetLightMap(MLRLightMap *light_map);
- MLRLightMap *
- GetLightMap()
- {Check_Object(this); return lightMap; }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Class Data Support
- //
- public:
- static ClassData
- *DefaultData;
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Testing
- //
- public:
- void
- TestInstance();
- protected:
- MLRLightMap *lightMap;
- Stuff::Radian
- spreadAngle;
- Stuff::Scalar
- tanSpreadAngle,
- cosSpreadAngle;
- };
- }
|