CFx SDK Documentation  2023 SP0
DbLight.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 #ifndef __OD_DB_LIGHT__
26 #define __OD_DB_LIGHT__
27 
28 #include "TD_PackPush.h"
29 
30 #include "DbEntity.h"
31 #include "Gi/GiLightTraits.h"
32 
38 {
39 public:
41 
43 
45  {
46  kPeakIntensity = 0,
48  kIlluminance
49  };
50 
52  {
53  kKelvin = 0,
54  kPreset
55  };
56 
58  {
59  kD65White = 0,
73  kCustom
74  };
75 
77  {
78  kGlyphDisplayAuto = 0,
80  kGlyphDisplayOff
81  };
82 
84  OdDbDwgFiler* pFiler);
85 
86  virtual void dwgOutFields(
87  OdDbDwgFiler* pFiler) const;
88 
90  OdDbDxfFiler* pFiler);
91 
92  virtual void dxfOutFields(
93  OdDbDxfFiler* pFiler) const;
94 
96  const OdGeMatrix3d& xfm);
97 
98  virtual OdResult subErase(bool erasing);
99  virtual void subHighlight(bool bDoIt = true, const OdDbFullSubentPath* pSubId = 0, bool highlightAll = false) const;
100 
101  virtual DrawableType drawableType() const;
103 
104  virtual bool subWorldDraw(OdGiWorldDraw* pWd) const;
105  virtual void subViewportDraw(OdGiViewportDraw* pVd) const;
106 
107  OdString name() const;
109 
112 
113  bool isOn() const;
114  void setOn(bool value);
115 
116  bool isPlottable() const;
117  void setIsPlottable(bool plot);
118 
120  void setLightColor(const OdCmColor& color);
121 
122  double intensity() const;
123  void setIntensity(double intensity);
124 
127 
130 
131  void setPosition(const OdGePoint3d& pos);
133 
135  void setTargetLocation(const OdGePoint3d& newVal);
136 
137  void setHotspotAndFalloff(double hotspot, double falloff);
138  double hotspotAngle() const;
139  double falloffAngle() const;
140 
142  void setLightDirection(const OdGeVector3d& lightvec);
143 
144  // Photometric properties
145 
148 
149  double physicalIntensity() const;
150  void setPhysicalIntensity(double physIntensity);
151 
152  double illuminanceDistance() const;
153  void setIlluminanceDistance(double illumDistance);
154 
157 
158  double lampColorTemp() const;
159  void setLampColorTemp(double colorTemp);
160 
163 
165  void setLampColorRGB(const OdGiColorRGB &color);
167 
168  OdString webFile() const;
169  void setWebFile(const OdString &webFile);
170 
172  void setWebRotation(const OdGeVector3d &rotation);
173 
174  bool hasTarget() const;
175  void setHasTarget(bool bTarget);
176 
179 };
180 
182 
183 #include "TD_PackPop.h"
184 
185 #endif // __OD_DB_LIGHT__
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbLight > OdDbLightPtr
Definition: DbLight.h:181
unsigned int OdUInt32
OdResult
Definition: OdResult.h:29
OdGeVector3d lightDirection() const
virtual void subViewportDraw(OdGiViewportDraw *pVd) const
OdGiColorRGB lampColorRGB() const
LampColorType
Definition: DbLight.h:52
LampColorType lampColorType() const
void setHasTarget(bool bTarget)
double physicalIntensity() const
void setLightDirection(const OdGeVector3d &lightvec)
GlyphDisplayType
Definition: DbLight.h:77
@ kGlyphDisplayOn
Definition: DbLight.h:79
void setIlluminanceDistance(double illumDistance)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdGeVector3d webRotation() const
LampColorPreset lampColorPreset() const
void setTargetLocation(const OdGePoint3d &newVal)
void setIntensity(double intensity)
OdString name() const
virtual OdResult subErase(bool erasing)
double intensity() const
virtual DrawableType drawableType() const
PhysicalIntensityMethod
Definition: DbLight.h:45
@ kFlux
Definition: DbLight.h:47
double lampColorTemp() const
bool isPlottable() const
PhysicalIntensityMethod physicalIntensityMethod() const
OdString webFile() const
OdCmColor resultingColor() const
void setName(OdString name)
ODDB_DECLARE_MEMBERS(OdDbLight)
void setIsPlottable(bool plot)
void setPhysicalIntensity(double physIntensity)
bool hasTarget() const
void setHotspotAndFalloff(double hotspot, double falloff)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
void setOn(bool value)
void setPhysicalIntensityMethod(PhysicalIntensityMethod physIntMethod)
OdGePoint3d position() const
void setLightColor(const OdCmColor &color)
OdGePoint3d targetLocation() const
double hotspotAngle() const
double illuminanceDistance() const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
double falloffAngle() const
void setPosition(const OdGePoint3d &pos)
void setLightType(OdGiDrawable::DrawableType type)
void setWebRotation(const OdGeVector3d &rotation)
OdCmColor lightColor() const
void setShadowParameters(const OdGiShadowParameters &params)
OdGiDrawable::DrawableType lightType() const
const OdGiShadowParameters & shadowParameters() const
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
bool isOn() const
GlyphDisplayType glyphDisplay() const
void setGlyphDisplay(GlyphDisplayType type)
void setLampColorTemp(double colorTemp)
virtual void subHighlight(bool bDoIt=true, const OdDbFullSubentPath *pSubId=0, bool highlightAll=false) const
void setLampColorPreset(LampColorPreset colorPreset)
void setLampColorRGB(const OdGiColorRGB &color)
LampColorPreset
Definition: DbLight.h:58
@ kMercury
Definition: DbLight.h:69
@ kFluorescent
Definition: DbLight.h:60
@ kQuartz
Definition: DbLight.h:67
@ kHalogen
Definition: DbLight.h:66
@ kXenon
Definition: DbLight.h:65
@ kMetalHalide
Definition: DbLight.h:68
@ kIncandescent
Definition: DbLight.h:64
@ kCoolWhite
Definition: DbLight.h:61
@ kPhosphorMercury
Definition: DbLight.h:70
@ kLowPressureSodium
Definition: DbLight.h:72
@ kWhiteFluorescent
Definition: DbLight.h:62
@ kDaylightFluorescent
Definition: DbLight.h:63
@ kHighPressureSodium
Definition: DbLight.h:71
const OdGiLightAttenuation & lightAttenuation() const
void setLampColorType(LampColorType colorType)
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
void setWebFile(const OdString &webFile)
void setLightAttenuation(const OdGiLightAttenuation &params)
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
GLenum GLint * params
Definition: gles2_ext.h:184
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLsizei const GLfloat * value
Definition: gles2_ext.h:302