Files
firestorm/Gameleap/code/mw4/Libraries/elementrenderer/MultiLODElement.hpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

109 lines
2.2 KiB
C++

#pragma once
#include "ElementRenderer.hpp"
#include "ListElement.hpp"
//#########################################################################
//######################### MultiLODElement ###############################
//#########################################################################
namespace ElementRenderer {
class GroupElement;
class MultiLODElement:
public ListElement
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Initialization
//
public:
static void InitializeClass();
static void TerminateClass();
static ClassData *DefaultData;
typedef ListElement BaseClass;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructors/Destructors
//
protected:
MultiLODElement(
Stuff::MemoryStream *stream,
int version,
ShapeHolder shapes
);
public:
MultiLODElement();
~MultiLODElement();
static MultiLODElement* Make(
Stuff::MemoryStream *stream,
int version,
ShapeHolder shapes=NULL
);
void Save(Stuff::MemoryStream *stream);
static HGOSHEAP s_Heap;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Testing
//
public:
void TestInstance();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Hierarchy
//
public:
struct Entry
{
Stuff::Scalar
m_nearSquared,
m_fadeInSquared,
m_fadeOutSquared,
m_farSquared;
};
void AttachLOD(
WORD index,
Element *element,
const Entry &entry
);
int AttachLODFirstAvailableSlot(
Element *element,
const Entry &entry
);
void SetSize(WORD total_cells);
protected:
void DetachChild(Element *child);
Stuff::DynamicArrayOf<Entry> m_LODs;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Drawing
//
protected:
void SetDrawState();
static DrawMethod DrawMethods[DrawStateCount];
void InheritDrawMethod(
CameraElement *camera,
const StateChange *inherited_state,
int clipping_state
);
void OverrideDrawMethod(
CameraElement *camera,
const StateChange *inherited_state,
int clipping_state
);
};
}