VR-Vantage API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtLight.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
12 
13 #pragma warning( push )
14 #pragma warning( disable : 4251 )
15 
16 #include "DtColorValue.h"
17 #include "DtVectorForwardDeclare.h"
18 #include "DtVector3.h"
20 #include "DtUserObjectBindings.h"
21 #include "DtMath.h"
22 #include "DtForwardDeclare.h"
24 
25 #include <boost/signals.hpp>
26 
27  namespace makVrv {
28 
29  typedef boost::signal< void(const DtLight*) > LightSignal;
30 
31  enum LightType
32  {
34  , LT_POINT = 1
36  };
37 
39  {
41  , LG_PROPS = 1
42  , LG_TERRAIN = 2
43  };
44 
48  {
49  public:
51  DtLight(void);
52 
54  virtual ~DtLight();
55 
57 
58  void setOn(bool bOn);
59  bool isOn(void) const;
61 
63 
64 
65 
66 
67 
68  void setLightType(LightType lightType);
69  LightType lightType(void) const;
71 
73 
74  void setAmbientColor(const DtColorValue& color);
75  void setDiffuseColor(const DtColorValue& color);
76  void setSpecularColor(const DtColorValue& color);
78 
80 
81  const DtColorValue& ambientColor(void) const;
82  const DtColorValue& diffuseColor(void) const;
83  const DtColorValue& specularColor(void) const;
85 
87  void setPosition(const Vector3_64& vPosition);
88  const Vector3_64& position(void) const;
89 
91  void setDirection(const Vector3_64& vDirection);
92  const Vector3_64& direction(void) const;
93 
95 
96  void setRange(float32 fRange);
97  float32 range(void) const;
98  float32 squaredRange(void) const;
100 
102 
103  void setAttenuation(float32 fConstant, float32 fLinear, float32 fQuadratic);
104 
105  float32 constantAttenuation(void) const;
106  float32 linearAttenuation(void) const;
107  float32 quadraticAttenuation(void) const;
108 
109  void getAttenuation(float32 attenuations[3]) const;
111 
112 
114 
115  void setSpotLightParameters(DtDegrees fInnerAngleDegrees
116  , DtDegrees fOuterAngleDegrees
117  , float32 fFalloff);
118 
119  void setSpotLightAngles(DtDegrees fInnerAngleDegrees, DtDegrees fOuterAngleDegrees);
120  void getSpotLightAngles(DtDegrees& fInnerAngleDegrees, DtDegrees& fOuterAngleDegrees);
121 
122  DtDegrees innerAngle(void) const;
123  DtDegrees outerAngle(void) const;
124  float32 falloff(void) const;
126 
128 
129  DtUserObjectBindings& getUserObjectBindings(void);
130  const DtUserObjectBindings& getUserObjectBindings(void) const;
132 
134 
138 
139  void enableSignals(bool enable);
140  bool signalsEnabled(void) const;
142 
144  LightGroup lightGroup() const;
145 
147  void setLightGroup(LightGroup group);
148 
149  const AxisAlignedBoundingBox_64& getWorldAABB(void) const;
150 
152 
153  static const std::string& getReservedBindingKey(void)
154  {
155  return mystrReservedBinding;
156  }
157 
158  const DtLight& operator=( const DtLight& rhs);
159 
160  private:
161 
163 
167 
172 
175 
179 
186 
187  bool mybIsOn;
188 
190 
191  void UpdateBounds(void);
193 
195 
197 
202  };
203 
204 } //namespace makVrv
205 
206 #pragma warning( pop )


Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)