RixSubdivisionFace Class Reference

An object that encapsulates a face on a subdivision mesh. More...

#include <RixSubdEval.h>

List of all members.

Public Member Functions

virtual int GetID ()=0
 Returns the unique ID of this face.
virtual int GetNumVertices ()=0
 Returns the number of vertices on the face.
virtual RixSubdivisionVertexGetVertex (int vertex)=0
 Returns the vertex belonging to the face.
virtual void GetBound (RtBound bound)=0
 Returns the bounding box of the face in current space.
virtual void GetBound (const RtToken space, RtBound bound)=0
 Returns the bounding box of the face in current space.
virtual RixSubdivisionFaceGetNeighboringFace (int edge, int *reverseEdge=0)=0
 Returns the neighboring face which shares the indicated edge, or NULL if no such face can be found (because this face is on a boundary, or the neighboring face has not yet come into existence due to Subdivision).
virtual void Subdivide ()=0
 Subdivides the face.
virtual RixSubdivisionFaceGetChildFace (int vertex, int *childVertex=0)=0
 Returns the child face associated with the indicated vertex index.
virtual RixSubdivisionFaceGetParentFace ()=0
 Returns the parent face.
virtual bool GetVertexValue (int vertex, const RtToken name, int width, float *data)=0
 Requests the current value of a primitive variable at a given vertex on the face.
virtual bool GetVertexValue (int vertex, const RtToken name, int width, const RtToken space, float *data)=0
 Requests the current value of a primitive variable at a given vertex on the face.
virtual bool GetStringValue (const RtToken name, std::string &data)=0
 Requests the current value of a uniform or constant string primitive variable attached to the face.
virtual bool HasLimitSurface ()=0
 Returns true if the face has a limit surface (and EvaluateAtLimit can be successfully used), false otherwise.
virtual bool EvaluateAtLimit (float u, float v, const RtToken name, int width, float *data)=0
 Evaluates the limit value of a primitive variable at the requested parametric location on the face.
virtual bool EvaluateAtLimitMultiple (int nevals, float *u, float *v, const RtToken name, int width, const RtToken space, float *data)=0
 Evaluates the limit value of a primitive variable at the requested parametric location on the face.
virtual void SetLimitEvaluationAccuracy (const RtToken space, float distance)=0
 Sets the accuracy of limit surface evaluation.

Protected Member Functions

virtual ~RixSubdivisionFace ()
 Virtual destructor.


Detailed Description

An object that encapsulates a face on a subdivision mesh.


Constructor & Destructor Documentation

virtual RixSubdivisionFace::~RixSubdivisionFace  )  [inline, protected, virtual]
 

Virtual destructor.


Member Function Documentation

virtual bool RixSubdivisionFace::EvaluateAtLimit float  u,
float  v,
const RtToken  name,
int  width,
float *  data
[pure virtual]
 

Evaluates the limit value of a primitive variable at the requested parametric location on the face.

The variable cannot be a string type, but can have any detail (constant, uniform, varying, facevarying, and vertex). RI_N, RI_DPDU, RI_DPDV, and RI_DPDTIME are also allowed names and will return the appropriate geometric quantity in current space. Returns true only if the limit surface exists for this face and if the data exists with the given name and width (in floats), false otherwise. Point-like data types will be returned in camera space.

virtual bool RixSubdivisionFace::EvaluateAtLimitMultiple int  nevals,
float *  u,
float *  v,
const RtToken  name,
int  width,
const RtToken  space,
float *  data
[pure virtual]
 

Evaluates the limit value of a primitive variable at the requested parametric location on the face.

The variable cannot be a string type, but can have any detail (constant, uniform, varying, facevarying, and vertex). RI_N, RI_DPDU, RI_DPDV, and RI_DPDTIME are also allowed names and will return the appropriate geometric quantity in current space. Returns true only if the limit surface exists for this face and if the data exists with the given name and width (in floats), false otherwise. Point-like data types will be transformed to the requested space.

virtual void RixSubdivisionFace::GetBound const RtToken  space,
RtBound  bound
[pure virtual]
 

Returns the bounding box of the face in current space.

virtual void RixSubdivisionFace::GetBound RtBound  bound  )  [pure virtual]
 

Returns the bounding box of the face in current space.

virtual RixSubdivisionFace* RixSubdivisionFace::GetChildFace int  vertex,
int *  childVertex = 0
[pure virtual]
 

Returns the child face associated with the indicated vertex index.

Will return non-NULL results only after a face has been subdivided. If a child face is found, the childVertex parameter is set such that it can be used to find the vertex in the child face which is the direct subdivided child vertex of the parent vertex. i.e:

        child = face->GetChildFace(vertex, &childVertex);
        // child->GetVertex(childVertex) is the direct
        // subdivision child of face->GetVertex(vertex)

virtual int RixSubdivisionFace::GetID  )  [pure virtual]
 

Returns the unique ID of this face.

The ID is guaranteed to be unique amongst all other faces present on the mesh.

virtual RixSubdivisionFace* RixSubdivisionFace::GetNeighboringFace int  edge,
int *  reverseEdge = 0
[pure virtual]
 

Returns the neighboring face which shares the indicated edge, or NULL if no such face can be found (because this face is on a boundary, or the neighboring face has not yet come into existence due to Subdivision).

If a face is found, the reverseEdge parameter is set to be the edge value which can be used to find the original face. i.e:

        neighbor = face->GetNeighboringFace(edge, &reverseEdge);
        neighbor->GetNeighboringFace(reverseEdge) == face;

virtual int RixSubdivisionFace::GetNumVertices  )  [pure virtual]
 

Returns the number of vertices on the face.

virtual RixSubdivisionFace* RixSubdivisionFace::GetParentFace  )  [pure virtual]
 

Returns the parent face.

Returns NULL for top level (coarse) faces.

virtual bool RixSubdivisionFace::GetStringValue const RtToken  name,
std::string &  data
[pure virtual]
 

Requests the current value of a uniform or constant string primitive variable attached to the face.

Returns true if the data exists with the given name, false otherwise.

virtual RixSubdivisionVertex* RixSubdivisionFace::GetVertex int  vertex  )  [pure virtual]
 

Returns the vertex belonging to the face.

The vertex identifier must be greater than or equal to 0 and less than that returned by GetNumVertices().

virtual bool RixSubdivisionFace::GetVertexValue int  vertex,
const RtToken  name,
int  width,
const RtToken  space,
float *  data
[pure virtual]
 

Requests the current value of a primitive variable at a given vertex on the face.

The variable cannot be a string type, but can have any detail (constant, uniform, varying, facevarying, and vertex). Returns true if the data exists with the given name and width (in floats), false otherwise. "u" and "v" are special tokens that can also be supplied as names (with a corresponding width of 1), and will return the u/v values of the indicated vertex. Point-like data types will be returned in the requested space.

virtual bool RixSubdivisionFace::GetVertexValue int  vertex,
const RtToken  name,
int  width,
float *  data
[pure virtual]
 

Requests the current value of a primitive variable at a given vertex on the face.

The variable cannot be a string type, but can have any detail (constant, uniform, varying, facevarying, and vertex). Returns true if the data exists with the given name and width (in floats), false otherwise. "u" and "v" are special tokens that can also be supplied as names (with a corresponding width of 1), and will return the u/v values of the indicated vertex. Point-like data types will be returned in camera space.

virtual bool RixSubdivisionFace::HasLimitSurface  )  [pure virtual]
 

Returns true if the face has a limit surface (and EvaluateAtLimit can be successfully used), false otherwise.

Faces that do not have a limit surface may require further subdivision.

virtual void RixSubdivisionFace::SetLimitEvaluationAccuracy const RtToken  space,
float  distance
[pure virtual]
 

Sets the accuracy of limit surface evaluation.

By default, for certain faces that cannot readily compute an exact answer, the accuracy of limit surface evaluation is determined by raster space projection and the current RiShadingRate setting. This may incur a large memory penalty for faces that are very close to the camera. Likewise, faces that are very far from the camera may not have enough accuracy. This heuristic can be controlled by calling SetLimitEvaluationAccuracy. The distance parameter specifies the desired frequency of evaluations measured in a particular space.

virtual void RixSubdivisionFace::Subdivide  )  [pure virtual]
 

Subdivides the face.

Must be called in order for GetChildFace to return non-NULL results.


The documentation for this class was generated from the following file:
Generated on Mon Nov 15 10:14:34 2010 for PRManHeaders by  doxygen 1.4.6