VR-Vantage 2.5 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) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #pragma warning( push )
12 #pragma warning( disable : 4251 )
13 
21 
22 #include <boost/signals.hpp>
23 
24  namespace makVrv {
25 
26  typedef boost::signal< void(const DtLight*) > LightSignal;
27 
28  enum LightType
29  {
31  , LT_POINT = 1
33  };
34 
36  {
38  , LG_PROPS = 1
39  , LG_TERRAIN = 2
40  };
41 
45  {
46  public:
48  DtLight(void);
49 
51  ~DtLight();
52 
54 
55  void setOn(bool bOn);
56  bool isOn(void) const{ return mybIsOn; }
58 
60 
61 
62 
63 
64 
65  void setLightType(LightType lightType);
66  LightType lightType(void) const;
68 
70 
71  void setAmbientColor(const DtColorValue& color);
72  void setDiffuseColor(const DtColorValue& color);
73  void setSpecularColor(const DtColorValue& color);
75 
77 
78  const DtColorValue& ambientColor(void) const;
79  const DtColorValue& diffuseColor(void) const;
80  const DtColorValue& specularColor(void) const;
82 
84  void setPosition(const Vector3_64& vPosition);
85  const Vector3_64& position(void) const;
86 
88  void setDirection(const Vector3_64& vDirection);
89  const Vector3_64& direction(void) const;
90 
92 
93  void setRange(float32 fRange);
94  float32 range(void) const;
95  float32 squaredRange(void) const;
97 
99 
100  void setAttenuation(float32 fConstant, float32 fLinear, float32 fQuadratic);
101 
102  float32 constantAttenuation(void) const;
103  float32 linearAttenuation(void) const;
104  float32 quadraticAttenuation(void) const;
105 
106  void getAttenuation(float32 attenuations[3]) const;
108 
109 
111 
112  void setSpotLightParameters(const DtDegrees& fInnerAngleDegrees
113  , const DtDegrees& fOuterAngleDegrees
114  , float32 fFalloff);
115 
116  void setSpotLightAngles(const DtDegrees& fInnerAngleDegrees, const DtDegrees& fOuterAngleDegrees);
117  void getSpotLightAngles(DtDegrees& fInnerAngleDegrees, DtDegrees& fOuterAngleDegrees);
118 
119  DtDegrees innerAngle(void) const;
120  DtDegrees outerAngle(void) const;
121  float32 falloff(void) const;
123 
125 
126  DtUserObjectBindings& getUserObjectBindings(void);
127  const DtUserObjectBindings& getUserObjectBindings(void) const;
129 
131 
132  void setUserData(void* pUserData){ myUserData = pUserData; }
133  void* userData() const { return myUserData; }
135 
137 
141 
142  void enableSignals(bool enable);
143  bool signalsEnabled(void) const;
144 
145  void enableUpdateSignals(bool enable);
147 
149  LightGroup lightGroup() const;
150 
152  void setLightGroup(LightGroup group);
153 
154  const AxisAlignedBoundingBox_64& getWorldAABB(void) const;
155 
157 
158  static const std::string& getReservedBindingKey(void)
159  {
160  return mystrReservedBinding;
161  }
162 
163  DtLight& operator=( const DtLight& rhs);
164 
165  private:
166 
168 
172 
177 
180 
184 
191 
192  bool mybIsOn;
193 
195  void* myUserData;
196 
197  void UpdateBounds(void);
199 
201 
204 
209  };
210 
211 } //namespace makVrv
212 
213 #pragma warning( pop )


Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)