terrRender.h

Engine/source/terrain/terrRender.h

More...

Classes:

Public Enumerations

enum
TerrConstants {
  MaxClipPlanes = 8
  MaxTerrainLights = 64
  MaxVisibleLights = 31
  ClipPlaneMask = (1 << MaxClipPlanes) - 1
  FarSphereMask = 0x80000000
  FogPlaneBoxMask = 0x40000000
}

Public Functions

GFX_DeclareTextureProfile(TerrainLayerTexProfile )

A special texture profile used for the terrain layer id map.

Detailed Description

Public Enumerations

TerrConstants

Enumerator

MaxClipPlanes = 8

left, right, top, bottom - don't need far tho...

MaxTerrainLights = 64
MaxVisibleLights = 31
ClipPlaneMask = (1 << MaxClipPlanes) - 1
FarSphereMask = 0x80000000
FogPlaneBoxMask = 0x40000000

Public Functions

GFX_DeclareTextureProfile(TerrainLayerTexProfile )

A special texture profile used for the terrain layer id map.

 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23
24//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
25// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
26// Copyright (C) 2015 Faust Logic, Inc.
27//
28//    The terrain implementation of zodiacs is largely contained in
29//    afxZodiac.[h,cpp], however, some changes are required to the terrain
30//    code. Structures EmitChunk and SquareStackNode now contain an
31//    afxZodiacBitmask for keeping track of zodiac intersections.
32//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
33
34#ifndef _TERRRENDER_H_
35#define _TERRRENDER_H_
36
37#ifndef _TERRDATA_H_
38#include "terrain/terrData.h"
39#endif
40
41#include "afx/ce/afxZodiacDefs.h"
42enum TerrConstants : U32
43{
44   MaxClipPlanes       = 8, ///< left, right, top, bottom - don't need far tho...
45   //MaxTerrainMaterials = 256,
46
47   MaxTerrainLights = 64,
48   MaxVisibleLights = 31,
49   ClipPlaneMask    = (1 << MaxClipPlanes) - 1,
50   FarSphereMask    = 0x80000000,
51   FogPlaneBoxMask  = 0x40000000,
52};
53
54class SceneRenderState;
55
56
57// Allows a lighting system to plug into terrain rendering
58class TerrainLightingPlugin
59{
60public:
61   virtual ~TerrainLightingPlugin() {}
62   
63   virtual void setupLightStage(LightManager * lm, LightInfo* light, SceneData& sgData, BaseMatInstance* basemat, BaseMatInstance** dmat) = 0;
64   virtual void cleanupLights(LightManager * lm) {}
65};
66
67
68/// A special texture profile used for the terrain layer id map.
69GFX_DeclareTextureProfile( TerrainLayerTexProfile );
70
71#endif // _TERRRENDER_H_
72