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  ~OBJ_Microphone() override;
47 
48  static OP_Node *myConstructor(OP_Network *net,
49  const char *name,
50  OP_Operator *entry);
51 
52  OBJ_OBJECT_TYPE getObjectType() const override;
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 
64  PRM_ParmList *obsolete) override;
65  static PRM_Template *getObsolete();
66  static PRM_Template *getTemplateList();
67 protected:
68  bool updateParmsFlags() override;
69 
70  OP_ERROR cookMyObj(OP_Context &context) override;
71  // Used to get pointer to indirection indices for each object type
72  int *getIndirect() const override
73  { return handleIndirect; }
74 
75 private:
76  int ACTIVE(fpreal t)
77  { INT_OBJ_PARM("micactive", I_MIC_ACTIVE, 0, t); }
78 
79  fpreal SENSITIVITY(fpreal t)
80  { FLOAT_OBJ_PARM("sensitive", I_MIC_SENSITIVITY, 0, t); }
81 
82  int MIC_TYPE()
83  { INT_OBJ_PARM("direct", I_MIC_TYPE, 0, 0); }
84 
85  fpreal RECORD_CONE(fpreal t)
86  { FLOAT_OBJ_PARM("reccone", I_MIC_CONE, 0, t); }
87 
88  fpreal OUTER_CONE(fpreal t)
89  { FLOAT_OBJ_PARM("outcone", I_MIC_OUTER_CONE, 0, t); }
90 
91  int DROPOFF()
92  { INT_OBJ_PARM("dropoff", I_MIC_DROPOFF, 0, 0); }
93 
94  fpreal DROPOFF_RATE(fpreal t)
95  { FLOAT_OBJ_PARM("droprate", I_MIC_DROPOFF_RATE, 0, t); }
96 
97  fpreal OUTER_SENSITIVITY(fpreal t)
98  { FLOAT_OBJ_PARM("outsensitive", I_MIC_OUTER_SENSITIVITY, 0, t); }
99 private:
100 
101  int isObjectRenderable(fpreal t) const override;
102 
103  static int *handleIndirect;
104 };
105 
106 #undef FLOAT_OBJ_PARM
107 #undef STR_OBJ_PARM
108 #undef INT_OBJ_PARM
109 
110 #endif
OBJ_OBJECT_TYPE getObjectType() const override
UT_ErrorSeverity
Definition: UT_Error.h:25
void resolveObsoleteParms(PRM_ParmList *obsolete_parms) override
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
#define FLOAT_OBJ_PARM(name, idx, vi, t)
static PRM_Template * getObsolete()
int * getIndirect() const override
virtual OP_ERROR cookMyObj(OP_Context &context)
GLuint const GLchar * name
Definition: glcorearb.h:786
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
GLdouble t
Definition: glad.h:2397
OBJ_MicrophoneIndex
#define INT_OBJ_PARM(name, idx, vi, t)
virtual int isObjectRenderable(fpreal t) const
fpreal64 fpreal
Definition: SYS_Types.h:277
bool updateParmsFlags() override
#define OBJ_API
Definition: OBJ_API.h:10
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:73