Classes | Public Types | Public Member Functions
mi::shader_v3::Subdivision34 Class Reference

Subdivision34 class. More...

#include <shader_sds34.h>

List of all members.

Classes

struct  Face
 face data structure for triangles and quads m_vertices contains either 3 or 4 indices into the vector spaces. use get_vector to access the positions, textures etc using the vertex indices. m_material is the material tag for the given face. More...

Public Types

enum  Space_type
 space type. A vector space contains 3d positions, arbitrary dimension scalar textures or multiple 3d motion vectors.

Public Member Functions

virtual miUint get_no_spaces () const =0
 return the number of vector spaces
virtual miUint get_dimension (miUint space) const =0
 return the dimension of a given space
virtual Space_type get_space_type (miUint space) const =0
 return the type of a given space
virtual miUint get_no_vectors (miUint space) const =0
 return the number of vectors of a given space
virtual const miScalar * get_vector (miUint space, miUint which) const =0
 vector access
virtual miUint get_no_triangles () const =0
 return the number of triangles for the subdiv surface
virtual miUint get_no_quads () const =0
 return the number of quads for the subdiv surface
virtual const Face get_triangle (miUint space, miUint which) const =0
 triangle access
virtual const Face get_quad (miUint space, miUint which) const =0
 quad access
virtual bool get_triangle_derivatives (miUint face, miUint which, miVector derivs[2])=0
 triangle derivatives
virtual bool get_quad_derivatives (miUint face, miUint which, miVector derivs[2])=0
 quad derivatives

Detailed Description

Subdivision34 class.

This class provides access to the mixed triangle-quad subdivision class in mental ray, which has the ccmesh front-end in the mental ray API. ccmesh creates a database element containing only triangles and quads, either directly from the source geometry or with a single Catmull-Clark subdivision step in case of polygons other than triangles or quads.


Member Function Documentation

virtual miUint mi::shader_v3::Subdivision34::get_dimension ( miUint  space) const [pure virtual]

return the dimension of a given space

Parameters:
spaceis the space index
virtual miUint mi::shader_v3::Subdivision34::get_no_vectors ( miUint  space) const [pure virtual]

return the number of vectors of a given space

Parameters:
spaceis the space index
virtual const Face mi::shader_v3::Subdivision34::get_quad ( miUint  space,
miUint  which 
) const [pure virtual]

quad access

Parameters:
spaceis the space index
whichis the quad index
Returns:
the quad data is returned
virtual bool mi::shader_v3::Subdivision34::get_quad_derivatives ( miUint  face,
miUint  which,
miVector  derivs[2] 
) [pure virtual]

quad derivatives

Parameters:
faceis the quad index
whichis the vertex index, 0-3
[out]derivsThe du/dv result vectors
Returns:
true if function was successful
virtual Space_type mi::shader_v3::Subdivision34::get_space_type ( miUint  space) const [pure virtual]

return the type of a given space

Parameters:
spaceis the space index
virtual const Face mi::shader_v3::Subdivision34::get_triangle ( miUint  space,
miUint  which 
) const [pure virtual]

triangle access

Parameters:
spaceis the space index
whichis the triangle index
Returns:
the triangle data is returned
virtual bool mi::shader_v3::Subdivision34::get_triangle_derivatives ( miUint  face,
miUint  which,
miVector  derivs[2] 
) [pure virtual]

triangle derivatives

Parameters:
faceis the triangle index
whichis the vertex index, 0-2
[out]derivsThe du/dv result vectors
Returns:
true if function was successful
virtual const miScalar* mi::shader_v3::Subdivision34::get_vector ( miUint  space,
miUint  which 
) const [pure virtual]

vector access

Parameters:
spaceis the space index
whichis the vector index within the space
Returns:
the address of the first scalar of the n-dimensional vector is returned. the length is equal to the dimension as returned by get_dimension.

Copyright © 1986, 2013 NVIDIA Corporation