Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

terrain.h

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022 #ifndef __TERRAIN_H__
00023 #define __TERRAIN_H__
00024 
00025 void            Terrain_SetEpair( terrainMesh_t *p, const char *pKey, const char *pValue );
00026 const char*     Terrain_GetKeyValue( terrainMesh_t *p, const char *pKey );
00027 int             Terrain_MemorySize( terrainMesh_t *p );
00028 void            Terrain_Delete( terrainMesh_t *p );
00029 terrainMesh_t   *MakeNewTerrain( int width, int height, qtexture_t *texture = NULL );
00030 brush_t         *AddBrushForTerrain( terrainMesh_t *pm, bool bLinkToWorld = true );
00031 terrainMesh_t   *Terrain_Duplicate( terrainMesh_t *pFrom );
00032 void            Terrain_BrushToMesh( void );
00033 brush_t         *Terrain_Parse( void );
00034 void            Terrain_Write( terrainMesh_t *p, CMemFile *file );
00035 void            Terrain_Write( terrainMesh_t *p, FILE *file );
00036 void            Terrain_Select( terrainMesh_t *p );
00037 void            Terrain_Deselect( terrainMesh_t *p );
00038 void            Terrain_Move( terrainMesh_t *pm, const vec3_t vMove, bool bRebuild = false );
00039 void            UpdateTerrainInspector( void );
00040 void            Terrain_CalcBounds( terrainMesh_t *p, vec3_t &vMin, vec3_t &vMax );
00041 void            CalcTriNormal( const vec3_t a, const vec3_t b, const vec3_t c, vec3_t o );
00042 void            Terrain_CalcVertPos( terrainMesh_t *p, int x, int y, vec3_t vert );
00043 void            Terrain_CalcNormals( terrainMesh_t *p );
00044 void            Terrain_FindReplaceTexture( terrainMesh_t *p, const char *pFind, const char *pReplace, bool bForce );
00045 bool            Terrain_HasTexture( terrainMesh_t *p, const char *name );
00046 void            Terrain_ReplaceQTexture( terrainMesh_t *p, qtexture_t *pOld, qtexture_t *pNew );
00047 void            Terrain_SetTexture( terrainMesh_t *p, texdef_t *tex_def );
00048 void            Terrain_Scale( terrainMesh_t *p, const vec3_t vOrigin, const vec3_t vAmt, bool bRebuild = true );
00049 bool            Terrain_DragScale( terrainMesh_t *p, vec3_t vAmt, vec3_t vMove );
00050 void            Terrain_ApplyMatrix( terrainMesh_t *p, const vec3_t vOrigin, const vec3_t vMatrix[ 3 ], bool bSnap );
00051 void            Terrain_DrawFace( brush_t *brush, terrainFace_t *terraface );
00052 void            DrawTerrain( terrainMesh_t *pm, bool bPoints, bool bShade = false );
00053 void            Terrain_DrawCam( terrainMesh_t *pm );
00054 void            Terrain_DrawXY( terrainMesh_t *pm, entity_t *owner );
00055 bool            OnlyTerrainSelected( void );
00056 bool            AnyTerrainSelected( void );
00057 terrainMesh_t   *SingleTerrainSelected( void );
00058 void            Terrain_Edit( void );
00059 void            Terrain_SelectPointByRay ( vec3_t org, vec3_t dir, int buttons );
00060 void            Terrain_AddMovePoint( vec3_t v, bool bMulti, bool bFull, int buttons );
00061 void            Terrain_UpdateSelected( vec3_t vMove );
00062 int             Terrain_PointInMoveList( terrainVert_t *pf );
00063 void            Terrain_AddPoint( terrainMesh_t *p, terrainVert_t *v );
00064 void            Terrain_RemovePointFromMoveList( terrainVert_t *v );
00065 void            Terrain_SelectAreaPoints( void );
00066 bool            RayTriangleIntersect( vec3_t orig, vec3_t dir, vec3_t vert1, vec3_t vert2, vec3_t vert3, float *t );
00067 terrainFace_t   *Terrain_Ray( vec3_t origin, vec3_t dir, brush_t *b, float *dist );
00068 void            Select_TerrainFacesFromBrush( brush_t *brush );
00069 void            SetTerrainTexdef( brush_t *brush, terrainFace_t *vert, texdef_t *texdef );
00070 void            RotateTerrainFaceTexture( terrainFace_t *vert, int nAxis, float fDeg );
00071 void            TerrainFace_FitTexture( terrainFace_t *vert );
00072 void            Select_TerrainFace( brush_t * brush, terrainFace_t *terraface );
00073 void            Terrain_Init( void );
00074 
00075 #endif

Generated on Thu Aug 25 12:38:40 2005 for Quake III Arena by  doxygen 1.3.9.1