6#ifndef MATERIALX_GEOMETRYHANDLER_H
7#define MATERIALX_GEOMETRYHANDLER_H
19MATERIALX_NAMESPACE_BEGIN
74 return std::make_shared<GeometryHandler>();
88 bool hasGeometry(
const string& location);
91 void getGeometry(
MeshList& meshes,
const string& location);
111 return _minimumBounds;
117 return _maximumBounds;
123 bool flipTexCoordsHorizontally =
false);
127 void computeBounds();
136MATERIALX_NAMESPACE_END
Cross-platform support for file and search paths.
std::multimap< string, GeometryLoaderPtr > GeometryLoaderMap
Map of extensions to image loaders.
Definition: GeometryHandler.h:58
std::shared_ptr< class GeometryLoader > GeometryLoaderPtr
Shared pointer to a GeometryLoader.
Definition: GeometryHandler.h:22
std::shared_ptr< class GeometryHandler > GeometryHandlerPtr
Shared pointer to an GeometryHandler.
Definition: GeometryHandler.h:55
std::set< string > StringSet
A set of strings.
Definition: Library.h:59
Macros for declaring imported and exported symbols.
vector< MeshPtr > MeshList
List of meshes.
Definition: Mesh.h:233
shared_ptr< class MeshPartition > MeshPartitionPtr
Shared pointer to a mesh partition.
Definition: Mesh.h:146
shared_ptr< class Mesh > MeshPtr
Shared pointer to a mesh.
Definition: Mesh.h:230
A generic file path, supporting both syntactic and file system operations.
Definition: File.h:27
Class which holds a set of geometry loaders.
Definition: GeometryHandler.h:64
bool loadGeometry(const FilePath &filePath, bool texcoordVerticalFlip=false)
Load geometry from a given location.
void addLoader(GeometryLoaderPtr loader)
Add a geometry loader.
void supportedExtensions(StringSet &extensions)
Get a list of extensions supported by the handler.
const MeshList & getMeshes() const
Get list of meshes.
Definition: GeometryHandler.h:99
const Vector3 & getMaximumBounds() const
Return the minimum bounds for all meshes.
Definition: GeometryHandler.h:115
static GeometryHandlerPtr create()
Create a new geometry handler.
Definition: GeometryHandler.h:72
void clearGeometry()
Clear all loaded geometry.
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.
const Vector3 & getMinimumBounds() const
Return the minimum bounds for all meshes.
Definition: GeometryHandler.h:109
MeshPtr findParentMesh(MeshPartitionPtr part)
Return the first mesh in our list containing the given partition.
Base class representing a geometry loader.
Definition: GeometryHandler.h:28
const StringSet & supportedExtensions() const
Returns a list of supported extensions.
Definition: GeometryHandler.h:37
virtual bool load(const FilePath &filePath, MeshList &meshList, bool texcoordVerticalFlip=false)=0
Load geometry from disk.
A vector of two floating-point values.
Definition: Types.h:286
A vector of three floating-point values.
Definition: Types.h:306