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

#include <Mesh.h>

Public Member Functions

 Mesh (const string &name)
 
 ~Mesh ()
 
const stringgetName () const
 Return the name of this mesh. More...
 
void setSourceUri (const string &sourceUri)
 Set the mesh's source URI. More...
 
bool hasSourceUri () const
 Return true if this mesh has a source URI. More...
 
const stringgetSourceUri () const
 Return the mesh's source URI. More...
 
MeshStreamPtr getStream (const string &name) const
 
MeshStreamPtr getStream (const string &type, unsigned int index) const
 
void addStream (MeshStreamPtr stream)
 Add a mesh stream. More...
 
void removeStream (MeshStreamPtr stream)
 Remove a mesh stream. More...
 
void setVertexCount (size_t val)
 Set vertex count. More...
 
size_t getVertexCount () const
 Get vertex count. More...
 
void setMinimumBounds (const Vector3 &val)
 Set the minimum bounds for the geometry. More...
 
const Vector3getMinimumBounds () const
 Return the minimum bounds for the geometry. More...
 
void setMaximumBounds (const Vector3 &v)
 Set the minimum bounds for the geometry. More...
 
const Vector3getMaximumBounds () const
 Return the minimum bounds for the geometry. More...
 
void setSphereCenter (const Vector3 &val)
 Set center of the bounding sphere. More...
 
const Vector3getSphereCenter () const
 Return center of the bounding sphere. More...
 
void setSphereRadius (float val)
 Set radius of the bounding sphere. More...
 
float getSphereRadius () const
 Return radius of the bounding sphere. More...
 
size_t getPartitionCount () const
 Return the number of mesh partitions. More...
 
void addPartition (MeshPartitionPtr partition)
 Add a partition. More...
 
MeshPartitionPtr getPartition (size_t partIndex) const
 Return a reference to a mesh partition. More...
 
MeshStreamPtr generateTextureCoordinates (MeshStreamPtr positionStream)
 
MeshStreamPtr generateNormals (MeshStreamPtr positionStream)
 
MeshStreamPtr generateTangents (MeshStreamPtr positionStream, MeshStreamPtr normalStream, MeshStreamPtr texcoordStream)
 
void mergePartitions ()
 Merge all mesh partitions into one. More...
 
void splitByUdims ()
 Split the mesh into a single partition per UDIM. More...
 

Static Public Member Functions

static MeshPtr create (const string &name)
 Create a new mesh. More...
 

Detailed Description

Container for mesh data

Definition at line 231 of file Mesh.h.

Constructor & Destructor Documentation

Mesh::Mesh ( const string name)
Mesh::~Mesh ( )
inline

Definition at line 235 of file Mesh.h.

Member Function Documentation

void Mesh::addPartition ( MeshPartitionPtr  partition)
inline

Add a partition.

Definition at line 382 of file Mesh.h.

void Mesh::addStream ( MeshStreamPtr  stream)
inline

Add a mesh stream.

Definition at line 300 of file Mesh.h.

static MeshPtr Mesh::create ( const string name)
inlinestatic

Create a new mesh.

Definition at line 238 of file Mesh.h.

MeshStreamPtr Mesh::generateNormals ( MeshStreamPtr  positionStream)

Generate face normals from the given positions.

Parameters
positionStreamInput position stream
Returns
The generated normal stream
MeshStreamPtr Mesh::generateTangents ( MeshStreamPtr  positionStream,
MeshStreamPtr  normalStream,
MeshStreamPtr  texcoordStream 
)

Generate tangents from the given positions, normals, and texture coordinates.

Parameters
positionStreamInput position stream
normalStreamInput normal stream
texcoordStreamInput texcoord stream
Returns
The generated tangent stream, on success; otherwise, a null pointer.
MeshStreamPtr Mesh::generateTextureCoordinates ( MeshStreamPtr  positionStream)

Create texture coordinates from the given positions. The texture coordinates are all initialize to a zero value.

Parameters
positionStreamInput position stream
Returns
The generated texture coordinate stream
const Vector3& Mesh::getMaximumBounds ( ) const
inline

Return the minimum bounds for the geometry.

Definition at line 346 of file Mesh.h.

const Vector3& Mesh::getMinimumBounds ( ) const
inline

Return the minimum bounds for the geometry.

Definition at line 334 of file Mesh.h.

const string& Mesh::getName ( ) const
inline

Return the name of this mesh.

Definition at line 244 of file Mesh.h.

MeshPartitionPtr Mesh::getPartition ( size_t  partIndex) const
inline

Return a reference to a mesh partition.

Definition at line 388 of file Mesh.h.

size_t Mesh::getPartitionCount ( ) const
inline

Return the number of mesh partitions.

Definition at line 376 of file Mesh.h.

const string& Mesh::getSourceUri ( ) const
inline

Return the mesh's source URI.

Definition at line 262 of file Mesh.h.

const Vector3& Mesh::getSphereCenter ( ) const
inline

Return center of the bounding sphere.

Definition at line 358 of file Mesh.h.

float Mesh::getSphereRadius ( ) const
inline

Return radius of the bounding sphere.

Definition at line 370 of file Mesh.h.

MeshStreamPtr Mesh::getStream ( const string name) const
inline

Get a mesh stream by name

Parameters
nameName of stream
Returns
Reference to a mesh stream if found

Definition at line 270 of file Mesh.h.

MeshStreamPtr Mesh::getStream ( const string type,
unsigned int  index 
) const
inline

Get a mesh stream by type and index

Parameters
typeType of stream
indexIndex of stream
Returns
Reference to a mesh stream if found

Definition at line 286 of file Mesh.h.

size_t Mesh::getVertexCount ( ) const
inline

Get vertex count.

Definition at line 322 of file Mesh.h.

bool Mesh::hasSourceUri ( ) const
inline

Return true if this mesh has a source URI.

Definition at line 256 of file Mesh.h.

void Mesh::mergePartitions ( )

Merge all mesh partitions into one.

void Mesh::removeStream ( MeshStreamPtr  stream)
inline

Remove a mesh stream.

Definition at line 306 of file Mesh.h.

void Mesh::setMaximumBounds ( const Vector3 v)
inline

Set the minimum bounds for the geometry.

Definition at line 340 of file Mesh.h.

void Mesh::setMinimumBounds ( const Vector3 val)
inline

Set the minimum bounds for the geometry.

Definition at line 328 of file Mesh.h.

void Mesh::setSourceUri ( const string sourceUri)
inline

Set the mesh's source URI.

Definition at line 250 of file Mesh.h.

void Mesh::setSphereCenter ( const Vector3 val)
inline

Set center of the bounding sphere.

Definition at line 352 of file Mesh.h.

void Mesh::setSphereRadius ( float  val)
inline

Set radius of the bounding sphere.

Definition at line 364 of file Mesh.h.

void Mesh::setVertexCount ( size_t  val)
inline

Set vertex count.

Definition at line 316 of file Mesh.h.

void Mesh::splitByUdims ( )

Split the mesh into a single partition per UDIM.


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