57 void *
operator new(
size_t nSize) {
58 return PoolMemAlloc(
static_cast<int>(nSize),
"Environ", 0);
66 void operator delete(
void *pBlock) {
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
Text output stream.
Definition prnstream.h:16
RndDrawable()
Construct a showing drawable without a highlight or children.
Definition rnddrawable.h:23
static const char * sClassName
The class name a .rnd file writes, Environ.
Definition rndenviron.h:190
std::list< RndLight * > mLights
Definition rndenviron.h:297
RndEnviron(const char *pszName)
Construct an environment without lights, with a black ambient colour and no white fog.
void SetFogDensity(float fFogDensity)
Definition rndenviron.h:242
const char * ClassName() const override
Report the class name.
Definition rndenviron.h:130
const Color & GetAmbientColor() const
Definition rndenviron.h:217
int mFogMode
Definition rndenviron.h:309
static int sRev
The format version Save() writes and Load() accepts.
Definition rndenviron.h:214
static RndEnviron * sCurrent
The environment drawn last.
Definition rndenviron.h:198
float mFogEnd
Definition rndenviron.h:303
std::list< RndLight * > & GetLights()
Definition rndenviron.h:272
FogMode
The fog modes.
Definition rndenviron.h:21
@ kFogVertLinear
Definition rndenviron.h:25
@ kFogVertExp2
Definition rndenviron.h:24
@ kFogVertExp
Definition rndenviron.h:23
@ kFogPixelExp2
Definition rndenviron.h:27
@ kFogPixelLinear
Definition rndenviron.h:28
@ kFogPixelExp
Definition rndenviron.h:26
@ kFogNone
Definition rndenviron.h:22
void Copy(const RndObject *pSource, int nFlags) override
Copy another environment and its base.
int DrawShowing() override
Make the environment current.
Definition rndenviron.h:88
void ListDrawObjects(std::list< RndObject * > &objects) override
Add the lights to a list.
void SetFogEnd(float fFogEnd)
Definition rndenviron.h:252
const std::list< RndLight * > & GetLights() const
Definition rndenviron.h:267
float GetFogDensity() const
Definition rndenviron.h:237
float mFogStart
Definition rndenviron.h:301
void ReleaseRefs()
Drop the references on the lights.
void DumpText(PrnStream &stream) override
Write a description of the environment and its base.
void SetAmbientColor(const Color &color)
Definition rndenviron.h:222
const Color & GetFogColor() const
Definition rndenviron.h:227
float GetFogStart() const
Definition rndenviron.h:257
float mFogDensity
Definition rndenviron.h:305
void Save(BinStream &stream) override
Write the environment and its base.
static RndObject * New(const char *pszName)
Create an environment.
Definition rndenviron.h:180
float GetFogEnd() const
Definition rndenviron.h:247
~RndEnviron() override
Drop the references on the lights.
static RndEnviron * sDefault
The environment CreateDefault() made.
Definition rndenviron.h:206
Color mFogColor
Definition rndenviron.h:307
static constexpr int kCopyKeepLights
The bit of the Copy() flags that keeps the lights rather than copying the source's.
Definition rndenviron.h:32
void Replace(RndObject *pFrom, RndObject *pTo) override
Replace a referenced light with another.
void AddLight(RndLight *pLight)
Add a light, or report one already among the lights.
void Load(BinStream &stream) override
Read what Save() wrote.
Color mAmbientColor
Definition rndenviron.h:299
static void CreateDefault()
Create the default environment and add it to the default camera.
void SetFogStart(float fFogStart)
Definition rndenviron.h:262
void AcquireRefs()
Take references on the lights.
void SetFogColor(const Color &color)
Definition rndenviron.h:232
Light, placed by its transform.
Definition rndlight.h:16
RndObject(const char *pszName)
Construct an object and register it under a name.
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.
PrnStream & operator<<(PrnStream &stream, RndEnviron::FogMode eMode)
Write the name of a fog mode.
Linear colour with four float components.
Definition color.h:12