MaterialX 1.39.1
|
Class which holds a set of geometry loaders. More...
#include <GeometryHandler.h>
Public Member Functions | |
void | addLoader (GeometryLoaderPtr loader) |
Add a geometry loader. More... | |
void | supportedExtensions (StringSet &extensions) |
Get a list of extensions supported by the handler. | |
void | clearGeometry () |
Clear all loaded geometry. | |
bool | hasGeometry (const string &location) |
void | getGeometry (MeshList &meshes, const string &location) |
bool | loadGeometry (const FilePath &filePath, bool texcoordVerticalFlip=false) |
Load geometry from a given location. More... | |
const MeshList & | getMeshes () const |
Get list of meshes. | |
MeshPtr | findParentMesh (MeshPartitionPtr part) |
Return the first mesh in our list containing the given partition. More... | |
const Vector3 & | getMinimumBounds () const |
Return the minimum bounds for all meshes. | |
const Vector3 & | getMaximumBounds () const |
Return the minimum bounds for all meshes. | |
Static Public Member Functions | |
static GeometryHandlerPtr | create () |
Create a new geometry handler. | |
static MeshPtr | createQuadMesh (const Vector2 &uvMin=Vector2(0.0f, 0.0f), const Vector2 &uvMax=Vector2(1.0f, 1.0f), bool flipTexCoordsHorizontally=false) |
Utility to create a quad mesh. | |
Protected Member Functions | |
void | computeBounds () |
Protected Attributes | |
GeometryLoaderMap | _geometryLoaders |
MeshList | _meshes |
Vector3 | _minimumBounds |
Vector3 | _maximumBounds |
Class which holds a set of geometry loaders.
Each loader is associated with a given set of file extensions.
void addLoader | ( | GeometryLoaderPtr | loader | ) |
Add a geometry loader.
loader | Loader to add to list of available loaders. |
MeshPtr findParentMesh | ( | MeshPartitionPtr | part | ) |
Return the first mesh in our list containing the given partition.
If no matching mesh is found, then nullptr is returned.
bool loadGeometry | ( | const FilePath & | filePath, |
bool | texcoordVerticalFlip = false |
||
) |
Load geometry from a given location.
filePath | Path to geometry |
texcoordVerticalFlip | Flip texture coordinates in V. Default is to not flip. |