MaterialX 1.38.9
Loading...
Searching...
No Matches
GeometryHandler Class Reference

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 MeshListgetMeshes () const
 Get list of meshes.
 
MeshPtr findParentMesh (MeshPartitionPtr part)
 Return the first mesh in our list containing the given partition. More...
 
const Vector3getMinimumBounds () const
 Return the minimum bounds for all meshes.
 
const Vector3getMaximumBounds () 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
 

Detailed Description

Class which holds a set of geometry loaders.

Each loader is associated with a given set of file extensions.

Member Function Documentation

◆ addLoader()

MATERIALX_NAMESPACE_BEGIN void addLoader ( GeometryLoaderPtr  loader)

Add a geometry loader.

Parameters
loaderLoader to add to list of available loaders.

◆ findParentMesh()

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.

◆ loadGeometry()

bool loadGeometry ( const FilePath filePath,
bool  texcoordVerticalFlip = false 
)

Load geometry from a given location.

Parameters
filePathPath to geometry
texcoordVerticalFlipFlip texture coordinates in V. Default is to not flip.

The documentation for this class was generated from the following files: