CFx SDK Documentation  2022 SP0
AveLight.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 
26 #ifndef OD_AVELIGHT_H
27 #define OD_AVELIGHT_H
28 
29 #include "TD_PackPush.h"
30 
31 #include "RxObject.h"
32 #include "DbObjectId.h"
33 #include "IdArrays.h"
34 #include "Ve/AveDefs.h"
35 #include "Gs/GsLight.h"
36 
37 class OdGePoint3d;
38 class OdGeVector3d;
39 
40 class OdAveLightImpl;
41 class OdAveLight;
46 
47 
58 {
59 public:
61 
72  static OdAveLightPtr getLight(const OdDbObjectId& blockRefId);
78  static OdString getLightName(const OdDbObjectId& blockRefId);
79 
88  OdResult writeLight(OdDbDatabase* pDb = 0, const OdDbHandle& holderHandle = 0, const OdDbObjectId& ownerId = OdDbObjectId::kNull);
89 
118 
123  OdString name() const;
124 
131  void setName(const OdString& name);
132 
138  double intensity() const;
143  void setIntensity(double intensity);
144 
151  OdUInt32 color() const;
152 
158  void setColor(OdUInt32 color);
159 
164 
169 
174 
180  void setPosition(const OdGePoint3d& position);
181 
187  void setTarget(const OdGePoint3d& target);
194  void setDirection(const OdGePoint3d& fromPoint, const OdGePoint3d& toPoint);
195 
210 
226 
246  double innerConeAngle() const;
259  double outerConeAngle() const;
260 
274  void setConeAngle(double innerConeAngle, double outerConeAngle);
275 
279  bool isShadowOn() const;
284  void setShadowOn(bool shadowOn);
285 
290  bool isShadowVolumes() const;
295  void setShadowVolumes(bool);
296 
309 
323  void shadowMapSize(OdInt16 mapSize);
324 
334  double shadowSoftness() const;
346  void setShadowSoftness(double shadowSoftness);
347 
353  void shadowBoundingObjects(OdDbObjectIdArray& objectIds) const;
363  void addShadowBoundingObject(const OdDbObjectId& objectId);
364 
369 
370 protected:
375  OdAveLight(OdAveLightImpl* pImpl);
376 
377  OdAveLightImpl* m_pImpl;
378 };
379 
387 
388 #include "TD_PackPop.h"
389 
390 #endif // OD_AVELIGHT_H
391 
#define AVE_EXPORT
Definition: AveExport.h:37
OdSmartPtr< OdAveLight > OdAveLightPtr
Definition: AveLight.h:41
AVE_EXPORT OdRxIteratorPtr oddbGetLights(OdDbDatabase *pDb)
unsigned int OdUInt32
short OdInt16
OdResult
Definition: OdResult.h:29
bool isShadowVolumes() const
OdGeVector3d direction() const
void setShadowVolumes(bool)
OdResult writeLight(OdDbDatabase *pDb=0, const OdDbHandle &holderHandle=0, const OdDbObjectId &ownerId=OdDbObjectId::kNull)
OdDbObjectId holderId() const
void setShadowBoundingObjects(const OdDbObjectIdArray &objectIds)
OdAveLight(OdAveLightImpl *pImpl)
double shadowSoftness() const
void setColor(OdUInt32 color)
OdInt16 shadowMapSize() const
void shadowBoundingObjects(OdDbObjectIdArray &objectIds) const
void setAttenuation(OdGsLight::LightAttenuation attenuation)
OdString name() const
void setIntensity(double intensity)
void setShadowSoftness(double shadowSoftness)
OdGePoint3d position() const
static OdAveLightPtr getLight(const OdDbObjectId &blockRefId)
OdAveLightImpl * m_pImpl
Definition: AveLight.h:377
bool isShadowOn() const
void addShadowBoundingObject(const OdDbObjectId &objectId)
void setShadowOn(bool shadowOn)
double intensity() const
static OdString getLightName(const OdDbObjectId &blockRefId)
OdGsLight::LightType type() const
void setName(const OdString &name)
void setPosition(const OdGePoint3d &position)
void setDirection(const OdGePoint3d &fromPoint, const OdGePoint3d &toPoint)
void shadowMapSize(OdInt16 mapSize)
void setTarget(const OdGePoint3d &target)
OdGePoint3d target() const
double innerConeAngle() const
ODRX_DECLARE_MEMBERS(OdAveLight)
OdUInt32 color() const
void setConeAngle(double innerConeAngle, double outerConeAngle)
double outerConeAngle() const
void setType(OdGsLight::LightType type)
OdGsLight::LightAttenuation attenuation() const
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118
LightAttenuation
Definition: GsLight.h:52
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274