Open CASCADE Technology
7.6.0
|
Class defining the set of light sources. More...
#include <Graphic3d_LightSet.hxx>
Data Structures | |
class | Iterator |
Iterator through light sources. More... | |
Public Types | |
enum | IterationFilter { IterationFilter_None = 0x0000 , IterationFilter_ExcludeAmbient = 0x0002 , IterationFilter_ExcludeDisabled = 0x0004 , IterationFilter_ExcludeNoShadow = 0x0008 , IterationFilter_ExcludeDisabledAndAmbient = IterationFilter_ExcludeAmbient | IterationFilter_ExcludeDisabled , IterationFilter_ActiveShadowCasters = IterationFilter_ExcludeDisabledAndAmbient | IterationFilter_ExcludeNoShadow } |
Iteration filter flags. More... | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. More... | |
Public Member Functions | |
Graphic3d_LightSet () | |
Empty constructor. More... | |
Standard_Integer | Lower () const |
Return lower light index. More... | |
Standard_Integer | Upper () const |
Return upper light index. More... | |
Standard_Boolean | IsEmpty () const |
Return TRUE if lights list is empty. More... | |
Standard_Integer | Extent () const |
Return number of light sources. More... | |
const Handle< Graphic3d_CLight > & | Value (Standard_Integer theIndex) const |
Return the light source for specified index within range [Lower(), Upper()]. More... | |
Standard_Boolean | Contains (const Handle< Graphic3d_CLight > &theLight) const |
Return TRUE if light source is defined in this set. More... | |
Standard_Boolean | Add (const Handle< Graphic3d_CLight > &theLight) |
Append new light source. More... | |
Standard_Boolean | Remove (const Handle< Graphic3d_CLight > &theLight) |
Remove light source. More... | |
Standard_Integer | NbLightsOfType (Graphic3d_TypeOfLightSource theType) const |
Returns total amount of lights of specified type. More... | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. More... | |
virtual | ~Standard_Transient () |
Destructor must be virtual. More... | |
virtual void | Delete () const |
Memory deallocator for transient classes. More... | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. More... | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. More... | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. More... | |
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Transient * | This () const |
Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
void | IncrementRefCounter () const |
Increments the reference counter of this object. More... | |
Standard_Integer | DecrementRefCounter () const |
Decrements the reference counter of this object; returns the decremented value. More... | |
cached state of lights set updated by UpdateRevision() | |
NCollection_IndexedDataMap< Handle< Graphic3d_CLight >, Standard_Size > | myLights |
list of light sources with their cached state (revision) More... | |
Graphic3d_Vec4 | myAmbient |
cached value of cumulative ambient color More... | |
TCollection_AsciiString | myKeyEnabledLong |
key identifying the list of enabled light sources by their type More... | |
TCollection_AsciiString | myKeyEnabledShort |
key identifying the list of enabled light sources by the number of sources of each type More... | |
Standard_Integer | myLightTypes [Graphic3d_TypeOfLightSource_NB] |
counters per each light source type defined in the list More... | |
Standard_Integer | myLightTypesEnabled [Graphic3d_TypeOfLightSource_NB] |
counters per each light source type enabled in the list More... | |
Standard_Integer | myNbEnabled |
number of enabled light sources, excluding ambient More... | |
Standard_Integer | myNbCastShadows |
number of enabled light sources casting shadows More... | |
Standard_Size | myRevision |
current revision of light source set More... | |
Standard_Size | myCacheRevision |
revision of cached state More... | |
Standard_Size | UpdateRevision () |
Update light sources revision. More... | |
Standard_Size | Revision () const |
Return light sources revision. More... | |
Standard_Integer | NbEnabled () const |
Returns total amount of enabled lights EXCLUDING ambient. More... | |
Standard_Integer | NbEnabledLightsOfType (Graphic3d_TypeOfLightSource theType) const |
Returns total amount of enabled lights of specified type. More... | |
Standard_Integer | NbCastShadows () const |
Returns total amount of enabled lights castings shadows. More... | |
const Graphic3d_Vec4 & | AmbientColor () const |
Returns cumulative ambient color, which is computed as sum of all enabled ambient light sources. Values are NOT clamped (can be greater than 1.0f) and alpha component is fixed to 1.0f. More... | |
const TCollection_AsciiString & | KeyEnabledLong () const |
Returns a string defining a list of enabled light sources as concatenation of letters 'd' (Directional), 'p' (Point), 's' (Spot) depending on the type of light source in the list. Example: "dppp". More... | |
const TCollection_AsciiString & | KeyEnabledShort () const |
Returns a string defining a list of enabled light sources as concatenation of letters 'd' (Directional), 'p' (Point), 's' (Spot) depending on the type of light source in the list, specified only once. Example: "dp". More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Standard_Transient | |
static const char * | get_type_name () |
Returns a type descriptor about this object. More... | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. More... | |
Class defining the set of light sources.
Iteration filter flags.
Graphic3d_LightSet::Graphic3d_LightSet | ( | ) |
Empty constructor.
Standard_Boolean Graphic3d_LightSet::Add | ( | const Handle< Graphic3d_CLight > & | theLight | ) |
Append new light source.
|
inline |
Returns cumulative ambient color, which is computed as sum of all enabled ambient light sources. Values are NOT clamped (can be greater than 1.0f) and alpha component is fixed to 1.0f.
|
inline |
Return TRUE if light source is defined in this set.
|
inline |
Return number of light sources.
|
inline |
Return TRUE if lights list is empty.
|
inline |
Returns a string defining a list of enabled light sources as concatenation of letters 'd' (Directional), 'p' (Point), 's' (Spot) depending on the type of light source in the list. Example: "dppp".
|
inline |
Returns a string defining a list of enabled light sources as concatenation of letters 'd' (Directional), 'p' (Point), 's' (Spot) depending on the type of light source in the list, specified only once. Example: "dp".
|
inline |
Return lower light index.
|
inline |
Returns total amount of enabled lights castings shadows.
|
inline |
Returns total amount of enabled lights EXCLUDING ambient.
|
inline |
Returns total amount of enabled lights of specified type.
|
inline |
Returns total amount of lights of specified type.
Standard_Boolean Graphic3d_LightSet::Remove | ( | const Handle< Graphic3d_CLight > & | theLight | ) |
Remove light source.
|
inline |
Return light sources revision.
Standard_Size Graphic3d_LightSet::UpdateRevision | ( | ) |
Update light sources revision.
|
inline |
Return upper light index.
|
inline |
|
protected |
cached value of cumulative ambient color
|
protected |
revision of cached state
|
protected |
key identifying the list of enabled light sources by their type
|
protected |
key identifying the list of enabled light sources by the number of sources of each type
|
protected |
list of light sources with their cached state (revision)
|
protected |
counters per each light source type defined in the list
|
protected |
counters per each light source type enabled in the list
|
protected |
number of enabled light sources casting shadows
|
protected |
number of enabled light sources, excluding ambient
|
protected |
current revision of light source set