Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.TerrainInfo


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
class TerrainInfo extends Info
	noexport
	showcategories(Movement,Collision,Lighting,LightColor,Karma,Force)
	native
	placeable;

struct NormalPair
{
	var vector Normal1;
	var vector Normal2;
};

enum ETexMapAxis
{
	TEXMAPAXIS_XY,
	TEXMAPAXIS_XZ,
	TEXMAPAXIS_YZ,
};

enum ESortOrder
{
	SORT_NoSort,
	SORT_BackToFront,
	SORT_FrontToBack
};

#if IG_SHARED // rowan: aniamtion types for procedurally animated decolayers
enum EAnimationType
{
	AT_None,
	AT_Wind,
};
#endif // IG

struct TerrainLayer
{
	var() Material	Texture;
	var() Texture	AlphaMap;
	var() float		UScale;
	var() float		VScale;
	var() float		UPan;
	var() float		VPan;
	var() ETexMapAxis TextureMapAxis;
	var() float		TextureRotation;
	var() Rotator	LayerRotation;
	var   Matrix	TerrainMatrix;
	var() float		KFriction;
	var() float		KRestitution;
	var   transient Texture	LayerWeightMap;
};

struct DecorationLayer
{
	var() int			ShowOnTerrain;
	var() Texture		ScaleMap;
	var() Texture		DensityMap;
	var() Texture		ColorMap;
	var() StaticMesh	StaticMesh;
	var() RangeVector	ScaleMultiplier;
	var() Range			FadeoutRadius;
	var() Range			DensityMultiplier;
	var() int			MaxPerQuad;
	var() int			Seed;
	var() int			AlignToTerrain;
	var() ESortOrder	DrawOrder;
	var() int			ShowOnInvisibleTerrain;
	var() int			LitDirectional;
	var() int			DisregardTerrainLighting;
	var() int			RandomYaw;

#if IG_SHARED // rowan: animation control
	var() EAnimationType	AnimationType;
	var() float				AnimationSpeed;
	var() float				AnimationAmplitude;
	var() float				AnimationWorldPeriod;
#endif

#if IG_TRIBES3	// michaelj: uniform deco layer scaling
	var() Range			ScaleMultiplier3D;
	var() int			GetLightingFromFinalisedMacro;
#endif
};


struct DecoInfo
{
	var vector	Location;
	var rotator	Rotation;
	var vector	Scale;
	var vector	TempScale;
	var color	Color;
	var int		Distance;

#if IG_R // rowan: UniqueID for vertex shaders
	var int		UniqueID;
#endif
}; 

struct DecoSectorInfo
{
	var array<DecoInfo>	DecoInfo;
	var vector			Location;
	var float			Radius;
};

struct DecorationLayerData
{
	var array<DecoSectorInfo> Sectors;
};

var() int						TerrainSectorSize;
var() Texture					TerrainMap;
var() vector					TerrainScale;
#if IG_MACROTEX // rowan: 
var const Texture				MacroTexture;
var const Texture				FinalisedMacroTexture;
var const Texture				RenderMacroTexture;
var native const Matrix			MacroTextureTransform;
#endif
#if IG_TRIBES3	// rowan: lightmap
var const Texture				LightmapTexture;
var const int					BuiltCurrentLightmap;
#endif
var() TerrainLayer				Layers[32];
var() array<DecorationLayer>	DecoLayers;
var() float						DecoLayerOffset;
var() bool						Inverted;
#if IG_TRIBES3	// rowan: can flag terrains as always visible
var() bool						AlwaysVisible;
var() bool						TileTerrain;
#endif
#if IG_SHARED	// rowan: new editable vars
var() transient bool			bDisableRebuildOnEdit;
#endif

// This option means use half the graphics res for Karma collision.
// Note - Karma ignores per-quad info (eg. 'invisible' and 'edge-turned') with this set to true.
var() bool						bKCollisionHalfRes;

//
// Internal data
//
var transient int							JustLoaded;
var	native const array<DecorationLayerData> DecoLayerData;
var native const array<TerrainSector>		Sectors;
var native const array<vector>				Vertices;
var native const int						HeightmapX;
var native const int 						HeightmapY;
var native const int 						SectorsX;
var native const int 						SectorsY;
var native const TerrainPrimitive 			Primitive;
var native const array<NormalPair>			FaceNormals;
var native const vector						ToWorld[4];
var native const vector						ToHeightmap[4];
#if IG_MACROTEX
var native const vector						ToMacro[4];
#endif // IG
var native const array<int>					SelectedVertices;
var native const int						ShowGrid;
var const array<int>						QuadVisibilityBitmap;
var const array<int>						EdgeTurnBitmap;
var const array<material> QuadDomMaterialBitmap;
var native const array<int>					RenderCombinations;
var native const array<int>					VertexStreams;
#if IG_R // rowan: TERRAIN_COLOR
var native const array<int>					ColorStreams;
#endif
var native const array<color>				VertexColors;
var native const array<color>				PaintedColor;		// editor only
var native const Texture CollapsedLayers;

// OLD
var native const Texture OldTerrainMap;
var native const array<byte> OldHeightmap;

#if IG_SHARED // rowan: New vars
var native const int DecolayerRenderer;
#endif

#if IG_TRIBES3 // rowan: space for quadtree and finalised data ptr
var native const int QuadTree;
var native const object FinalisedData;
var native const int ActiveHardwareData;

var native const array<int> HardwareIndexBuffers;
#endif

#if IG_R // rowan: Temporary Visibility Data
var native const int VisibleSectorsCount;
var native const int RenderThingsCount;
var native const int VisibleSectors;
var native const int SectorProjectors;
var native const int RenderThings;
#endif

#if IG_TRIBES3 // dbeswick: this function is called to determine whether a projectile can hit this actor
simulated event bool ShouldProjectileHit(Actor projInstigator)
{
	return true;
}
#endif

defaultproperties
{
	Texture=Texture'Engine_res.S_TerrainInfo'
	TerrainScale=(X=64,Y=64,Z=64)
	bStatic=True
	bStaticLighting=True
	bWorldGeometry=true
    bHidden=true
	TerrainSectorSize=16
	bKCollisionHalfRes=False

#if IG_SHARED // Alex:
	bBlockHavok=true
#endif
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 16:01:30.000 - Creation time: st 23.5.2018 00:10:47.553 - Created with UnCodeX