80 static void *
operator new(
size_t nSize);
89 static void operator delete(
void *pBlock);
151 virtual void SetAttenuation(
float flConstant,
float flLinear,
float flQuadratic);
274 float mConstantAtten;
276 float mQuadraticAtten;
285 unsigned char mReservedfc[0x04];
316extern Light *(*g_pfnNewLight)(
const HxStr &name);
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Sink that the engine formats its diagnostic and failure text into.
Definition dbg.h:33
Light in a scene.
Definition light.h:41
virtual void SetColors(const Color &ambient, const Color &diffuse, const Color &specular)
Set all three colours at once.
Color mAmbient
Light every vertex receives from this light regardless of its normal.
Definition light.h:252
Type
Which lighting model a light applies.
Definition light.h:50
@ kLightTypeSpot
Definition light.h:50
@ kLightTypeDirectional
Definition light.h:50
@ kLightTypePoint
Definition light.h:50
virtual void SetAngles(float flInner, float flOuter)
Set the two cone angles of a spot light.
Color mSpecular
Highlight colour the light contributes.
Definition light.h:263
Type mType
Which lighting model this light applies.
Definition light.h:280
Light(const HxStr &name)
Construct a white directional light.
virtual void Load(Stream &stream)
Replace the three colours, the six scalars, and the type from stream.
virtual void SetAttenuation(float flConstant, float flLinear, float flQuadratic)
Set the three attenuation terms of a point light.
virtual void DumpText(Dbg &sink)
Write a description of this light to sink.
virtual void SetType(Type type)
Set which lighting model this light applies.
Color mDiffuse
Light a vertex receives in proportion to its normal.
Definition light.h:249
virtual void SyncLight()
Hook run after the whole state of the light changes at once.
float mRange
Distance a point light illuminates over.
Definition light.h:271
virtual void SetRange(float flRange)
Set the distance a point light illuminates over.
virtual void Replace(Object *pFrom, Object *pTo)
Retarget the references of the base at pTo.
virtual const HxStr & ClassName() const
Report the class key a .rnd file writes for a light.
virtual void Save(Stream &stream)
Write the revision, the base, the three colours, the six scalars, and the type to stream.
virtual void Copy(const Object *pSource, unsigned nFlags)
Copy the three colours, the six scalars, and the type from pSource.
Base of every object the renderer can load, resolve by name, and serialise.
Definition object.h:43
Byte stream that every renderer object serialises itself through.
Definition stream.h:31
The rendering engine.
Definition animhelper.h:3
void RegisterLightClass()
Point g_pfnNewLight at NewLight() and register the "Light" class with Rnd::Manager.
Light * NewLight(const HxStr &name)
Allocate and construct a light.
HxStr g_lightClassName
Registered class name of Rnd::Light, the string "Light".
Object * CreateRegisteredLight(const HxStr &name)
Build a light for the registered "Light" class by calling through g_pfnNewLight.
Light * NewLightThroughHook(const HxStr &name)
Build a light through the creator hook.
Linear colour with four float components.
Definition color.h:10