An object that encapsulates a face on a subdivision mesh.
More...
#include <RixSubdEval.h>
|
virtual int | GetID ()=0 |
|
virtual int | GetNumVertices ()=0 |
| Returns the number of vertices on the face.
|
|
virtual RixSubdivisionVertex * | GetVertex (int vertex)=0 |
|
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 the requested space.
|
|
virtual RixSubdivisionFace * | GetNeighboringFace (int edge, int *reverseEdge=0)=0 |
|
virtual void | Subdivide ()=0 |
|
virtual RixSubdivisionFace * | GetChildFace (int vertex, int *childVertex=0)=0 |
|
virtual RixSubdivisionFace * | GetParentFace ()=0 |
|
virtual bool | GetVertexValue (int vertex, const RtToken name, int width, float *data)=0 |
|
virtual bool | GetVertexValue (int vertex, const RtToken name, int width, const RtToken space, float *data)=0 |
|
virtual bool | GetStringValue (const RtToken name, std::string &data)=0 |
|
virtual bool | HasLimitSurface ()=0 |
|
virtual bool | EvaluateAtLimit (float u, float v, const RtToken name, int width, float *data)=0 |
|
virtual bool | EvaluateAtLimitMultiple (int nevals, float *u, float *v, const RtToken name, int width, const RtToken space, float *data)=0 |
|
virtual void | SetLimitEvaluationAccuracy (const RtToken space, float distance)=0 |
|
virtual void | Release ()=0 |
|
An object that encapsulates a face on a subdivision mesh.
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 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);
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;
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.
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, |
|
|
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::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::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::Release |
( |
) | |
|
|
pure virtual |
Indicates to the system that memory associated with the face may be released. This is optional (calling RixSubdivisionSurfaceEvaluation->DestroySubdivisionMesh on the associated mesh will always free all resources associated with all faces), but using Release() may allow for incremental memory clean up. After calling face->Release(), the RixSubdivisionFace pointer should be considered invalid, and the face should never be revisited, even via calls to Subdivide() or mesh->GetFace(). Furthermore, any vertices that were previously returned by calls to GetVertex() may potentially be invalidated by this call. Any children faces already in existence due to a previous call to face->GetChildFace() are themselves still valid, but their calls to GetParentFace() will now return NULL. Likewise, any parent of this face will now return NULL for the appropriate call to GetChildFace().
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: