Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
|
Static helper class providing various utilities to merge two scenes. More...
#include <SceneCombiner.h>
Static Public Member Functions | |
static void | AddNodePrefixes (aiNode *node, const char *prefix, unsigned int len) |
Add a name prefix to all nodes in a scene. More... | |
static void | AttachToGraph (aiNode *attach, std::vector< NodeAttachmentInfo > &srcList) |
static void | AttachToGraph (aiScene *master, std::vector< NodeAttachmentInfo > &srcList) |
Attach a list of node graphs to well-defined nodes in a master graph. More... | |
static void | BuildUniqueBoneList (std::list< BoneWithHash > &asBones, std::vector< aiMesh * >::const_iterator it, std::vector< aiMesh * >::const_iterator end) |
Builds a list of uniquely named bones in a mesh list. More... | |
static void | Copy (aiAnimation **dest, const aiAnimation *src) |
static void | Copy (aiAnimMesh **dest, const aiAnimMesh *src) |
static void | Copy (aiBone **dest, const aiBone *src) |
static void | Copy (aiCamera **dest, const aiCamera *src) |
static void | Copy (aiLight **dest, const aiLight *src) |
static void | Copy (aiMaterial **dest, const aiMaterial *src) |
static void | Copy (aiMesh **dest, const aiMesh *src) |
Get a deep copy of a mesh. More... | |
static void | Copy (aiMeshMorphAnim **dest, const aiMeshMorphAnim *src) |
static void | Copy (aiMetadata **dest, const aiMetadata *src) |
static void | Copy (aiNode **dest, const aiNode *src) |
static void | Copy (aiNodeAnim **dest, const aiNodeAnim *src) |
static void | Copy (aiString **dest, const aiString *src) |
static void | Copy (aiTexture **dest, const aiTexture *src) |
static void | CopyScene (aiScene **dest, const aiScene *source, bool allocate=true) |
Get a deep copy of a scene. More... | |
static void | CopySceneFlat (aiScene **dest, const aiScene *source) |
Get a flat copy of a scene. More... | |
static void | MergeBones (aiMesh *out, std::vector< aiMesh * >::const_iterator it, std::vector< aiMesh * >::const_iterator end) |
Merges two or more bones. More... | |
static void | MergeMaterials (aiMaterial **dest, std::vector< aiMaterial * >::const_iterator begin, std::vector< aiMaterial * >::const_iterator end) |
Merges two or more materials. More... | |
static void | MergeMeshes (aiMesh **dest, unsigned int flags, std::vector< aiMesh * >::const_iterator begin, std::vector< aiMesh * >::const_iterator end) |
Merges two or more meshes. More... | |
static void | MergeScenes (aiScene **dest, aiScene *master, std::vector< AttachmentInfo > &src, unsigned int flags=0) |
Merges two or more scenes and attaches all scenes to a specific position in the node graph of the master scene. More... | |
static void | MergeScenes (aiScene **dest, std::vector< aiScene * > &src, unsigned int flags=0) |
Merges two or more scenes. More... | |
static void | OffsetNodeMeshIndices (aiNode *node, unsigned int offset) |
Add an offset to all mesh indices in a node graph. More... | |
Static helper class providing various utilities to merge two scenes.
It is intended as internal utility and NOT for use by applications.
The class is currently being used by various postprocessing steps and loaders (ie. LWS).
|
static |
Add a name prefix to all nodes in a scene.
Current | node. This function is called recursively. |
prefix | Prefix to be added to all nodes |
len | STring length |
|
static |
|
static |
Attach a list of node graphs to well-defined nodes in a master graph.
This is a helper for MergeScenes()
master | Master scene |
srcList | List of source scenes along with their attachment points. If an attachment point is nullptr (or does not exist in the master graph), a scene is attached to the root of the master graph (as an additional child node) @duplicates List of duplicates. If elem[n] == n the scene is not a duplicate. Otherwise elem[n] links scene n to its first occurrence. |
|
static |
Builds a list of uniquely named bones in a mesh list.
asBones | Receives the output list |
it | First mesh to be processed |
end | Last mesh to be processed |
|
static |
|
static |
|
static |
Get a deep copy of a mesh.
dest | Receives a pointer to the destination mesh |
src | Source mesh - remains unmodified. |
|
static |
|
static |
|
static |
|
static |
Get a deep copy of a scene.
dest | Receives a pointer to the destination scene |
src | Source scene - remains unmodified. |
Get a flat copy of a scene.
Only the first hierarchy layer is copied. All pointer members of aiScene are shared by source and destination scene. If the pointer doesn't point to nullptr when the function is called, the existing scene is cleared and refilled.
dest | Receives a pointer to the destination scene |
src | Source scene - remains unmodified. |
|
static |
Merges two or more bones.
out | Mesh to receive the output bone list |
flags | Currently no parameters |
begin | First mesh to be processed |
end | Points to the mesh after the last mesh to be processed |
|
static |
Merges two or more materials.
The materials should be complementary as much as possible. In case of a property present in different materials, the first occurrence is used.
dest | Destination material. Must be empty. |
begin | First material to be processed |
end | Points to the material after the last material to be processed |
|
static |
Merges two or more meshes.
The meshes should have equal vertex formats. Only components that are provided by ALL meshes will be present in the output mesh. An exception is made for VColors - they are set to black. The meshes should have the same material indices, too. The output material index is always the material index of the first mesh.
dest | Destination mesh. Must be empty. |
flags | Currently no parameters |
begin | First mesh to be processed |
end | Points to the mesh after the last mesh to be processed |
|
static |
Merges two or more scenes and attaches all scenes to a specific position in the node graph of the master scene.
dest | Receives a pointer to the destination scene. If the pointer doesn't point to nullptr when the function is called, the existing scene is cleared and refilled. |
master | Master scene. It will be deleted afterwards. All other scenes will be inserted in its node graph. |
src | Non-empty list of scenes to be merged along with their corresponding attachment points in the master scene. The function deletes the input scenes afterwards. There may be duplicate scenes. |
flags | Combination of the AI_INT_MERGE_SCENE flags defined above |
|
static |
Merges two or more scenes.
dest | Receives a pointer to the destination scene. If the pointer doesn't point to nullptr when the function is called, the existing scene is cleared and refilled. |
src | Non-empty list of scenes to be merged. The function deletes the input scenes afterwards. There may be duplicate scenes. |
flags | Combination of the AI_INT_MERGE_SCENE flags defined above |
|
static |
Add an offset to all mesh indices in a node graph.
Current | node. This function is called recursively. |
offset | Offset to be added to all mesh indices |