CFx SDK Documentation  2023 SP0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OdAveLight Class Reference

#include <AveLight.h>

Inheritance diagram for OdAveLight:
OdGsLight OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdAveLight)
 
OdResult writeLight (OdDbDatabase *pDb=0, const OdDbHandle &holderHandle=0, const OdDbObjectId &ownerId=OdDbObjectId::kNull)
 
OdGsLight::LightType type () const
 
void setType (OdGsLight::LightType type)
 
OdString name () const
 
void setName (const OdString &name)
 
double intensity () const
 
void setIntensity (double intensity)
 
OdUInt32 color () const
 
void setColor (OdUInt32 color)
 
OdGePoint3d position () const
 
OdGePoint3d target () const
 
OdGeVector3d direction () const
 
void setPosition (const OdGePoint3d &position)
 
void setTarget (const OdGePoint3d &target)
 
void setDirection (const OdGePoint3d &fromPoint, const OdGePoint3d &toPoint)
 
OdGsLight::LightAttenuation attenuation () const
 
void setAttenuation (OdGsLight::LightAttenuation attenuation)
 
double innerConeAngle () const
 
double outerConeAngle () const
 
void setConeAngle (double innerConeAngle, double outerConeAngle)
 
bool isShadowOn () const
 
void setShadowOn (bool shadowOn)
 
bool isShadowVolumes () const
 
void setShadowVolumes (bool)
 
OdInt16 shadowMapSize () const
 
void shadowMapSize (OdInt16 mapSize)
 
double shadowSoftness () const
 
void setShadowSoftness (double shadowSoftness)
 
void shadowBoundingObjects (OdDbObjectIdArray &objectIds) const
 
void setShadowBoundingObjects (const OdDbObjectIdArray &objectIds)
 
void addShadowBoundingObject (const OdDbObjectId &objectId)
 
OdDbObjectId holderId () const
 
- Public Member Functions inherited from OdGsLight
 ODRX_DECLARE_MEMBERS (OdGsLight)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdAveLightPtr getLight (const OdDbObjectId &blockRefId)
 
static OdString getLightName (const OdDbObjectId &blockRefId)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Member Functions

 OdAveLight ()
 
 OdAveLight (OdAveLightImpl *pImpl)
 

Protected Attributes

OdAveLightImpl * m_pImpl
 

Additional Inherited Members

- Public Types inherited from OdGsLight
enum  LightType { kPointLight = 0 , kDistantLight = 1 , kSpotlight = 2 }
 
enum  LightAttenuation { kAttenNone = 0 , kAttenInverseLinear = 1 , kAttenInverseSquare = 2 }
 

Detailed Description

This class represents AVE Light properties.

Remarks
AVE Light properties may be attached to OdDbBlockReference objects.

Corresponding C++ library: TD_Ave <group OdAve_Classes>

Definition at line 57 of file AveLight.h.

Constructor & Destructor Documentation

◆ OdAveLight() [1/2]

OdAveLight::OdAveLight ( )
protected

Constructors

◆ OdAveLight() [2/2]

OdAveLight::OdAveLight ( OdAveLightImpl *  pImpl)
protected

Member Function Documentation

◆ addShadowBoundingObject()

void OdAveLight::addShadowBoundingObject ( const OdDbObjectId objectId)

Adds the specified OdDbDatabase object to the shadow bounding objects for this Light object.

Parameters
objectId[in] Object ID to add.

◆ attenuation()

OdGsLight::LightAttenuation OdAveLight::attenuation ( ) const
virtual

Returns the attenuation of this Light object.

Remarks
attenuation() returns one of the following:

Value
OdGsLight::kAttenNone 0
OdGsLight::kAttenInverseLinear 1
OdGsLight::kAttenInverseSquare 2

Implements OdGsLight.

◆ color()

OdUInt32 OdAveLight::color ( ) const
virtual

Returns the color of this Light object.

Remarks
color() returns a 24-bit RGB color.

Implements OdGsLight.

◆ direction()

OdGeVector3d OdAveLight::direction ( ) const
virtual

Returns the WCS direction of this Light object.

Implements OdGsLight.

◆ getLight()

static OdAveLightPtr OdAveLight::getLight ( const OdDbObjectId blockRefId)
static

Creates a Light object from the specified OdDbBlockReference.

Parameters
blockRefId[in] Object ID of the block reference.
Remarks
The new Light object is associated with the specified block reference.

Returns a SmartPointer to the new Light object.

◆ getLightName()

static OdString OdAveLight::getLightName ( const OdDbObjectId blockRefId)
static

Returns the Light name from the specified OdDbBlockReference.

Parameters
blockRefId[in] Object ID of the block reference.

◆ holderId()

OdDbObjectId OdAveLight::holderId ( ) const

Returns the Object ID of the OdDbBlockReference associated with this Light object.

◆ innerConeAngle()

double OdAveLight::innerConeAngle ( ) const

Specifies the cone angles for spotlight (OdAve::kSpotLight). Inner cone defines the brightest cone of light(hotspot, beam angle). Outer cone defines the full cone of light(falloff, field angle). These values can range from 0 to 80 degrees.

Returns the inner cone angle for this kSpotLight Light object.

Remarks
The inner cone angle is one-half the beam angle, which defines the hotspot or brightest cone of light

innerConeAngle() has a range of [0..80].

Remarks
All angles are expressed in degrees.

◆ intensity()

double OdAveLight::intensity ( ) const
virtual

Returns the intensity of this Light object.

Remarks
Returns a value in the range [0.0 .. 1.0].

Implements OdGsLight.

◆ isShadowOn()

bool OdAveLight::isShadowOn ( ) const

Returns true if and only if shadows are enabled for this Light object.

◆ isShadowVolumes()

bool OdAveLight::isShadowVolumes ( ) const

Returns true if and only if volumetric/raytraced shadows are enabled for this Light object.

◆ name()

OdString OdAveLight::name ( ) const

Returns the name of this Light object.

◆ ODRX_DECLARE_MEMBERS()

OdAveLight::ODRX_DECLARE_MEMBERS ( OdAveLight  )

◆ outerConeAngle()

double OdAveLight::outerConeAngle ( ) const

Returns the outer cone angle for this kSpotLight Light object.

Remarks
The outer cone angle is one-half the field angle, which defines the falloff or full cone of light.

outerConeAngle() has a range of [0..80].

Remarks
All angles are expressed in degrees.

◆ position()

OdGePoint3d OdAveLight::position ( ) const
virtual

Returns the WCS position of this Light object.

Implements OdGsLight.

◆ setAttenuation()

void OdAveLight::setAttenuation ( OdGsLight::LightAttenuation  attenuation)

Sets the attenuation of this Light object.

Parameters
attenuation[in] Attenuation.
Remarks
attenuation must be one of the following:

Value
OdGsLight::kAttenNone 0
OdGsLight::kAttenInverseLinear 1 OdGsLight::kAttenInverseSquare 2

◆ setColor()

void OdAveLight::setColor ( OdUInt32  color)

Sets the color of this Light object.

Parameters
color[in] 24-bit RGB color.

◆ setConeAngle()

void OdAveLight::setConeAngle ( double  innerConeAngle,
double  outerConeAngle 
)

Sets the cone angles for this kSpotLight Light object.

Parameters
innerConeAngle[in] Inner cone angle. [0..80]
outerConeAngle[in] Outer cone angle. [0..80]
Remarks
The inner cone angle is one-half the beam angle, which defines the hotspot or brightest cone of light

The outer cone angle is one-half the field angle, which defines the falloff or full cone of light.

Remarks
All angles are expressed in degrees.

◆ setDirection()

void OdAveLight::setDirection ( const OdGePoint3d fromPoint,
const OdGePoint3d toPoint 
)

Sets the WCS direction of this Light object.

Parameters
fromPoint[in] From point.
toPoint[in] To point.

◆ setIntensity()

void OdAveLight::setIntensity ( double  intensity)

Sets the intensity of this Light object.

Parameters
intensity[in] Intensity. [0.0 .. 1.0]

◆ setName()

void OdAveLight::setName ( const OdString name)

