|
Nebula
|
The terrain file a Terrain component names, folder:file:ter.
The work file is work:assets/folder/file.nater and the batcher copies it to ter:folder/file.nater, which is what the game reads. It is a Render::TerrainResource flatbuffer.
The textures it names are URNs, folder:file:tex. Files written before URNs were used name a texture as folder/file, which is still read.
#include "io/path.h"#include "io/uri.h"#include "resources/resourceid.h"#include "util/string.h"#include "nflatbuffer/nebula_flat.h"#include "flat/render/terrainresource.h"Go to the source code of this file.
Namespaces | |
| namespace | GraphicsFeature |
Functions | |
| void | GraphicsFeature::RegisterTerrainPathMappings () |
| bind the ter type to its file extension, for the work and the export folder | |
| IO::Path | GraphicsFeature::TerrainTexture (const Util::String &name, const char *fallback) |
| the texture a terrain file names, the fallback (a URN) when it names none | |
| IO::Path | GraphicsFeature::TerrainModel (const Util::String &name, const char *fallback) |
| the model a vegetation mesh names, the fallback (a URN) when it names none | |
| bool | GraphicsFeature::ReadTerrainFile (const Resources::ResourceName &terrain, Render::TerrainResourceT &out, bool fromWork=false) |
| read a terrain file, the exported one or with fromWork the work file. | |
| bool | GraphicsFeature::WriteTerrainWorkFile (const Resources::ResourceName &terrain, const Render::TerrainResourceT &resource) |
| write the work file. False when it can't be written | |
| void | GraphicsFeature::DefaultTerrainResource (Render::TerrainResourceT &out) |
| a terrain with nothing set, what a Terrain component without a file shows: flat, one biome | |