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_SpotLight_h__
00029 #define __POP_SpotLight_h__
00030
00031
00032
00033 #include <POP/POP_LocalVar.h>
00034
00035 namespace HDK_Sample {
00036
00037 enum POP_SpotLightIndex
00038 {
00039 ISL_ACTIVATE,
00040 ISL_SOURCE,
00041 ISL_CENTER
00042 };
00043
00044 class POP_SpotLight : public POP_LocalVar
00045 {
00046 public:
00047
00048 static OP_Node* myConstructor (OP_Network* net, const char* name,
00049 OP_Operator* entry);
00050
00051 static PRM_Template myTemplateList[];
00052 static OP_TemplatePair myTemplatePair;
00053 static OP_VariablePair myVariablePair;
00054
00055 protected:
00056 POP_SpotLight (OP_Network* net, const char* name,
00057 OP_Operator* entry);
00058 virtual ~POP_SpotLight (void);
00059
00060 virtual OP_ERROR cookPop (OP_Context &context);
00061 virtual void addAttrib (void* userdata);
00062
00063 private:
00064
00065 float ACTIVATE (float t) { FLOAT_PARM("activate", ISL_ACTIVATE, 0, t) };
00066 void SOURCE (UT_String &s) { STR_PARM("source", ISL_SOURCE, 0, 0) };
00067 float CENTERX (float t) { FLOAT_PARM("center", ISL_CENTER, 0, t) };
00068 float CENTERY (float t) { FLOAT_PARM("center", ISL_CENTER, 1, t) };
00069 float CENTERZ (float t) { FLOAT_PARM("center", ISL_CENTER, 2, t) };
00070
00071
00072
00073 POP_FPARM(myCenterX, getCenterX);
00074 POP_FPARM(myCenterY, getCenterY);
00075 POP_FPARM(myCenterZ, getCenterZ);
00076
00077 static int* myIndirect;
00078
00079 void changePoint (GEO_Point* ppt, POP_ContextData* data, float t,
00080 POP_FParam centerx, POP_FParam centery,
00081 POP_FParam centerz);
00082 };
00083
00084 }
00085
00086 #undef FLOAT_PARM
00087 #undef INT_PARM
00088 #undef STR_PARM
00089 #undef STR_PARM_NE
00090
00091 #endif