Sets the name of this Light object.

Parameters
name[in] Name.
Remarks
Names are truncated to 8 characters.

◆ setPosition()

void OdAveLight::setPosition ( const OdGePoint3d position)

Sets the WCS position of this Light object.

Parameters
position[in] Position.

◆ setShadowBoundingObjects()

void OdAveLight::setShadowBoundingObjects ( const OdDbObjectIdArray objectIds)

Sets the shadow bounding objects for this Light object.

Parameters
objectIds[in] Array of Object IDs.

◆ setShadowOn()

void OdAveLight::setShadowOn ( bool  shadowOn)

Controls shadows for this Light object.

Parameters
shadowOn[in] Controls shadows.

◆ setShadowSoftness()

void OdAveLight::setShadowSoftness ( double  shadowSoftness)

Sets the softness (fuzziness) of shadow-mapped shadows for this Light object.

Parameters
shadowSoftness[in] Shadow softness. [1..10]
Remarks
Shadow softness represents the number of shadow-edge pixels blended into the image.

Values in the range [2..4] typically give the best results.

◆ setShadowVolumes()

void OdAveLight::setShadowVolumes ( bool  )

Controls volumetric/raytraced shadows for this Light object.

Parameters
shadowVolumes[in] Controls shadows.

◆ setTarget()

void OdAveLight::setTarget ( const OdGePoint3d target)

Sets the WCS target of this Light object.

Parameters
target[in] Target.

◆ setType()

void OdAveLight::setType ( OdGsLight::LightType  type)

Sets the type of this Light object.

Parameters
type[in] Light type.
Remarks
type must be one of the following:

Value OdGsLight::kPointLight 0 OdGsLight::kDistantLight 1 OdGsLight::kSpotlight 2

◆ shadowBoundingObjects()

void OdAveLight::shadowBoundingObjects ( OdDbObjectIdArray objectIds) const

Returns the shadow bounding objects for this Light object.

Parameters
objectIds[out] Receives the array of Object IDs.

◆ shadowMapSize() [1/2]

OdInt16 OdAveLight::shadowMapSize ( ) const

Accesses the size of the shadow map for this Light object.

Remarks
The shadow map size is the size, in pixels, of one edge of the shadow map.
shadowMapSize() has a domain and a range of [64..4096].

The smaller the size, the faster but less accurate the rendering.

◆ shadowMapSize() [2/2]

void OdAveLight::shadowMapSize ( OdInt16  mapSize)

Accesses the size of the shadow map for this Light object.

Parameters
mapSize[in] Shadow map size. [64..4096]
Remarks
The shadow map size is the size, in pixels, of one edge of the shadow map.
shadowMapSize() has a domain and a range of [64..4096].

The smaller the size, the faster but less accurate the rendering.

◆ shadowSoftness()

double OdAveLight::shadowSoftness ( ) const

Returns the softness (fuzziness) of shadow-mapped shadows for this Light object.

Remarks
shadowSoftness() has a range of [1..10].

Shadow softness represents the number of shadow-edge pixels blended into the image.

◆ target()

OdGePoint3d OdAveLight::target ( ) const
virtual

Returns the WCS target of this Light object.

Implements OdGsLight.

◆ type()

OdGsLight::LightType OdAveLight::type ( ) const
virtual

Returns the type of this Light object.

Remarks
type() returns one of the following:

Value OdGsLight::kPointLight 0 OdGsLight::kDistantLight 1 OdGsLight::kSpotlight 2

Implements OdGsLight.

◆ writeLight()

OdResult OdAveLight::writeLight ( OdDbDatabase pDb = 0,
const OdDbHandle holderHandle = 0,
const OdDbObjectId ownerId = OdDbObjectId::kNull 
)

Saves the Light properties to the OdDbBlockReference to which this Light object is associated.

Parameters
pDb[in] Pointer to the database.
Remarks
If pDb is null, the database containing this Light object is used.

Member Data Documentation

◆ m_pImpl

OdAveLightImpl* OdAveLight::m_pImpl
protected

Definition at line 377 of file AveLight.h.


The documentation for this class was generated from the following file: