|
wavelength 1.0.0
|
Light, placed by its transform. More...
#include <rndlight.h>


Public Types | |
| enum | Type { kTypePoint = 0 , kTypeDirectional = 1 , kTypeSpot = 2 } |
| The kinds of light. More... | |
| Public Types inherited from RndTransformable | |
| enum | Billboard { kBillboardNone = 0 , kBillboardX = 1 , kBillboardY = 2 , kBillboardZ = 4 , kBillboardXZ = 8 , kBillboardXYZ = 16 , kBillboardSimpleXYZ = 32 , kBillboardLocalRotate = 64 , kBillboardScale = 128 , kBillboardScaleX = 129 , kBillboardScaleY = 130 , kBillboardScaleZ = 132 , kBillboardScaleXZ = 136 , kBillboardScaleXYZ = 144 , kBillboardScaleSimpleXYZ = 160 } |
| How the world transform turns to face the current camera. More... | |
Public Member Functions | |
| RndLight (const char *pszName) | |
| Construct a white directional light with a range of 1000, cone angles of a quarter turn, and no attenuation. | |
| ~RndLight () override | |
| Destroy the light. | |
| void * | operator new (size_t nSize) |
| Allocate a light, billed to the class name. | |
| void | operator delete (void *pBlock) |
| Release a light. | |
| virtual void | SetColor (const Color &color) |
| Set the colour. | |
| virtual void | SetType (int nType) |
| Set the kind of light. | |
| virtual void | SetRange (float fRange) |
| Set the range. | |
| virtual void | SetAngles (float fInnerAng, float fOuterAng) |
| Set the angles of the cone of a spot light. | |
| virtual void | SetAttenuation (float fConstant, float fLinear, float fQuadratic) |
| Set the attenuation. | |
| virtual void | Sync () |
| Pass the settings to the back end. | |
| void | DumpText (PrnStream &stream) override |
| Write a description of the light and its base. | |
| void | Save (BinStream &stream) override |
| Write the light and its base. | |
| void | Replace (RndObject *pFrom, RndObject *pTo) override |
| Replace a referenced object with another in the base. | |
| const char * | ClassName () const override |
| Report the class name. | |
| void | Copy (const RndObject *pSource, int nFlags) override |
| Copy another light and its base, then pass the settings to the back end. | |
| void | Load (BinStream &stream) override |
| Read what Save() wrote, or an earlier version of it, then pass the settings to the back end. | |
| const Color & | GetColor () const |
| float | GetRange () const |
| int | GetType () const |
| Public Member Functions inherited from RndTransformable | |
| RndTransformable () | |
| Construct a transformable with identity transforms, no origin offset, and no billboard. | |
| ~RndTransformable () override | |
| Drop the references on the children. | |
| virtual void | SetBillboard (int nBillboard) |
| Set the billboard mode. | |
| virtual int | UpdateWorldXfm (RndTransformable *pParent, int bForce) |
| Recompute the world transform when it, or the parent's, changed, and then the children's. | |
| void | DumpText (PrnStream &stream) override |
| Write a description of the transformable. | |
| void | Save (BinStream &stream) override |
| Write the transforms, the names of the children, the billboard mode, and the origin. | |
| void | Replace (RndObject *pFrom, RndObject *pTo) override |
| Replace a child with another object. | |
| void | Copy (const RndObject *pSource, int nFlags) override |
| Copy the transforms, the billboard mode, the origin, and the children when the flags request them. | |
| void | Load (BinStream &stream) override |
| Read what Save() wrote, or an earlier version of it. | |
| void | SetOrigin (const Vector3 &origin) |
| Set the point the world transform subtracts first when there is no billboard. | |
| RndTransformable * | Parent () |
| Find the transformable whose children include this object. | |
| bool | AddTrans (RndTransformable *pTrans) |
| Append a child and mark its world transform dirty. | |
| void | RemoveTrans (RndTransformable *pTrans) |
| Remove a child. | |
| void | ClearTrans () |
| Remove every child. | |
| const Transform & | BillboardXfm () |
| Report the world transform turned to face the current camera. | |
| const Transform & | GetLocalXfm () const |
| Transform & | GetLocalXfm () |
| void | SetLocalXfm (const Transform &xfm) |
| const Transform & | GetWorldXfm () const |
| Transform & | GetWorldXfm () |
| int | GetDirty () const |
| void | SetDirty (int nDirty) |
| const std::list< RndTransformable * > & | GetTransList () const |
| Public Member Functions inherited from RndObject | |
| RndObject (const char *pszName) | |
| Construct an object and register it under a name. | |
| virtual | ~RndObject () |
| Notify every referrer, then erase the registration. | |
| void | SetName (const char *pszName) |
| Register the object under a different name. | |
| void | AddRef (RndObject *pReferrer) |
| Register an object as a store of a pointer to this one. | |
| void | RemoveRef (RndObject *pReferrer) |
| Drop the first registration AddRef() made for a referrer. | |
| const char * | GetName () const |
| const std::list< RndObject * > & | GetRefs () const |
| int | GetInternal () const |
| void | SetInternal (int nInternal) |
Static Public Member Functions | |
| static void | CreateDefault () |
| Create the default light, add it to the default environment, and place it under the default camera. | |
| static RndObject * | New (const char *pszName) |
| Create a light. | |
| Static Public Member Functions inherited from RndTransformable | |
| static void | CollectChildren (std::list< RndObject * > &objects, RndTransformable *pTransformable) |
| Append every transform descendant of a transformable, depth first, each before its descendants. | |
Static Public Attributes | |
| static RndLight * | sDefault |
| The light CreateDefault() made. | |
| static const char * | sClassName |
| The class name a .rnd file writes, Light. | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
| Static Public Attributes inherited from RndTransformable | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
| Static Public Attributes inherited from RndObject | |
| static constexpr int | kCopyChildLists = 0x200 |
| The bit of the Copy() flags that copies the child lists of the mix-ins. | |
Additional Inherited Members | |
| Protected Member Functions inherited from RndTransformable | |
| void | ReleaseTransRefs () |
| Drop the reference on every child without emptying the list. | |
| void | AcquireTransRefs () |
| Take a reference on every child. | |
| Protected Attributes inherited from RndTransformable | |
| std::list< RndTransformable * > | mTransList |
| Transform | mLocalXfm |
| Transform | mWorldXfm |
| Vector3 | mOrigin |
| int | mDirty |
| int | mBillboard |
| Protected Attributes inherited from RndObject | |
| std::list< RndObject * > | mRefs |
| String | mName |
Light, placed by its transform.
The RTTI includes the class name and records RndTransformable as the one base.
| enum RndLight::Type |
|
explicit |
Construct a white directional light with a range of 1000, cone angles of a quarter turn, and no attenuation.
| pszName | The registry key. |
|
override |
Destroy the light.
|
inline |
Allocate a light, billed to the class name.
| nSize | The object size the compiler supplies. |
|
inline |
Release a light.
| pBlock | The block. |
|
inlinevirtual |
Set the colour.
| color | The colour. |
|
inlinevirtual |
Set the kind of light.
| nType | The Type. |
|
inlinevirtual |
Set the range.
| fRange | The range. |
|
inlinevirtual |
Set the angles of the cone of a spot light.
The name is inferred.
| fInnerAng | The angle of full light. |
| fOuterAng | The angle light ends at. |
|
inlinevirtual |
Set the attenuation.
The name is inferred.
| fConstant | The constant attenuation. |
| fLinear | The attenuation in proportion to the distance. |
| fQuadratic | The attenuation in proportion to the square of the distance. |
|
inlinevirtual |
Pass the settings to the back end.
The base body does nothing. The name is inferred.
|
overridevirtual |
Write a description of the light and its base.
| stream | The stream to write to. |
Reimplemented from RndObject.
|
overridevirtual |
Write the light and its base.
| stream | The stream to write to. |
Implements RndObject.
Replace a referenced object with another in the base.
| pFrom | The object being replaced. |
| pTo | The replacement, or null. |
Implements RndObject.
|
inlineoverridevirtual |
Report the class name.
Implements RndObject.
|
overridevirtual |
Copy another light and its base, then pass the settings to the back end.
| pSource | The light to copy from. |
| nFlags | The set of fields to copy. |
Implements RndObject.
|
overridevirtual |
|
static |
Create the default light, add it to the default environment, and place it under the default camera.
The name is inferred.
|
inlinestatic |
Create a light.
| pszName | The registry key. |
|
inline |
|
inline |
|
inline |
|
static |
|
static |
The class name a .rnd file writes, Light.
|
static |