HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeometryHandler Class Reference

#include <GeometryHandler.h>

Public Member Functions

 GeometryHandler ()
 
virtual ~GeometryHandler ()
 
void addLoader (GeometryLoaderPtr loader)
 
void supportedExtensions (StringSet &extensions)
 Get a list of extensions supported by the handler. More...
 
void clearGeometry ()
 Clear all loaded geometry. More...
 
bool hasGeometry (const string &location)
 
void getGeometry (MeshList &meshes, const string &location)
 
bool loadGeometry (const FilePath &filePath, bool texcoordVerticalFlip=false)
 
const MeshListgetMeshes () const
 Get list of meshes. More...
 
MeshPtr findParentMesh (MeshPartitionPtr part)
 
const Vector3getMinimumBounds () const
 Return the minimum bounds for all meshes. More...
 
const Vector3getMaximumBounds () const
 Return the minimum bounds for all meshes. More...
 

Static Public Member Functions

static GeometryHandlerPtr create ()
 Create a new geometry handler. More...
 
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. More...
 

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.

Definition at line 63 of file GeometryHandler.h.

Constructor & Destructor Documentation

GeometryHandler::GeometryHandler ( )
inline

Definition at line 66 of file GeometryHandler.h.

virtual GeometryHandler::~GeometryHandler ( )
inlinevirtual

Definition at line 69 of file GeometryHandler.h.

Member Function Documentation

void GeometryHandler::addLoader ( GeometryLoaderPtr  loader)

Add a geometry loader

Parameters
loaderLoader to add to list of available loaders.
void GeometryHandler::clearGeometry ( )

Clear all loaded geometry.

void GeometryHandler::computeBounds ( )
protected
static GeometryHandlerPtr GeometryHandler::create ( )
inlinestatic

Create a new geometry handler.

Definition at line 72 of file GeometryHandler.h.

static MeshPtr GeometryHandler::createQuadMesh ( const Vector2 uvMin = Vector2(0.0f, 0.0f),
const Vector2 uvMax = Vector2(1.0f, 1.0f),
bool  flipTexCoordsHorizontally = false 
)
static

Utility to create a quad mesh.

MeshPtr GeometryHandler::findParentMesh ( MeshPartitionPtr  part)

Return the first mesh in our list containing the given partition. If no matching mesh is found, then nullptr is returned.

void GeometryHandler::getGeometry ( MeshList meshes,
const string location 
)
const Vector3& GeometryHandler::getMaximumBounds ( ) const
inline

Return the minimum bounds for all meshes.

Definition at line 115 of file GeometryHandler.h.

const MeshList& GeometryHandler::getMeshes ( ) const
inline

Get list of meshes.

Definition at line 99 of file GeometryHandler.h.

const Vector3& GeometryHandler::getMinimumBounds ( ) const
inline

Return the minimum bounds for all meshes.

Definition at line 109 of file GeometryHandler.h.

bool GeometryHandler::hasGeometry ( const string location)
bool GeometryHandler::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.
void GeometryHandler::supportedExtensions ( StringSet extensions)

Get a list of extensions supported by the handler.

Member Data Documentation

GeometryLoaderMap GeometryHandler::_geometryLoaders
protected

Definition at line 130 of file GeometryHandler.h.

Vector3 GeometryHandler::_maximumBounds
protected

Definition at line 133 of file GeometryHandler.h.

MeshList GeometryHandler::_meshes
protected

Definition at line 131 of file GeometryHandler.h.

Vector3 GeometryHandler::_minimumBounds
protected

Definition at line 132 of file GeometryHandler.h.


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