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 
41  {
42  public:
44  DtLight(void);
45 
47  virtual ~DtLight();
48 
50 
51  void SetOn(bool bOn);
52  bool IsOn(void) const;
54 
56 
57 
58 
59 
60 
61  void setLightType(LightType lightType);
62  LightType lightType(void) const;
64 
66 
67  void setAmbientColor(const DtColorValue& color);
68  void setDiffuseColor(const DtColorValue& color);
69  void setSpecularColor(const DtColorValue& color);
71 
73 
74  const DtColorValue& ambientColor(void) const;
75  const DtColorValue& diffuseColor(void) const;
76  const DtColorValue& specularColor(void) const;
78 
80  void setPosition(const Vector3_64& vPosition);
81  const Vector3_64& position(void) const;
82 
84  void setDirection(const Vector3_64& vDirection);
85  const Vector3_64& direction(void) const;
86 
88 
89  void setRange(float32 fRange);
90  float32 range(void) const;
91  float32 squaredRange(void) const;
93 
95 
96  void setAttenuation(float32 fConstant, float32 fLinear, float32 fQuadratic);
97 
98  float32 constantAttenuation(void) const;
99  float32 linearAttenuation(void) const;
100  float32 quadraticAttenuation(void) const;
101 
102  void getAttenuation(float32 attenuations[3]) const;
104 
105 
107 
108  void setSpotLightParameters(DtDegrees fInnerAngleDegrees
109  , DtDegrees fOuterAngleDegrees
110  , float32 fFalloff);
111 
112  void setSpotLightAngles(DtDegrees fInnerAngleDegrees, DtDegrees fOuterAngleDegrees);
113  void getSpotLightAngles(DtDegrees& fInnerAngleDegrees, DtDegrees& fOuterAngleDegrees);
114 
115  DtDegrees innerAngle(void) const;
116  DtDegrees outerAngle(void) const;
117  float32 falloff(void) const;
119 
121 
122  DtUserObjectBindings& getUserObjectBindings(void);
123  const DtUserObjectBindings& getUserObjectBindings(void) const;
125 
127 
131 
132  void enableSignals(bool enable);
133  bool signalsEnabled(void) const;
135 
136 
137  const AxisAlignedBoundingBox_64& getWorldAABB(void) const;
138 
140 
141  static const std::string& getReservedBindingKey(void)
142  {
143  return mystrReservedBinding;
144  }
145 
146  const DtLight& operator=( const DtLight& rhs);
147  private:
148 
150 
154 
159 
162 
166 
173 
174  bool mybIsOn;
175 
177 
178  void UpdateBounds(void);
180 
182 
184  };
185 
186 } //namespace makVrv
187 
188 #pragma warning( pop )


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