📄 mlr_i_c_pmesh.hpp
字号:
//===========================================================================//
// Copyright (C) Microsoft Corporation. All rights reserved. //
//===========================================================================//
#pragma once
#define MLR_MLR_I_C_PMESH_HPP
#if !defined(MLR_MLR_HPP)
#include <MLR\MLR.hpp>
#endif
#if !defined(MLR_MLR_I_PMESH_HPP)
#include <MLR\MLR_I_PMesh.hpp>
#endif
namespace MidLevelRenderer {
//##########################################################################
//#### MLRIndexedPolyMesh with color but no lighting one texture layer ####
//##########################################################################
class MLR_I_C_PMesh:
public MLR_I_PMesh
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Initialization
//
public:
static void
InitializeClass();
static void
TerminateClass();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructors/Destructors
//
protected:
MLR_I_C_PMesh(
ClassData *class_data,
Stuff::MemoryStream *stream,
int version
);
~MLR_I_C_PMesh();
public:
MLR_I_C_PMesh(ClassData *class_data=MLR_I_C_PMesh::DefaultData);
static MLR_I_C_PMesh*
Make(
Stuff::MemoryStream *stream,
int version
);
void
Save(Stuff::MemoryStream *stream);
public:
// void Copy(MLRIndexedPolyMesh*);
#if COLOR_AS_DWORD
virtual void
SetColorData(
const DWORD *array,
int point_count
);
virtual void
GetColorData(
DWORD **array,
int *point_count
);
#else
virtual void
SetColorData(
const Stuff::RGBAColor *array,
int point_count
);
virtual void
GetColorData(
Stuff::RGBAColor **array,
int *point_count
);
#endif
virtual void
#if COLOR_AS_DWORD
PaintMe(const DWORD *paintMe);
#else
PaintMe(const Stuff::RGBAColor *paintMe);
#endif
virtual int TransformAndClip(Stuff::Matrix4D *, MLRClippingState, GOSVertexPool*,bool=false);
virtual void
TransformNoClip(Stuff::Matrix4D*, GOSVertexPool*,bool=false);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class Data Support
//
public:
static ClassData
*DefaultData;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Testing
//
public:
void
TestInstance() const;
virtual int
GetSize()
{
Check_Object(this);
int ret = MLR_I_PMesh::GetSize();
ret += colors.GetSize();
return ret;
}
protected:
#if COLOR_AS_DWORD
Stuff::DynamicArrayOf<DWORD> colors; // Base address of color list
#else
Stuff::DynamicArrayOf<Stuff::RGBAColor> colors; // Base address of color list
#endif
};
MLR_I_C_PMesh*
CreateIndexedCube_Color_NoLit(Stuff::Scalar, Stuff::RGBAColor*, MLRState*);
MLR_I_PMesh*
CreateIndexedViewFrustrum_Color_NoLit(
Stuff::Scalar near_clip,
Stuff::Scalar far_clip,
Stuff::Scalar left_clip,
Stuff::Scalar right_clip,
Stuff::Scalar top_clip,
Stuff::Scalar bottom_clip,
Stuff::RGBAColor&,
MLRState*
);
MLRShape*
CreateIndexedIcosahedron_Color_NoLit(
IcoInfo&,
MLRState*
);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -