📄 mlr_terrain.hpp
字号:
//===========================================================================//
// Copyright (C) Microsoft Corporation. All rights reserved. //
//===========================================================================//
#pragma once
#define MLR_MLR_TERRAIN_HPP
#if !defined(MLR_MLR_HPP)
#include <MLR\MLR.hpp>
#endif
#if !defined(MLR_MLR_I_DeT_TMESH_HPP)
#include <MLR\MLR_I_DeT_TMesh.hpp>
#endif
namespace MidLevelRenderer {
//##########################################################################
//#### MLRIndexedPolyMesh with no color no lighting w/ detail texture #####
//##########################################################################
class MLR_Terrain:
public MLR_I_DeT_TMesh
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Initialization
//
public:
static void
InitializeClass();
static void
TerminateClass();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructors/Destructors
//
protected:
MLR_Terrain(
ClassData *class_data,
Stuff::MemoryStream *stream,
int version
);
~MLR_Terrain();
public:
MLR_Terrain(ClassData *class_data=MLR_Terrain::DefaultData);
static MLR_Terrain*
Make(
Stuff::MemoryStream *stream,
int version
);
void
Save(Stuff::MemoryStream *stream);
public:
virtual int
TransformAndClip(Stuff::Matrix4D *, MLRClippingState, GOSVertexPool*,bool=false);
virtual void
TransformNoClip(Stuff::Matrix4D*, GOSVertexPool*,bool=false);
void
SetUVData(Stuff::Scalar, Stuff::Scalar, Stuff::Scalar, Stuff::Scalar, Stuff::Scalar);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class Data Support
//
public:
static ClassData
*DefaultData;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Testing
//
public:
void
TestInstance() const;
virtual int
GetSize()
{
Check_Object(this);
int ret = MLR_I_DeT_TMesh::GetSize();
return ret;
}
protected:
Stuff::Scalar borderPixelFun;
Stuff::Scalar xUVFac, zUVFac, minX, minZ;
static Stuff::DynamicArrayOf<Vector2DScalar> *clipTexCoords; // , Max_Number_Vertices_Per_Mesh
};
MLRShape*
CreateIndexedTriIcosahedron_TerrainTest(
IcoInfo&,
MLRState*,
MLRState*
);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -