Interface to terrain engine. More...
#include
Public Member Functions | |
virtual bool | SetCompiledData (byte *pData, int nDataSize, std::vector< struct IStatObj *> **ppStatObjTable, std::vector< IMaterial *> **ppMatTable, bool bHotUpdate=false, SHotUpdateInfo *pExportInfo=NULL)=0 |
Loads data into terrain engine from memory block. | |
virtual bool | GetCompiledData (byte *pData, int nDataSize, std::vector< struct IStatObj *> **ppStatObjTable, std::vector< IMaterial *> **ppMatTable, std::vector< struct IStatInstGroup *> **ppStatInstGroupTable, EEndian eEndian, SHotUpdateInfo *pExportInfo=NULL)=0 |
Saves data from terrain engine into memory block. | |
virtual int | GetCompiledDataSize (SHotUpdateInfo *pExportInfo=NULL)=0 |
virtual IRenderNode * | AddVegetationInstance (int nStaticGroupID, const Vec3 &vPos, const float fScale, uint8 ucBright, uint8 angle, uint8 angleX=0, uint8 angleY=0)=0 |
Create and place a new vegetation object on the terrain. | |
virtual void | SetOceanWaterLevel (float oceanWaterLevel)=0 |
Set ocean level. | |
virtual void | MarkAndOffsetCloneRegion (const AABB ®ion, const Vec3 &offset)=0 |
virtual void | CloneRegion (const AABB ®ion, const Vec3 &offset, float zRotation, const uint16 *pIncludeLayers=NULL, int numIncludeLayers=0)=0 |
virtual void | ClearCloneSources ()=0 |
Remove all objects that were marked by MarkAndOffsetCloneRegion. | |
virtual int | GetTerrainLightmapTexId (Vec4 &vTexGenInfo)=0 |
virtual void | GetAtlasTexId (int &nTex0, int &nTex1, int &nTex2)=0 |
Return terrain texture atlas texture id's. | |
virtual void | GetStatObjAndMatTables (DynArray< IStatObj *> *pStatObjTable, DynArray< IMaterial *> *pMatTable, DynArray< IStatInstGroup *> *pStatInstGroupTable, uint32 nObjTypeMask)=0 |
virtual void | SetTerrainElevation (int x1, int y1, int nSizeX, int nSizeY, float *pTerrainBlock, SSurfaceTypeItem *pSurfaceData, int nSurfOrgX, int nSurfOrgY, int nSurfSizeX, int nSurfSizeY, uint32 *pResolMap, int nResolMapSizeX, int nResolMapSizeY)=0 |
virtual bool | CanPaintSurfaceType (int x, int y, int r, uint16 usGlobalSurfaceType)=0 |
virtual int | GetNotReadyTextureNodesCount ()=0 |
virtual void | GetResourceMemoryUsage (ICrySizer *pSizer, const AABB &crstAABB)=0 |
virtual int | GetDetailTextureMaterials (IMaterial *materials[])=0 |
virtual void | ChangeOceanMaterial (IMaterial *pMat)=0 |
Changes the ocean material. | |
virtual void | ResetTerrainVertBuffers (const AABB *pBox)=0 |
virtual void | OnTerrainPaintActionComplete ()=0 |
Inform terrain engine about terrain painting/sculpting action finish. | |
Interface to terrain engine.
|
pure virtual |
Checks if it is possible to paint on the terrain with a given surface type ID.
Clones all objects in a region of the terrain, offsetting and rotating them based on the values passed in.
offset | - Offset amount, relative to the center of the region passed in. |
zRotation | - Rotation around the z axis, in radians. |
pIncludeLayers | - Optional list of layer ids to include, zero include layers means include objects from any layer |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Retrieves the resource (mostly texture system memory) memory usage for a given region of the terrain.
pSizer | Pointer to an instance of the CrySizer object. The purpose of this object is making sure each element is accounted only once. |
crstAABB | - Is a reference to the bounding box in which region we want to analyze the resources. |
|
pure virtual |
Call this before any calls to CloneRegion to mark all the render nodes in the source region(s) with the flag ERF_CLONE_SOURCE. This ensures that the clone call will only get source nodes, and not cloned ones from multiple calls to CloneRegion. The offset is an optional value for offsetting the clone sources, to ensure they won't be overlapping the clones (or pass zero for no offset).
|
pure virtual |
Request heightmap mesh update in specified area if pBox == 0 update entire heightmap
|
pure virtual |
Updates part of height map. x1, y1, nSizeX, nSizeY are in terrain units pTerrainBlock points to a square 2D array with dimensions GetTerrainSize() by default update only elevation.