00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __OBJ_Camera_h__
00021 #define __OBJ_Camera_h__
00022
00023 #include "OBJ_API.h"
00024 #include "OBJ_Node.h"
00025
00026 class IFD_CameraParms;
00027
00028 enum OBJ_CamIndex
00029 {
00030 I_N_CAM_INDICES = I_N_BASE_INDICES
00031 };
00032
00033 class OBJ_API OBJ_Camera : public OBJ_Node
00034 {
00035 public:
00036 OBJ_Camera(OP_Network *, const char *, OP_Operator *);
00037 virtual ~OBJ_Camera();
00038
00039 static PRM_Template *getObsolete();
00040 static OP_Node *myConstructor(OP_Network *net,
00041 const char *name, OP_Operator *entry);
00042
00043 virtual unsigned disableParms();
00044
00045 virtual void getIFDParms(IFD_ObjectParms &parms, float t,
00046 const char *);
00047 virtual void getIFDParms(IFD_CameraParms &parms, float t,
00048 const char *);
00049
00050
00051 virtual void addInterestsOnIFDParms(OP_Node *node);
00052
00053 virtual OBJ_OBJECT_TYPE getObjectType() const;
00054
00055 virtual void saveDialogScriptExtraInfo(ostream &os);
00056
00057 static PRM_Template *getTemplateList(OBJ_ParmsStyle style);
00058
00059
00060 virtual OBJ_Camera *castToOBJCamera() { return this; }
00061 virtual OBJ_Camera *getControllingCamera(fpreal now);
00062
00063 protected:
00064
00065 virtual int *getIndirect() const
00066 { return camIndirect; }
00067
00068
00069
00070 virtual bool cookedDataUsesAllParameters() const
00071 { return true; }
00072
00073 virtual OP_ERROR cookMyObj(OP_Context &ctx);
00074
00075 virtual int collectPropertiesFromParms(PI_EditScriptedParms &,
00076 UT_StringArray &names,
00077 PRM_ParmNameMap &nmap);
00078 virtual int collectPropertiesFromChannels(PI_EditScriptedParms &,
00079 UT_BitArray &selection,
00080 const CH_ChannelList &channels);
00081
00082 public:
00083
00084 void getWinParms(float &winx, float &winy,
00085 float &sizex, float &sizey,
00086 float &winroll, float now);
00087
00088
00089 virtual int PROJECTION(fpreal t);
00090 virtual fpreal ORTHOW(fpreal t);
00091 virtual int RESX(fpreal);
00092 virtual int RESY(fpreal);
00093 virtual fpreal ASPECT(fpreal t);
00094 virtual fpreal FOCAL(fpreal t);
00095 virtual fpreal APERTURE(fpreal t);
00096 virtual fpreal SHUTTER(fpreal t);
00097 virtual fpreal getNEAR(fpreal t);
00098 virtual fpreal getFAR(fpreal t);
00099 virtual fpreal CURVATURE(fpreal t);
00100 virtual fpreal FSTOP(fpreal t);
00101 virtual fpreal FOCUS(fpreal t);
00102 virtual fpreal CROPL(fpreal t);
00103 virtual fpreal CROPR(fpreal t);
00104 virtual fpreal CROPB(fpreal t);
00105 virtual fpreal CROPT(fpreal t);
00106 virtual fpreal WINPX(fpreal t);
00107 virtual fpreal WINPY(fpreal t);
00108 virtual fpreal WINX(fpreal t);
00109 virtual fpreal WINY(fpreal t);
00110 virtual fpreal WINSIZEX(fpreal t);
00111 virtual fpreal WINSIZEY(fpreal t);
00112 virtual fpreal WINROLL(fpreal t);
00113
00114 int ROTOSOURCE(fpreal now);
00115 void ROTOFILE(UT_String &str, fpreal t);
00116 void ROTOFILE_RAW(UT_String &str, fpreal t);
00117 int ROTO_OVERRIDE(fpreal now);
00118 int ROTO_RESX(fpreal t);
00119 int ROTO_RESY(fpreal t);
00120 void COPPATH(UT_String &str, fpreal t);
00121 int TRACKWINCHANS(fpreal t);
00122 fpreal COPFRAME(fpreal t);
00123 void COPFRAME_RAW(UT_String &str, fpreal t);
00124 void COLOR_PLANE(UT_String &str, fpreal t);
00125 int ALPHA_PLANE(fpreal);
00126
00127 fpreal CLEAR(fpreal t);
00128 int FOG(fpreal t);
00129 fpreal FOGDENSITY(fpreal t);
00130 fpreal FOGNEAR(fpreal t);
00131 fpreal FOGFAR(fpreal t);
00132 fpreal FOGCOLOR(fpreal t, int i);
00133 fpreal FOGALPHA(fpreal t);
00134
00135 void VIEWCOMMENT(UT_String &str, fpreal t);
00136 virtual fpreal MASKASPECT(fpreal t);
00137 virtual fpreal MASKOPACITY(fpreal t);
00138 virtual void MASKOVERLAY(UT_String &str, fpreal t);
00139
00140 protected:
00141
00142
00143 float cookDependentFloat(const char *name, fpreal now,
00144 int vi, fpreal defval);
00145 private:
00146 static int *camIndirect;
00147 };
00148
00149 #endif