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.
104 lines
2.4 KiB
C++
104 lines
2.4 KiB
C++
#pragma once
|
|
|
|
#include "ElementRenderer.hpp"
|
|
|
|
namespace MidLevelRenderer {
|
|
class MLRTriangleCloud;
|
|
}
|
|
|
|
namespace ElementRenderer {
|
|
|
|
//#########################################################################
|
|
//######################### TriangleCloudElement ################################
|
|
//#########################################################################
|
|
|
|
class TriangleCloudElement:
|
|
public Element
|
|
{
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Initialization
|
|
//
|
|
public:
|
|
static void InitializeClass();
|
|
static void TerminateClass();
|
|
static ClassData *DefaultData;
|
|
|
|
typedef Element BaseClass;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Constructors/Destructors
|
|
//
|
|
protected:
|
|
TriangleCloudElement(
|
|
Stuff::MemoryStream *stream,
|
|
int version
|
|
);
|
|
|
|
public:
|
|
TriangleCloudElement(unsigned max_tris);
|
|
~TriangleCloudElement();
|
|
|
|
static TriangleCloudElement* Make(
|
|
Stuff::MemoryStream *stream,
|
|
int version,
|
|
ShapeHolder shapes=NULL
|
|
);
|
|
|
|
void Save(Stuff::MemoryStream *stream);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Testing
|
|
//
|
|
public:
|
|
void TestInstance();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Hierarchy
|
|
//
|
|
protected:
|
|
void AttachChild(Element *child);
|
|
void DetachChild(Element *child);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Collision
|
|
//
|
|
protected:
|
|
bool CastCulledRay(CollisionQuery *query);
|
|
Element* FindSmallestElementContainingCulled(SphereTest *test);
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// 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
|
|
);
|
|
|
|
public:
|
|
MidLevelRenderer::MLRTriangleCloud* GetTriangleCloud()
|
|
{Check_Object(this); return m_MLRTriangleCloud;}
|
|
|
|
void SetDataPointers(
|
|
const unsigned *used_triangles,
|
|
const Stuff::Point3D *point_data,
|
|
const Stuff::RGBAColor *color_data
|
|
);
|
|
|
|
int CountTriangles();
|
|
|
|
protected:
|
|
MidLevelRenderer::MLRTriangleCloud *m_MLRTriangleCloud;
|
|
};
|
|
|
|
}
|