Importing Static Meshes¶
The following declarations can be found in ImportStaticMesh.hpp
:
Import and cache static meshes (.3DS, .MRM)
-
namespace
BsZenLib
Functions
-
bool
HasCachedStaticMesh
(const bs::String &originalFileName)¶ Checks whether the given static mesh has been cached.
- Return
- True, if the file was cached. False otherwise.
- Parameters
orignalFileName
: Name of the file in the original game (eg. “STONE.3DS”)
-
Res::HMeshWithMaterials
LoadCachedStaticMesh
(const bs::String &originalFileName)¶ Loads the cached version representing the given original file.
If unsure whether the cached file exists, call HasCachedStaticMesh(). To create the cache, call ImportAndCacheStaticMesh().
- Return
- Handle to the cached mesh (Empty handle if none was found)
- Parameters
originalFileName
: Name of the mesh in the original game files (eg. “STONE.3DS”)
-
Res::HMeshWithMaterials
ImportAndCacheStaticMesh
(const bs::String &originalFileName, const VDFS::FileIndex &vdfs)¶ Imports and caches a static mesh (.3DS) from the original game.
- Note
- This will also cache Materials and Textures.
- Return
- Handle to the imported mesh (Empty if unsuccessfull)
- Parameters
originalFileName
: Name of the static mesh in the original game (eg. “STONE.3DS”)vdfs
: VDFS containing the file to be imported.
-
Res::HMeshWithMaterials
ImportAndCacheStaticMesh
(const bs::String &originalFileName, const ZenLoad::PackedMesh &packedMesh, const VDFS::FileIndex &vdfs)¶ Imports and caches a static mesh (.3DS) from the original game.
- Note
- This will also cache Materials and Textures.
- Return
- Handle to the imported mesh (Empty if unsuccessfull)
- Parameters
originalFileName
: Name of the static mesh in the original game (eg. “STONE.3DS”)vdfs
: VDFS containing the file to be imported.
-
bs::HMesh
ImportAndCacheStaticMeshGeometry
(const bs::String &originalFileName, const VDFS::FileIndex &vdfs)¶ Imports and caches only the geometry of a static mesh (.3DS) from the original game.
- Return
- Handle to the imported mesh (Empty if unsuccessfull)
- Parameters
originalFileName
: Name of the static mesh in the original game (eg. “STONE.3DS”)vdfs
: VDFS containing the file to be imported.
-
bs::HMesh
ImportAndCacheStaticMeshGeometry
(const bs::String &originalFileName, const ZenLoad::PackedMesh &packedMesh)¶ Imports and caches only the geometry from custom mesh data.
- Return
- Handle to the imported mesh (Empty if unsuccessfull)
- Parameters
originalFileName
: Name of the static mesh in the original game (eg. “STONE.3DS”)packedMesh
: Custom mesh data.
-
bs::Vector<bs::HMaterial>
ImportAndCacheStaticMeshMaterials
(const bs::String &originalFileName, const VDFS::FileIndex &vdfs)¶ Imports and caches only the materials of a static mesh (.3DS) from the original game.
- Note
- This will also cache Textures.
- Return
- Handles to the imported materials (Empty if unsuccessfull)
- Parameters
originalFileName
: Name of the static mesh in the original game (eg. “STONE.3DS”)vdfs
: VDFS containing textures needed by the materials.
-
bs::Vector<bs::HMaterial>
ImportAndCacheStaticMeshMaterials
(const bs::String &originalFileName, const ZenLoad::PackedMesh &packedMesh, const VDFS::FileIndex &vdfs)¶ Imports and caches only the materials from custom mesh data.
- Note
- This will also cache Textures.
- Return
- Handles to the imported materials (Empty if unsuccessfull)
- Parameters
originalFileName
: Name of the static mesh in the original game (eg. “STONE.3DS”)packedMesh
: Custom mesh data.vdfs
: VDFS containing textures needed by the materials.
-
bs::HMesh
ImportStaticMeshGeometry
(const ZenLoad::PackedMesh &packedMesh)¶ Imports only the geometry from custom mesh data without caching it.
- Return
- Handle to the imported mesh (Empty if unsuccessfull)
- Parameters
packedMesh
: Custom mesh data.
-
bool