RenderManAPI  24.0
ImplicitField Class Referenceabstract

#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 ImplicitVertexValueCreateVertexValue (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...
 

Constructor & Destructor Documentation

◆ ImplicitField()

ImplicitField::ImplicitField ( )
inline

◆ ~ImplicitField()

virtual ImplicitField::~ImplicitField ( )
inlinevirtual

Member Function Documentation

◆ BoxMotion()

virtual void ImplicitField::BoxMotion ( RtBound  result,
const RtBound  b 
)
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.

◆ CreateVertexValue()

virtual ImplicitVertexValue* ImplicitField::CreateVertexValue ( const RtUString  name,
int  nvalue 
)
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.

◆ Eval()

virtual float ImplicitField::Eval ( const RtPoint  p)
pure virtual

Returns the field value at point p, in object coordinates, at shutter open time.

Referenced by EvalFiltered(), and EvalMultiple().

◆ EvalFiltered()

virtual float ImplicitField::EvalFiltered ( const RtPoint  p,
const RtPoint  dPdu,
const RtPoint  dPdv,
const RtPoint  dPdw 
)
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.

◆ EvalMultiple()

virtual void ImplicitField::EvalMultiple ( int  neval,
float *  result,
int  resultstride,
const RtPoint p 
)
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().

◆ EvalMultipleFiltered()

virtual void ImplicitField::EvalMultipleFiltered ( int  neval,
float *  result,
int  resultstride,
const RtPoint p,
const RtPoint dPdu,
const RtPoint dPdv,
const RtPoint dPdw 
)
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.

◆ GradientEval()

virtual void ImplicitField::GradientEval ( RtPoint  result,
const RtPoint  p 
)
pure virtual

Stores the field gradient at point p, in object coordinates calculated at shutter open time, into result.

Referenced by GradientEvalFiltered(), and GradientEvalMultiple().

◆ GradientEvalFiltered()

virtual void ImplicitField::GradientEvalFiltered ( RtPoint  result,
const RtPoint  p,
const RtPoint  dPdu,
const RtPoint  dPdv,
const RtPoint  dPdw 
)
inlinevirtual

Stores the field gradient at point p, in object coordinates calculated at shutter open time, into result.

References GradientEval(), and PIXAR_ARGUSED.

◆ GradientEvalMultiple()

virtual void ImplicitField::GradientEvalMultiple ( int  neval,
RtPoint result,
const RtPoint p 
)
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().

◆ GradientEvalMultipleFiltered()

virtual void ImplicitField::GradientEvalMultipleFiltered ( int  neval,
RtPoint result,
const RtPoint p,
const RtPoint dPdu,
const RtPoint dPdv,
const RtPoint dPdw 
)
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.

◆ HullCorners()

virtual void ImplicitField::HullCorners ( RtPoint **  corners,
int *  ncorners 
)
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).

◆ HullCornersMotion()

virtual void ImplicitField::HullCornersMotion ( RtPoint corners,
int  ncorners,
RtPoint **  motioncorners,
int *  nmotioncorners 
)
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.

◆ MemoryUsage()

virtual size_t ImplicitField::MemoryUsage ( )
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.

◆ MinimumVoxelSize()

virtual float ImplicitField::MinimumVoxelSize ( const RtPoint  corners[8])
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.

◆ Motion()

virtual void ImplicitField::Motion ( RtPoint  result,
const RtPoint  p 
)
inlinevirtual

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().

◆ MotionFiltered()

virtual void ImplicitField::MotionFiltered ( RtPoint  result,
const RtPoint  p,
const RtPoint  dPdu,
const RtPoint  dPdv,
const RtPoint  dPdw 
)
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.

◆ MotionMultiple()

virtual void ImplicitField::MotionMultiple ( int  neval,
RtPoint result,
const RtPoint p 
)
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().

◆ MotionMultipleFiltered()

virtual void ImplicitField::MotionMultipleFiltered ( int  neval,
RtPoint result,
const RtPoint p,
const RtPoint dPdu,
const RtPoint dPdv,
const RtPoint dPdw 
)
inlinevirtual

Stores into result the filtered motion vectors representing the movement of the neval p values per unit time.

References MotionMultiple(), and PIXAR_ARGUSED.

◆ Range()

virtual void ImplicitField::Range ( RtInterval  result,
const RtPoint  corners[8],
const RtVolumeHandle  h 
)
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.

◆ ShouldSplit()

virtual bool ImplicitField::ShouldSplit ( )
inlinevirtual

Returns true if the DSO requires splitting into children DSOs.

◆ Split()

virtual void ImplicitField::Split ( std::vector< ImplicitField *> &  children)
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.

◆ VolumeCompleted()

virtual void ImplicitField::VolumeCompleted ( const RtVolumeHandle  h)
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.

Member Data Documentation

◆ bbox

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).


The documentation for this class was generated from the following file: