class
ITerrain
Derived classes
- class cTerrainSphere
Public types
- enum class DisplayType { Creature = 0, Tribe = 1, Civ = 2, Space = 3, Default = 4 }
- using OnLoadFinish_t = void(*)(ITerrain*, void*)
Public static variables
Public functions
- auto AddRef() -> int pure virtual
- auto Release() -> int pure virtual
-
auto GetPropertyList() -> App::
PropertyList* pure virtual - Returns the property list used to generate this planet.
- auto GetTerrainMapSet() -> cTerrainMapSet* pure virtual
- auto GetTerrainStateManager() -> cTerrainStateMgr* pure virtual
- auto GetWeatherManager() -> cWeatherManager* pure virtual
-
auto GetSeed() -> uint32_
t pure virtual - Returns the seed that was used to create this planet.
- auto SetDisplayType(DisplayType pathType) -> void pure virtual
- auto GetDisplayType() -> DisplayType pure virtual
- auto func24h(Object*) -> void pure virtual
- auto func28h() -> Object* pure virtual
- auto HasViewer() -> bool pure virtual
- auto IsLoading() -> bool pure virtual
- auto GetLoadMode() -> int pure virtual
-
auto SetOnLoadFinish(OnLoadFinish_
t f, void* object) -> void pure virtual - Sets a function that will be executed when the planet finishes loading.
- auto ForceLoadEnd() -> void pure virtual
- auto func40h() -> void pure virtual
- auto func44h(bool) -> void pure virtual
-
auto func48h(uint8_
t) -> uint8_ t pure virtual - auto func4Ch(bool) -> bool pure virtual
- auto func50h() -> bool pure virtual
-
auto AddModelModification(const Transform& transform,
App::
PropertyList* propList) -> uint32_ t pure virtual -
auto RemoveModelModification(uint32_
t modid, bool) -> bool pure virtual -
auto HasModelModification(uint32_
t modid) -> bool pure virtual - auto ResetModelModifications() -> int pure virtual
-
auto AddPlayerModification(const Transform& transform,
uint32_
t effectID, uint32_ t groupID = 0) -> uint32_ t pure virtual -
auto RemovePlayerModification(uint32_
t modid) -> bool pure virtual -
auto HasPlayerModification(uint32_
t modid) -> bool pure virtual - auto ResetPlayerModifications() -> void pure virtual
- auto SetPlanetInfo(int terrainType, int atmosphereType, int waterType) -> void pure virtual
- auto GetPlanetInfo(int* dstTerrainType, int* dstAtmosphereType, int* dstWaterType) -> void pure virtual
- auto func7Ch(int terrainType, int atmosphereType, int waterType, Vector3*, Vector3*, Vector3*) -> void pure virtual
- auto func80h() -> void pure virtual
- auto func84h() -> void pure virtual
- auto func88h() -> void pure virtual
-
auto AddToRender(Graphics::
IRenderer*) -> bool pure virtual -
auto RemoveFromRender(Graphics::
IRenderer*) -> void pure virtual -
auto IsAddedToRender(Graphics::
IRenderer*) -> bool pure virtual - auto SetVisible(bool visible) -> void pure virtual
-
auto Update(App::
cViewer* pViewer, int deltaTime) -> void pure virtual - auto funcA0h() -> void pure virtual
- auto funcA4h() -> void pure virtual
- auto LoadAssets() -> void pure virtual
- Loads the ambient effects and terrain models, only if they are not loaded already.
- auto UnloadAssets() -> void pure virtual
- Unloads the ambient effects and terrain models.
-
auto GetModels(ModelPtr*& dst) -> size_
t pure virtual - Used to get the loaded planet asset models. Returns the number of models.
-
auto GetModelsInfo(ResourceKey** dstKeys,
Transform** dstTransforms) -> size_
t pure virtual - auto funcB8h(int) -> int pure virtual
- auto funcBCh(int) -> int pure virtual
- auto funcC0h(int) -> int pure virtual
- auto funcC4h(int) -> int pure virtual
-
auto funcC8h() -> size_
t pure virtual - auto funcCCh() -> int pure virtual
- auto funcD0h() -> int pure virtual
- auto funcD4h(float) -> void pure virtual
- auto funcD8h() -> bool pure virtual
- auto GetAllowUnderwaterObjects() -> bool pure virtual
- auto SetAllowUnderwaterObjects(bool) -> void pure virtual
-
auto AddUnderwaterModelWorld(Graphics::
IModelWorld* world, int flags = 0) -> void pure virtual -
auto RemoveUnderwaterModelWorld(Graphics::
IModelWorld*) -> void pure virtual - auto ClearUnderwaterModelWorlds() -> void pure virtual
-
auto AddUnderwaterAnimWorld(Anim::
IAnimWorld* world, int flags) -> void pure virtual -
auto RemoveUnderwaterAnimWorld(Anim::
IAnimWorld*) -> void pure virtual - auto ClearUnderwaterAnimWorlds() -> void pure virtual
- auto GetGrassTrampling() -> Vector4* pure virtual
- auto GetMaxGrassTrampling() -> int pure virtual
- auto ResetGrassTrampling() -> void pure virtual
- auto Raycast(const Vector3& pos, const Vector3& dir) -> Vector3 pure virtual
- Finds the first point in the terrain surface that intersects with a ray in position
pos
towards directiondir
. - auto GetOrientation(const Vector3& upAxis) -> Quaternion pure virtual
- auto Dispose() -> void pure virtual
-
auto ParseProp(App::
PropertyList* pPropList) -> void pure virtual - auto GetCameraPos() -> const Vector3& pure virtual
- auto GetCameraDir() -> const Vector3& pure virtual
- auto GetSunDir() -> const Vector3& pure virtual
- auto LoadInternal(bool weather) -> bool pure virtual
- auto Load() -> bool pure virtual
Function documentation
void Terrain:: ITerrain:: SetOnLoadFinish(OnLoadFinish_ t f,
void* object) pure virtual
Sets a function that will be executed when the planet finishes loading.
Parameters | |
---|---|
f | |
object |
If it has already finished, the function will be executed immediately. The object
is passed as parameter to the function.
void Terrain:: ITerrain:: LoadAssets() pure virtual
Loads the ambient effects and terrain models, only if they are not loaded already.
You can force a reload by calling UnloadAssets() first.
Vector3 Terrain:: ITerrain:: Raycast(const Vector3& pos,
const Vector3& dir) pure virtual
Finds the first point in the terrain surface that intersects with a ray in position pos
towards direction dir
.
Parameters | |
---|---|
pos | The start position of the ray. |
dir | The direction of the ray. |
Returns | The position of the terrain where the ray hit, or (0,0,0) if there was no intersection with the planet. |
This only takes the terrain into acount, so it ignores models and water.