HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Microphone.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: OBJ_Microphone.h (Custom Library, C++)
7  *
8  * COMMENTS: An object to describe a motion capture handle
9  *
10  */
11 
12 #ifndef __OBJ_Microphone__
13 #define __OBJ_Microphone__
14 
15 #include "OBJ_API.h"
16 #include "OBJ_Geometry.h"
17 
19 {
29  I_N_MIC_INDICES // should always be last in the list
30 };
31 
32 
33 #define FLOAT_OBJ_PARM(name, idx, vi, t) \
34  return evalFloat(name, &handleIndirect[idx], vi, t);
35 #define INT_OBJ_PARM(name, idx, vi, t) \
36  return evalInt(name, &handleIndirect[idx], vi, t);
37 #define STR_OBJ_PARM(name, idx, vi, t) \
38  evalString(str, name, &handleIndirect[idx], vi, t);
39 
41 {
42 public:
44  const char *name,
45  OP_Operator *op);
46  virtual ~OBJ_Microphone();
47 
48  static OP_Node *myConstructor(OP_Network *net,
49  const char *name,
50  OP_Operator *entry);
51 
52  virtual OBJ_OBJECT_TYPE getObjectType() const;
53 
54  void getMicFilter(UT_String &choppath, fpreal now);
55 
56  int isDirectional();
57  int getRolloffType();
58  void getMicParms(int &active,
59  fpreal &volume, fpreal &volume2,
60  fpreal &angle1, fpreal &angle2,
61  fpreal &rolloff, fpreal t);
62 
63  virtual void resolveObsoleteParms(PRM_ParmList *obsolete);
64  static PRM_Template *getObsolete();
65  static PRM_Template *getTemplateList();
66 protected:
67  virtual bool updateParmsFlags();
68 
69  virtual OP_ERROR cookMyObj(OP_Context &context);
70  // Used to get pointer to indirection indices for each object type
71  virtual int *getIndirect() const
72  { return handleIndirect; }
73 
74 private:
75  int ACTIVE(fpreal t)
76  { INT_OBJ_PARM("micactive", I_MIC_ACTIVE, 0, t); }
77 
78  fpreal SENSITIVITY(fpreal t)
79  { FLOAT_OBJ_PARM("sensitive", I_MIC_SENSITIVITY, 0, t); }
80 
81  int MIC_TYPE()
82  { INT_OBJ_PARM("direct", I_MIC_TYPE, 0, 0); }
83 
84  fpreal RECORD_CONE(fpreal t)
85  { FLOAT_OBJ_PARM("reccone", I_MIC_CONE, 0, t); }
86 
87  fpreal OUTER_CONE(fpreal t)
88  { FLOAT_OBJ_PARM("outcone", I_MIC_OUTER_CONE, 0, t); }
89 
90  int DROPOFF()
91  { INT_OBJ_PARM("dropoff", I_MIC_DROPOFF, 0, 0); }
92 
93  fpreal DROPOFF_RATE(fpreal t)
94  { FLOAT_OBJ_PARM("droprate", I_MIC_DROPOFF_RATE, 0, t); }
95 
96  fpreal OUTER_SENSITIVITY(fpreal t)
97  { FLOAT_OBJ_PARM("outsensitive", I_MIC_OUTER_SENSITIVITY, 0, t); }
98 private:
99 
100  virtual int isObjectRenderable(fpreal t) const;
101 
102  static int *handleIndirect;
103 };
104 
105 #undef FLOAT_OBJ_PARM
106 #undef STR_OBJ_PARM
107 #undef INT_OBJ_PARM
108 
109 #endif
virtual void resolveObsoleteParms(PRM_ParmList *obsolete_parms)
UT_ErrorSeverity
Definition: UT_Error.h:25
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
#define FLOAT_OBJ_PARM(name, idx, vi, t)
static PRM_Template * getObsolete()
virtual OP_ERROR cookMyObj(OP_Context &context)
GLuint const GLchar * name
Definition: glcorearb.h:785
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
double fpreal
Definition: SYS_Types.h:270
OBJ_MicrophoneIndex
#define INT_OBJ_PARM(name, idx, vi, t)
virtual int isObjectRenderable(fpreal t) const
virtual OBJ_OBJECT_TYPE getObjectType() const
#define OBJ_API
Definition: OBJ_API.h:10
virtual bool updateParmsFlags() override
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:71
virtual int * getIndirect() const