Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
C3DLight Class Reference

This class implements a light object in the scene (OBJECT_LIGHT) More...

Detailed Description

This class implements a light object in the scene (OBJECT_LIGHT)

#include <3DLight.h>

Inheritance diagram for C3DLight:
C3DBaseObject CInstanciatedObject

Public Member Functions

int GetLightKind ()
 
void SetLightKind (int kind)
 
CRGBColor GetColor ()
 
void SetColor (CRGBColor col)
 
double GetIntensity ()
 
void SetIntensity (double v)
 
double GetInnerRadius ()
 
void SetInnerRadius (double v)
 
double GetOuterRadius ()
 
void SetOuterRadius (double v)
 
void ClearAttenuation ()
 
double GetInnerAngle ()
 
void SetInnerAngle (double v)
 
double GetOuterAngle ()
 
void SetOuterAngle (double v)
 
virtual bool IsFinalObject () const
 
virtual C3DBaseObjectGetFinalObject (bool detach=false, bool computeIfNeeded=true)
 Returns the object itself or any kind of object. For example for a patch it can returns a C3DObject or a C3DPatch if the patch is not subdivided.
 
- Public Member Functions inherited from C3DBaseObject
virtual bool DeleteFromNode ()
 
virtual void PostSerialize (CXArchive &ar, bool lastCall)
 
virtual void Serialize (CXArchive &ar)
 
virtual void SetScene (C3DScene *scene)
 Associate the object to a scene. a GUID for that object in the scene is assigned.
 
C3DSceneGetScene () const
 Get the associated object scene.
 
BaseObjectID GetObjectID () const
 Return the node GUID depending on the scene. If no scene defined, CGuidMgr::UNDEFINED_GUID is returned.
 
int GetInstanceCount () const
 Return the instance count. If the count then this is a single object that is referenced only one time in the scene.
 
bool IsInstanciated () const
 return true if several instance of the object exists. The C3DSceneNode that reference these instances can be retrieved using C3DScene::GetInstancesByID
 
unsigned int GetCustomDataChecksum (unsigned int ignoreCustomID,...) const
 For object which are not geometric object, the checksum could be made on CustomData, and you can ignore some ID might be ignored if they content runtime value that does not reflect a change of the content. The list must be terminated by 0.
 
virtual unsigned int GetChecksum (unsigned int checksumFlags=CHECKSUM_ALL) const
 When not overriden, the checksum is only made on the kind of object. When overidden, only the geometric data is taken into account. CustomData content is ignored, but if it is important a call to GetChecksum(unsigned int, ...) could be done.
 
virtual bool NeedUpdate () const
 
virtual bool Update (C3DScene *scene, unsigned int updateMode)
 Information that have been invalidated are recomputed when calling this method.IsInstanciated.
 
virtual void Invalidate (unsigned int objectInvalidationFlags, bool set=true)
 Notify that some information changed (combination of OBJECT_UPDATE_PROPERTIES invalidation flags) and invalidate related information, which will be updated in the Update call. The invalidated information is not destroyed until the next Update call.
 
virtual bool InvalidateChannels (unsigned int channelType)
 Notify that channels that have cache should be recomputed (ie, UVW channel or normal channel for example). This give better control than Invalidate(OBJECT_INV_CHANNELS) which invalidate any channel information. We can specify with this method what need to be invalidated depending on the performed operation. Return true, if a cache has been invalidated.
 
unsigned int GetInvalidateFlags () const
 Return the flags that have been invalidated.
 
bool IsInvalidate (OBJECT_UPDATE_PROPERTIES flag) const
 Allow to know if an invalidate flag has been set. Invalidate flag is reset when Update is called.
 
longint GetUpdateStamp (OBJECT_UPDATE_PROPERTIES flags) const
 Allow to know if the given flag changed between two call.
 
virtual bool MatrixTransform (const C4x4Matrix &matrix)
 Transform the 3D information with the given matrix. The object should not be instanciated or all instance are modified.
 
C3DBaseObjectCopy (int copyflags=OBJECT_COPY_DEFAULT, C3DObjectCreator *objectCreator=NULL) const
 
void SetFlag (OBJECT_PROPERTIES flag, bool set)
 
void SetFlags (unsigned int flags, bool set)
 
bool IsFlagSet (OBJECT_PROPERTIES flag) const
 
bool IsOneFlagSet (unsigned int flags) const
 
bool CheckFlags (unsigned int checkflags, bool allSetOrNoneSet) const
 
virtual void InheritFlags (const C3DBaseObject &srcObject, int copyflags=OBJECT_COPY_DEFAULT)
 This methods only inherits srcObject flags and custom data and optionaly objectGUID / instanceID if srcObject is to be replaced by the object. It does not modify the data structure.
 
CCustomDataGetCustomData ()
 
const CCustomDataGetCustomData () const
 
 operator C3DGeomObject * () const
 Operators (cast operators, return NULL if object is this or if the type is incorrect It does not perform any geometric or topologic conversions.
 
 operator C3DGroup * () const
 Cf. C3DGeomObject*().
 
 operator C3DObject * () const
 Cf. C3DGeomObject*().
 
 operator C3DCurve * () const
 Cf. C3DGeomObject*().
 
 operator C3DPatch * () const
 Cf. C3DGeomObject*().
 
 operator C3DDummy * () const
 Cf. C3DGeomObject*().
 
 operator C3DLight * () const
 Cf. C3DGeomObject*().
 
 operator C3DCamera * () const
 Cf. C3DGeomObject*().
 
bool IsGeomObject () const
 return true if the object is an OBJECT_GEOM. Cf. OBJECT_KINDOF
 
OBJECT_KINDOF GetKindOf () const
 return OBJECT_KINDOF, which defines the kind of object.
 
CXString GetTypeString () const
 return a string containing the kind of the object ("curve", "camera"...)
 
- Public Member Functions inherited from CInstanciatedObject
virtual bool Delete ()
 
int GetRefCount () const
 
int AddRef () const
 

Additional Inherited Members

- Static Public Member Functions inherited from C3DBaseObject
static C3DBaseObjectCreate (OBJECT_KINDOF kindOf)
 Allocates and creates a new empty object of the given type OBJECT_KINDOF. Uses xNew internally.
 

Member Function Documentation

◆ GetFinalObject()

virtual C3DBaseObject * C3DLight::GetFinalObject ( bool  detach = false,
bool  computeIfNeeded = true 
)
inlinevirtual

Returns the object itself or any kind of object. For example for a patch it can returns a C3DObject or a C3DPatch if the patch is not subdivided.

Reimplemented from C3DBaseObject.

◆ IsFinalObject()

virtual bool C3DLight::IsFinalObject ( ) const
inlinevirtual

Reimplemented from C3DBaseObject.


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