34 using namespace HDK_Sample;
76 return "RAY_DemoFile";
89 fprintf(stderr,
"The %s procedural needs a bounding box specified\n",
98 if (!
import(
"shutter", &myShutter, 1))
103 if (
import(
"velocityblur", &ival, 1))
104 myVelocityBlur = (ival != 0);
106 myVelocityBlur =
false;
109 import(
"file", myFile);
110 import(
"blurfile", myBlurFile);
116 fpreal fps = 24.0, shutter[2] = {0};
117 import(
"global:fps", &fps, 1);
118 import(
"camera:shutter", shutter, 2);
119 myPreBlur = -(myShutter * shutter[0]) / fps;
120 myPostBlur = (myShutter * shutter[1]) / fps;
142 fprintf(stderr,
"Unable to load geometry[0]: '%s'\n",
162 fprintf(stderr,
"Unable to load geometry[1]: '%s'\n",
169 obj->addGeometry(g0);
GU_Detail * getGdp() const
int initialize(const UT_BoundingBox *) override
RAY_ProceduralGeo createGeometry() const
Allocate geometry for this procedural.
Procedural primitive for mantra (RAY)
const char * className() const override
bool insert(ProcDefinition *def, bool replace_existing=true)
A procedural which does a deferred load of geometry from disk.
void getBoundingBox(UT_BoundingBox &box) override
The bounding box is the "object space" bounds of the procedural.
IOStatus load(const char *filename, const GA_LoadOptions *opts=0, UT_StringArray *errors=0)
Load a geometry file.
void registerProcedural(RAY_ProceduralFactory *factory)
Modern interface to register procedurals.
SYS_FORCE_INLINE const char * c_str() const
fpreal addVelocityBlur(fpreal pre_blur, fpreal post_blur, const UT_StringHolder &velocity_attribute=UTmakeUnsafeRef("v"), int acceleration_segments=1, const UT_StringHolder &acceleration_attribute=UT_StringHolder())
RAY_ProceduralChildPtr createChild() const
auto fprintf(std::FILE *f, const S &fmt, const T &...args) -> int
Parameter definition for arguments to RAY_Procedural.
GU_DetailHandle appendSegmentGeometry(fpreal shutter)
SYS_FORCE_INLINE void initBounds()
RAY_ProceduralArg * arguments() const override
Provide a const reference to the arguments for the procedural.
RAY_Procedural * create() const override
Create a procedural, and pass ownership of the instance to mantra.
bool removeSegmentGeometry(const GU_ConstDetailHandle &geo)
Class to create a procedural.
SYS_FORCE_INLINE bool isstring() const