![]() |
RenderManAPI
24.0
|
#include <ImplicitField.h>
Public Member Functions | |
ImplicitField () | |
virtual | ~ImplicitField () |
virtual float | Eval (const RtPoint p)=0 |
Returns the field value at point p, in object coordinates, at shutter open time. More... | |
virtual float | EvalFiltered (const RtPoint p, const RtPoint dPdu, const RtPoint dPdv, const RtPoint dPdw) |
Returns the filtered field value over the region of space in object coordinates delineated by point p and the three vectors dPdu, dPdv, and dPdw, at shutter open time. More... | |
virtual void | EvalMultiple (int neval, float *result, int resultstride, const RtPoint *p) |
Calculates the neval field values at point p, in object coordinates, at shutter open time, and stores them in result. More... | |
virtual void | EvalMultipleFiltered (int neval, float *result, int resultstride, const RtPoint *p, const RtPoint *dPdu, const RtPoint *dPdv, const RtPoint *dPdw) |
Calculates the neval filtered field values at point p, in object coordinates, at shutter open time, and stores them in result. More... | |
virtual void | GradientEval (RtPoint result, const RtPoint p)=0 |
Stores the field gradient at point p, in object coordinates calculated at shutter open time, into result. More... | |
virtual void | GradientEvalFiltered (RtPoint result, const RtPoint p, const RtPoint dPdu, const RtPoint dPdv, const RtPoint dPdw) |
Stores the field gradient at point p, in object coordinates calculated at shutter open time, into result. More... | |
virtual void | GradientEvalMultiple (int neval, RtPoint *result, const RtPoint *p) |
Calculates the field gradients at points p, in object coordinates calculated at shutter open time, and stores them in result. More... | |
virtual void | GradientEvalMultipleFiltered (int neval, RtPoint *result, const RtPoint *p, const RtPoint *dPdu, const RtPoint *dPdv, const RtPoint *dPdw) |
Calculates the filtered field gradients at points p, in object coordinates calculated at shutter open time, and stores them in result. More... | |
virtual void | Range (RtInterval result, const RtPoint corners[8], const RtVolumeHandle h) |
Stores into result the bounds of the field function values inside the region of object space with the given corners at shutter open. More... | |
virtual bool | ShouldSplit () |
Returns true if the DSO requires splitting into children DSOs. More... | |
virtual void | Split (std::vector< ImplicitField *> &children) |
Returns a list of children DSOs. More... | |
virtual void | Motion (RtPoint result, const RtPoint p) |
Stores into result how much the point p moves per unit time (i.e. More... | |
virtual void | MotionFiltered (RtPoint result, const RtPoint p, const RtPoint dPdu, const RtPoint dPdv, const RtPoint dPdw) |
Stores into result how much the point p moves per unit time (i.e. More... | |
virtual void | MotionMultiple (int neval, RtPoint *result, const RtPoint *p) |
Stores into result how much the neval points p move per unit time (i.e. More... | |
virtual void | MotionMultipleFiltered (int neval, RtPoint *result, const RtPoint *p, const RtPoint *dPdu, const RtPoint *dPdv, const RtPoint *dPdw) |
Stores into result the filtered motion vectors representing the movement of the neval p values per unit time. More... | |
virtual void | BoxMotion (RtBound result, const RtBound b) |
Given a shutter open bounding box b, this routine must compute a corresponding bounding box taking into account any motion per unit time of the enclosed contents. More... | |
virtual void | VolumeCompleted (const RtVolumeHandle h) |
VolumeCompleted is a courtesy callback, hinting that PRMan has finished processing all points inside the volume with the given handle, so that the plugin can discard data that it no longer needs. More... | |
virtual ImplicitVertexValue * | CreateVertexValue (const RtUString name, int nvalue) |
CreateVertexValue informs the plugin of a vertex variable declaration, asking that the plugin provide PRMan with an entry point that evaluates the variable. More... | |
virtual float | MinimumVoxelSize (const RtPoint corners[8]) |
This callback allows the plugin to hint at the minimum size of a voxel in object space as a way of avoiding potential overdicing. More... | |
virtual void | HullCorners (RtPoint **corners, int *ncorners) |
Return corners of a convex hull outside which the field value is zero. More... | |
virtual void | HullCornersMotion (RtPoint *corners, int ncorners, RtPoint **motioncorners, int *nmotioncorners) |
Given corners of a shutter open convex hull, this routine must modify them to take into account any motion per unit time of the enclosed contents. More... | |
virtual size_t | MemoryUsage () |
Returns the memory consumption of the plugin. More... | |
Public Attributes | |
RtBound | bbox |
The bbox field must be filled in during initialization with a bounding box outside which the field value is guaranteed to be identically zero at shutter open time, in the object coordinate system active at the time the geometry is created). More... | |
|
inline |
|
inlinevirtual |
Given a shutter open bounding box b, this routine must compute a corresponding bounding box taking into account any motion per unit time of the enclosed contents.
That is: for any point p inside b, the result computed by BoxMotion() must include p plus the vector result computed by Motion() on p.
|
inlinevirtual |
CreateVertexValue informs the plugin of a vertex variable declaration, asking that the plugin provide PRMan with an entry point that evaluates the variable.
Arguments are the type and name of a vertex variable (e.g. "color Cs"), and the number of float components it has, 1 for scalars or 3 for point types. The DSO is required to allocate (using C++'s new operator) and return an instance of a subclass of ImplicitVertexValue. PRMan will call delete on the result when it is done with it. If name is unknown to the plugin, the call should return NULL.
References PIXAR_ARGUSED.
|
pure virtual |
Returns the field value at point p, in object coordinates, at shutter open time.
Referenced by EvalFiltered(), and EvalMultiple().
|
inlinevirtual |
Returns the filtered field value over the region of space in object coordinates delineated by point p and the three vectors dPdu, dPdv, and dPdw, at shutter open time.
References Eval(), and PIXAR_ARGUSED.
|
inlinevirtual |
Calculates the neval field values at point p, in object coordinates, at shutter open time, and stores them in result.
The DSO is required to step by resultstride when storing values in result.
References Eval().
Referenced by EvalMultipleFiltered().
|
inlinevirtual |
Calculates the neval filtered field values at point p, in object coordinates, at shutter open time, and stores them in result.
The DSO is required to step by resultstride when storing values in result.
References EvalMultiple(), and PIXAR_ARGUSED.
Stores the field gradient at point p, in object coordinates calculated at shutter open time, into result.
Referenced by GradientEvalFiltered(), and GradientEvalMultiple().
|
inlinevirtual |
Stores the field gradient at point p, in object coordinates calculated at shutter open time, into result.
References GradientEval(), and PIXAR_ARGUSED.
|
inlinevirtual |
Calculates the field gradients at points p, in object coordinates calculated at shutter open time, and stores them in result.
References GradientEval().
Referenced by GradientEvalMultipleFiltered().
|
inlinevirtual |
Calculates the filtered field gradients at points p, in object coordinates calculated at shutter open time, and stores them in result.
References GradientEvalMultiple(), and PIXAR_ARGUSED.
|
inlinevirtual |
Return corners of a convex hull outside which the field value is zero.
If *corners is set to NULL or *ncorners to zero, then the hull is ignored and the bbox field is used instead; otherwise, the plugin is responsible for allocating the memory for the corners and deallocating it later (for example, in its override of the ImplicitField destructor).
|
inlinevirtual |
Given corners of a shutter open convex hull, this routine must modify them to take into account any motion per unit time of the enclosed contents.
That is: for any point p inside the hull having the original corners, motioncorners must be set to represent a hull containing p plus the vector result computed by Motion() on p. If *motioncorners is set set to NULL or *nmotioncorners to zero, then the hull is ignored and the renderer will calculate the motion bound by calling Motion() on the shutter open hull corners; otherwise, the plugin is responsible for allocating the memory for the motioncorners and deallocating it later (for example, in its override of the ImplicitField destructor).
References PIXAR_ARGUSED.
|
inlinevirtual |
Returns the memory consumption of the plugin.
The renderer may call this at multiple times during the course of the render to gauge the memory usage characteristics of the plugin.
|
inlinevirtual |
This callback allows the plugin to hint at the minimum size of a voxel in object space as a way of avoiding potential overdicing.
It will be called in PRMan if Attribute "dice" "float minlength" is set to -1.
References PIXAR_ARGUSED.
Stores into result how much the point p moves per unit time (i.e.
a motion vector) in object space. The default implementation assumes no motion and sets the result to be (0, 0, 0).
References PIXAR_ARGUSED.
Referenced by MotionFiltered(), and MotionMultiple().
|
inlinevirtual |
Stores into result how much the point p moves per unit time (i.e.
a motion vector) in object space, filtered over the region of space delineated by p and the three vectors dPdu, dPdv, and dPdw.
References Motion(), and PIXAR_ARGUSED.
|
inlinevirtual |
Stores into result how much the neval points p move per unit time (i.e.
motion vectors) in object space.
References Motion().
Referenced by MotionMultipleFiltered().
|
inlinevirtual |
Stores into result the filtered motion vectors representing the movement of the neval p values per unit time.
References MotionMultiple(), and PIXAR_ARGUSED.
|
inlinevirtual |
Stores into result the bounds of the field function values inside the region of object space with the given corners at shutter open.
While implementing this method is optional, it can provide an accurate understanding of the underlying field function to PRMan, and can have a dramatic impact on execution speed. The default implementation results in exhaustive evaluation of the region. The volume handle h uniquely identifies the volume, and is the same value that will later be passed to a call of VolumeCompleted.
References PIXAR_ARGUSED.
|
inlinevirtual |
Returns true if the DSO requires splitting into children DSOs.
|
inlinevirtual |
Returns a list of children DSOs.
Implementors should populate the children vector with a list of ImplicitField DSOs allocated with new; the renderer will be responsible for calling delete. Children DSOs should have bounding boxes that are entirely within the parent.
References PIXAR_ARGUSED.
|
inlinevirtual |
VolumeCompleted is a courtesy callback, hinting that PRMan has finished processing all points inside the volume with the given handle, so that the plugin can discard data that it no longer needs.
Using VolumeCompleted is a little tricky: PRMan calls Range with a particular RtVolumeHandle when it starts to work on a part of the level-set, and calls VolumeCompleted with the same handle when it's done. But it may in the interim have subdivided and called Range on smaller contained volumes in which it may maintain an interest after it has called VolumeCompleted on the parent volume. The handle passed to VolumeCompleted may be reused in a subsequent call to Range, but it will never ambiguously identify two volumes in which prman simultaneously maintains an interest.
References PIXAR_ARGUSED.
RtBound ImplicitField::bbox |
The bbox field must be filled in during initialization with a bounding box outside which the field value is guaranteed to be identically zero at shutter open time, in the object coordinate system active at the time the geometry is created).