00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __IFD_PassThru_h__
00026 #define __IFD_PassThru_h__
00027
00028 #include "IFD_API.h"
00029 #include "IFD_Scene.h"
00030
00031 class IFD_API IFD_PassThru : public IFD_Scene {
00032 public:
00033 IFD_PassThru();
00034 virtual ~IFD_PassThru();
00035
00036 virtual void initialize(float now);
00037 virtual bool finishFrame(int success, fpreal now);
00038 virtual void setShutterTime(float shutter, int nsegs);
00039
00040 virtual void replaceBaseScene(IFD_Scene *scene);
00041
00042 IFD_Scene *getBase() { return myBase; }
00043
00044
00045
00046 virtual void getOutputImage(UT_String &str, float t,
00047 const char *rtype);
00048 virtual void getOutputDevice(UT_String &str, float t,
00049 const char *rtype);
00050
00051 virtual int getRenderTag(const char *token, UT_String &value,
00052 float now);
00053 virtual bool getLightTag(const char *token, int i,
00054 UT_String &value, float now);
00055 virtual bool getObjectTag(const char *token, int i,
00056 UT_String &value, float now);
00057 virtual bool getGeometryTag(const char *token, int i,
00058 UT_String &value, float now);
00059 virtual bool getAtmosphereTag(const char *token, int i,
00060 UT_String &value, float now);
00061 virtual bool getSpaceTag(const char *token, int i,
00062 UT_String &value, float now);
00063 virtual bool getIPRTag(const char *token, int index,
00064 UT_String &value, float now);
00065
00066
00067 virtual int getNLights(float now);
00068 virtual int getNObjects(float now);
00069 virtual int getNSpaces(float now);
00070 virtual int getNGeometry(float now);
00071 virtual int getNAtmosphere(float now);
00072 virtual int getNIPR(fpreal now);
00073
00074 virtual int doDepthOfField(float now);
00075 virtual float getDither(float now);
00076
00077
00078
00079 virtual int doMotionBlur(float now);
00080 virtual IFD_BLUR_TYPE doCameraBlur(float now);
00081 virtual IFD_BLUR_TYPE doObjectBlur(int idx, float now);
00082 virtual IFD_BLUR_TYPE doGeometryBlur(int idx, float now);
00083 virtual IFD_BLUR_TYPE doLightBlur(int idx, float now);
00084
00085 virtual void getCameraPreInclude(UT_WorkBuffer &str, float now,
00086 const char *rtype);
00087 virtual void getCameraPostInclude(UT_WorkBuffer &str, float now,
00088 const char *rtype);
00089 virtual void getObjectPreInclude(int idx, UT_WorkBuffer &str,
00090 float now, const char *rtype);
00091 virtual void getObjectPostInclude(int idx, UT_WorkBuffer &str,
00092 float now, const char *rtype);
00093 virtual void getLightPreInclude(int idx, UT_WorkBuffer &str,
00094 float now, const char *rtype);
00095 virtual void getLightPostInclude(int idx, UT_WorkBuffer &str,
00096 float now, const char *rtype);
00097 virtual void getAtmospherePreInclude(int idx, UT_WorkBuffer &str,
00098 float now, const char *rtype);
00099 virtual void getAtmospherePostInclude(int idx, UT_WorkBuffer &str,
00100 float now, const char *rtype);
00101 virtual void getSpacePreInclude(int idx, UT_WorkBuffer &str,
00102 float now, const char *rtype);
00103 virtual void getSpacePostInclude(int idx, UT_WorkBuffer &str,
00104 float now, const char *rtype);
00105 virtual void getIPRPreInclude(int idx, UT_WorkBuffer &str,
00106 float now, const char *rtype);
00107 virtual void getIPRPostInclude(int idx, UT_WorkBuffer &str,
00108 float now, const char *rtype);
00109 virtual void getRenderGenericInclude(const char *parm_name,
00110 UT_WorkBuffer &str, float now);
00111
00112
00113
00114 virtual void getCameraParms(IFD_CameraParms &parms, float now,
00115 const char *);
00116 virtual void getCameraTransform(UT_DMatrix4 &xform, float now);
00117
00118 virtual void getLensShader(UT_String &shader, float now,
00119 const char *rtype);
00120 virtual void getImagerShader(UT_String &shader, float now,
00121 const char *rtype);
00122
00123 virtual int getBackgroundImage(UT_String &filename,
00124 float now);
00125 virtual const IMG_Raster *getBackgroundImage(float now,
00126 int xres=0, int yres=0);
00127
00128
00129
00130 virtual const TIL_Raster *getBackgroundImageRaster(float now,
00131 int xres=0, int yres=0);
00132
00133
00134
00135 virtual bool isObjectMaskMember(float now, int obj_idx,
00136 const char *tag);
00137
00138
00139
00140
00141
00142
00143
00144 virtual void getLightName(int idx, UT_String &str);
00145 virtual int getLightIndex(const char *name);
00146 virtual void getLightShader(int idx, UT_String &str, float now,
00147 const char *rtype);
00148 virtual void getShadowShader(int idx, UT_String &str, float now,
00149 const char *rtype);
00150 virtual void getEmitterShader(int idx, UT_String &str, float now,
00151 const char *rtype);
00152 virtual int getAutogenFlag(int idx, float now);
00153 virtual void getShadowName(int idx, UT_String &str, float now);
00154 virtual void getLightParms(int idx, IFD_CameraParms &parms,
00155 float now, const char *rtype);
00156 virtual void getLightParms(int idx, IFD_LightParms &parms,
00157 float now, const char *rtype);
00158 virtual void getLightTransform(int idx, UT_DMatrix4 &mat,
00159 float now);
00160 virtual void getShadowMask(int idx, UT_String &str, float t);
00161
00162
00163
00164
00165
00166 virtual void getAtmosphereName(int idx, UT_String &str);
00167 virtual int getAtmosphereIndex(const char *name);
00168 virtual void getAtmosphereShader(int idx, UT_String &str,
00169 float now, const char *rtype);
00170 virtual int getAtmosphereGeometry(int idx);
00171 virtual void getAtmosphereTransform(int idx, UT_DMatrix4 &mat,
00172 float now);
00173 virtual void getAtmosphereParms(int idx, IFD_ObjectParms &parms,
00174 float now, const char *rtype);
00175
00176
00177
00178
00179
00180
00181
00182 virtual void getObjectName(int idx, UT_String &str, int unique);
00183 virtual int getObjectIndex(const char *name);
00184
00185 virtual void getObjectShader(int idx, UT_String &str, float now,
00186 const char *rtype);
00187 #if 0
00188 virtual const void *getObjectShader(int idx, float now,const char *rtype);
00189 #endif
00190 virtual void getObjectShaderTransform(int idx, UT_DMatrix4 &xform,
00191 float now);
00192 virtual void getInteriorShader(int i, UT_String &str, float now,
00193 const char *rtype);
00194 virtual void getInteriorShaderTransform(int idx, UT_DMatrix4 &xform,
00195 float now);
00196 virtual void getDisplacementTransform(int idx, UT_DMatrix4 &xform,
00197 float now);
00198 virtual void getDisplacementShader(int idx, UT_String &str,
00199 float t, const char *rtype);
00200 virtual void getGeometryShader(int idx, UT_String &str, float t,
00201 const char *rtype);
00202 virtual void getSurfaceEnvironmentShader(int idx, UT_String &str,
00203 float t, const char *rtype);
00204 virtual void getSurfaceShadowShader(int idx, UT_String &str,
00205 float t, const char *rtype);
00206 virtual void getPhotonShader(int idx, UT_String &str, float t,
00207 const char *rtype);
00208 virtual void getPhotonVolumeShader(int idx, UT_String &str,
00209 float t, const char *rtype);
00210 virtual void getContourShader(int idx, UT_String &str, float t,
00211 const char *rtype);
00212 virtual int isObjectLit(int objIndex, int lightIndex, float now);
00213 virtual int isObjectShadower(int objIndex, int lightIndex,
00214 float now);
00215 virtual int isAutoReflect(int objIndex, float t, UT_String &map);
00216 virtual int getAutoReflectResolution(int obj, float now);
00217 virtual int isObjectReflected(int objIndex, int reflObjIndex,
00218 float now);
00219 virtual void getReflectMask(int objIndex, UT_String &str, float t);
00220 virtual void getObjectParms(int idx, IFD_ObjectParms &parms,
00221 float now, const char *rtype);
00222 virtual void getObjectTransform(int idx, UT_DMatrix4 &xform,
00223 float now);
00224 virtual int getObjectGeometry(int idx);
00225 virtual IFD_PHOTON_MODE getObjectCausticsMode(int idx, float t);
00226 virtual IFD_PHOTON_MODE getObjectGlobalIllumMode(int idx, float t);
00227
00228 virtual void getSpaceName(int idx, UT_String &name);
00229 virtual void getSpaceTransform(int idx, UT_DMatrix4 &xform,
00230 float now);
00231 virtual void getIPRName(int idx, UT_String &name);
00232
00233 virtual void getGeometryName(int idx, UT_String &name);
00234 virtual GU_Detail *getGeometry(int idx, float now);
00235 virtual void releaseGeometry(int idx);
00236 virtual void getGeometryParms(int idx, IFD_GeometryParms &parms,
00237 float now, const char *rtype);
00238 virtual void getObjectParms(int idx, IFD_GeometryParms &parms,
00239 float now, const char *rtype);
00240 virtual void getInstanceGroups(int idx, UT_String &groups);
00241
00242 virtual IFD_IPRTree *getIPRTree(int idx);
00243
00244 virtual int getNumObjectBundles(int obj_idx);
00245 virtual const char *getObjectBundleName(int obj_idx, int bundle_idx);
00246 virtual bool outputBundleNames();
00247
00248
00249
00250
00251
00252
00253 virtual void addWorld(const char *name,
00254 const char *atmosphereShader);
00255
00256 virtual void addCamera(const char *name,
00257 IFD_CameraParms &cparms,
00258 const UT_DMatrix4 &xform,
00259 const char *parent);
00260
00261 virtual void addLight(const char *name,
00262 IFD_LightParms &parms,
00263 IFD_CameraParms &cparms,
00264 const UT_DMatrix4 &xform,
00265 const char *parent);
00266
00267
00268
00269 virtual void addObject(const char *name, GU_Detail *gdp,
00270 IFD_GeometryParms &parms,
00271 const UT_DMatrix4 &xform,
00272 const char *parent,
00273 const char *material,
00274 const char *shader,
00275 const char *displacement,
00276 const char *interior);
00277
00278 protected:
00279 IFD_Scene *myBase;
00280 private:
00281 };
00282
00283 #endif