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
00026
00027
00028 #ifndef __POP_LocalForce_h__
00029 #define __POP_LocalForce_h__
00030
00031
00032
00033 #include <POP/POP_LocalVar.h>
00034
00035 namespace HDK_Sample {
00036
00037 enum POP_LocalForceIndex
00038 {
00039 ILF_ACTIVATE,
00040 ILF_SOURCE,
00041 ILF_ORIGIN,
00042 ILF_DIR,
00043 ILF_RADIUS,
00044 ILF_LENGTH,
00045 ILF_STRENGTH,
00046 ILF_IGNOREMASS,
00047 ILF_OVERRIDEMASS,
00048 ILF_MASS
00049 };
00050
00051 class POP_LocalForce : public POP_LocalVar
00052 {
00053 public:
00054
00055 static OP_Node* myConstructor (OP_Network* net, const char* name,
00056 OP_Operator* entry);
00057
00058 static PRM_Template myTemplateList[];
00059 static OP_TemplatePair myTemplatePair;
00060 static OP_VariablePair myVariablePair;
00061
00062 protected:
00063 POP_LocalForce (OP_Network* net, const char* name,
00064 OP_Operator* entry);
00065 virtual ~POP_LocalForce (void);
00066
00067 virtual unsigned disableParms (void);
00068 virtual OP_ERROR cookPop (OP_Context &context);
00069
00070 private:
00071
00072 float ACTIVATE (float t) { FLOAT_PARM("activate", ILF_ACTIVATE, 0, t) };
00073 void SOURCE (UT_String &s) { STR_PARM("source", ILF_SOURCE, 0, 0) };
00074 float ORIGINX (float t) { FLOAT_PARM("origin", ILF_ORIGIN, 0, t) };
00075 float ORIGINY (float t) { FLOAT_PARM("origin", ILF_ORIGIN, 1, t) };
00076 float ORIGINZ (float t) { FLOAT_PARM("origin", ILF_ORIGIN, 2, t) };
00077 float DIRX (float t) { FLOAT_PARM("dir", ILF_DIR, 0, t) };
00078 float DIRY (float t) { FLOAT_PARM("dir", ILF_DIR, 1, t) };
00079 float DIRZ (float t) { FLOAT_PARM("dir", ILF_DIR, 2, t) };
00080 float RADIUS (float t) { FLOAT_PARM("radius", ILF_RADIUS, 0, t) };
00081 float LENGTH (float t) { FLOAT_PARM("length", ILF_LENGTH, 0, t) };
00082 float STRENGTH (float t) { FLOAT_PARM("strength", ILF_STRENGTH, 0, t) };
00083 int IGNOREMASS (void) { INT_PARM("ignoremass", ILF_IGNOREMASS, 0, 0) };
00084 int OVERRIDEMASS (void)
00085 { INT_PARM("overridemass", ILF_OVERRIDEMASS, 0, 0) };
00086 float MASS (float t) { FLOAT_PARM("mass", ILF_MASS, 0, t) };
00087
00088
00089
00090 POP_FPARM(myStrength, getStrength);
00091 POP_FPARM(myMass, getMass);
00092
00093 static int* myIndirect;
00094
00095 void changePoint (GEO_Point* ppt, POP_ContextData* data, float t,
00096 const UT_Vector3& origin, const UT_Vector3& dir,
00097 float radius, float length,
00098 POP_FParam strength,
00099 int massOffset, POP_FParam mass);
00100 };
00101
00102 }
00103
00104 #endif