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)
 
MeshStreamPtr generateBitangents (MeshStreamPtr normalStream, MeshStreamPtr tangentStream)
 
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 240 of file Mesh.h.

Constructor & Destructor Documentation

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

Definition at line 244 of file Mesh.h.

Member Function Documentation

void Mesh::addPartition ( MeshPartitionPtr  partition)
inline

Add a partition.

Definition at line 391 of file Mesh.h.

void Mesh::addStream ( MeshStreamPtr  stream)
inline

Add a mesh stream.

Definition at line 309 of file Mesh.h.

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

Create a new mesh.

Definition at line 247 of file Mesh.h.

MeshStreamPtr Mesh::generateBitangents ( MeshStreamPtr  normalStream,
MeshStreamPtr  tangentStream 
)

Generate bitangents from the given normals and tangents.

Parameters
normalStreamInput normal stream
tangentStreamInput tangent stream
Returns
The generated bitangent stream, on success; otherwise, a null pointer.
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 355 of file Mesh.h.

const Vector3& Mesh::getMinimumBounds ( ) const
inline

Return the minimum bounds for the geometry.

Definition at line 343 of file Mesh.h.

const string& Mesh::getName ( ) const
inline

Return the name of this mesh.

Definition at line 253 of file Mesh.h.

MeshPartitionPtr Mesh::getPartition ( size_t  partIndex) const
inline

Return a reference to a mesh partition.

Definition at line 397 of file Mesh.h.

size_t Mesh::getPartitionCount ( ) const
inline

Return the number of mesh partitions.

Definition at line 385 of file Mesh.h.

const string& Mesh::getSourceUri ( ) const
inline

Return the mesh's source URI.

Definition at line 271 of file Mesh.h.

const Vector3& Mesh::getSphereCenter ( ) const
inline

Return center of the bounding sphere.

Definition at line 367 of file Mesh.h.

float Mesh::getSphereRadius ( ) const
inline

Return radius of the bounding sphere.

Definition at line 379 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 279 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 295 of file Mesh.h.

size_t Mesh::getVertexCount ( ) const
inline

Get vertex count.

Definition at line 331 of file Mesh.h.

bool Mesh::hasSourceUri ( ) const
inline

Return true if this mesh has a source URI.

Definition at line 265 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 315 of file Mesh.h.

void Mesh::setMaximumBounds ( const Vector3 v)
inline

Set the minimum bounds for the geometry.

Definition at line 349 of file Mesh.h.

void Mesh::setMinimumBounds ( const Vector3 val)
inline

Set the minimum bounds for the geometry.

Definition at line 337 of file Mesh.h.

void Mesh::setSourceUri ( const string sourceUri)
inline

Set the mesh's source URI.

Definition at line 259 of file Mesh.h.

void Mesh::setSphereCenter ( const Vector3 val)
inline

Set center of the bounding sphere.

Definition at line 361 of file Mesh.h.

void Mesh::setSphereRadius ( float  val)
inline

Set radius of the bounding sphere.

Definition at line 373 of file Mesh.h.

void Mesh::setVertexCount ( size_t  val)
inline

Set vertex count.

Definition at line 325 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: