RenderMan API  23.0
ImplicitField Class Referenceabstract

#include <ImplicitField.h>

Public Member Functions

 ImplicitField ()
 
virtual ~ImplicitField ()
 
virtual float Eval (const RtPoint p)=0
 
virtual float EvalFiltered (const RtPoint p, const RtPoint dPdu, const RtPoint dPdv, const RtPoint dPdw)
 
virtual void EvalMultiple (int neval, float *result, int resultstride, const RtPoint *p)
 
virtual void EvalMultipleFiltered (int neval, float *result, int resultstride, const RtPoint *p, const RtPoint *dPdu, const RtPoint *dPdv, const RtPoint *dPdw)
 
virtual void GradientEval (RtPoint result, const RtPoint p)=0
 
virtual void GradientEvalFiltered (RtPoint result, const RtPoint p, const RtPoint dPdu, const RtPoint dPdv, const RtPoint dPdw)
 
virtual void GradientEvalMultiple (int neval, RtPoint *result, const RtPoint *p)
 
virtual void GradientEvalMultipleFiltered (int neval, RtPoint *result, const RtPoint *p, const RtPoint *dPdu, const RtPoint *dPdv, const RtPoint *dPdw)
 
virtual void Range (RtInterval result, const RtPoint corners[8], const RtVolumeHandle h)
 
virtual bool ShouldSplit ()
 Returns true if the DSO requires splitting into children DSOs. More...
 
virtual void Split (std::vector< ImplicitField *> &children)
 
virtual void Motion (RtPoint result, const RtPoint p)
 
virtual void MotionFiltered (RtPoint result, const RtPoint p, const RtPoint dPdu, const RtPoint dPdv, const RtPoint dPdw)
 
virtual void MotionMultiple (int neval, RtPoint *result, const RtPoint *p)
 
virtual void MotionMultipleFiltered (int neval, RtPoint *result, const RtPoint *p, const RtPoint *dPdu, const RtPoint *dPdv, const RtPoint *dPdw)
 
virtual void BoxMotion (RtBound result, const RtBound b)
 
virtual void VolumeCompleted (const RtVolumeHandle h)
 
virtual ImplicitVertexValueCreateVertexValue (const RtUString name, int nvalue)
 
virtual float MinimumVoxelSize (const RtPoint corners[8])
 
virtual void HullCorners (RtPoint **corners, int *ncorners)
 
virtual void HullCornersMotion (RtPoint *corners, int ncorners, RtPoint **motioncorners, int *nmotioncorners)
 
virtual size_t MemoryUsage ()
 

Public Attributes

RtBound bbox
 

Detailed Description

Definition at line 188 of file ImplicitField.h.

Constructor & Destructor Documentation

◆ ImplicitField()

ImplicitField::ImplicitField ( )
inline

Definition at line 203 of file ImplicitField.h.

◆ ~ImplicitField()

virtual ImplicitField::~ImplicitField ( )
inlinevirtual

Definition at line 204 of file ImplicitField.h.

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.

Definition at line 412 of file ImplicitField.h.

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

Definition at line 448 of file ImplicitField.h.

◆ Eval()

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

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

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

Definition at line 213 of file ImplicitField.h.

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

Definition at line 230 of file ImplicitField.h.

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

Definition at line 247 of file ImplicitField.h.

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

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

Definition at line 269 of file ImplicitField.h.

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

Definition at line 286 of file ImplicitField.h.

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

Definition at line 300 of file ImplicitField.h.

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

Definition at line 475 of file ImplicitField.h.

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

Definition at line 491 of file ImplicitField.h.

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

Definition at line 507 of file ImplicitField.h.

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

Definition at line 462 of file ImplicitField.h.

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

Definition at line 353 of file ImplicitField.h.

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

Definition at line 366 of file ImplicitField.h.

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

Definition at line 382 of file ImplicitField.h.

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

Definition at line 392 of file ImplicitField.h.

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

Definition at line 324 of file ImplicitField.h.

◆ ShouldSplit()

virtual bool ImplicitField::ShouldSplit ( )
inlinevirtual

Returns true if the DSO requires splitting into children DSOs.

Definition at line 337 of file ImplicitField.h.

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

Definition at line 344 of file ImplicitField.h.

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

Definition at line 433 of file ImplicitField.h.

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

Definition at line 195 of file ImplicitField.h.


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