#include "ROP_Field3D.h"
#include "f3d_io.h"
#include <Field3D/InitIO.h>
using namespace HDK_Sample;
static PRM_Name sopPathName(
"soppath",
"SOP Path");
static PRM_Name theFileName(
"file",
"Output File");
static PRM_Name alfprogressName(
"alfprogress",
"Alfred Style Progress");
{
};
static PRM_Name gridtypeName(
"gridtype",
"Grid Type");
{
};
static PRM_Name bitdepthName(
"bitdepth",
"Bit Depth");
static PRM_Name collateName(
"collatevector",
"Collate Vector Fields");
&theGridTypeMenu),
&theBitDepthMenu),
};
getTemplates()
{
if (theTemplate)
return theTemplate;
theTemplate[ROP_F3D_SOPPATH] = f3dTemplates[0];
theTemplate[ROP_F3D_SOPOUTPUT] = f3dTemplates[1];
theTemplate[ROP_F3D_GRIDTYPE] = f3dTemplates[3];
theTemplate[ROP_F3D_BITDEPTH] = f3dTemplates[4];
theTemplate[ROP_F3D_COLLATE] = f3dTemplates[5];
theTemplate[ROP_F3D_ALFPROGRESS] = f3dTemplates[2];
return theTemplate;
}
ROP_Field3D::getTemplatePair()
{
if (!ropPair)
{
}
return ropPair;
}
ROP_Field3D::getVariablePair()
{
if (!pair)
return pair;
}
{
return new ROP_Field3D(net, name, op);
}
{
}
ROP_Field3D::~ROP_Field3D()
{
}
int
{
int rcode = 1;
myEndTime = tend;
myStartTime = tstart;
if (INITSIM())
{
initSimulationOPs();
}
{
if( !executePreRenderScript(tstart) )
return 0;
}
return rcode;
}
{
if( !executePreFrameScript(time) )
if( sop )
{
}
else
{
SOPPATH(soppath, time);
}
{
}
sop = getSOPNode(soppath, 1);
if (!sop)
{
}
if (!gdp)
{
}
OUTPUT(savepath, time);
f3d_fileSave(gdp, (const char *) savepath,
(F3D_BitDepth) BITDEPTH(time),
(F3D_GridType) GRIDTYPE(time),
if (ALFPROGRESS() && (myEndTime != myStartTime))
{
fpreal fpercent = (time - myStartTime) / (myEndTime - myStartTime);
fprintf(stdout,
"ALF_PROGRESS %d%%\n", percent);
fflush(stdout);
}
{
if( !executePostFrameScript(time) )
}
}
ROP_Field3D::endRender()
{
if (INITSIM())
{
if( !executePostRenderScript(myEndTime) )
}
}
void
{
Field3D::initIO();
"Field 3D",
ROP_Field3D::myConstructor,
ROP_Field3D::getTemplatePair(),
0,
0,
ROP_Field3D::getVariablePair(),
}