HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_AgentClip.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  * COMMENTS:
7  */
8 
9 #ifndef __HOM_AgentClip_h__
10 #define __HOM_AgentClip_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Module.h"
14 #include "HOM_PtrOrNull.h"
15 
16 class HOM_AgentRig;
17 class HOM_ChopNode;
18 class HOM_Matrix4;
19 
20 SWIGOUT(%rename(AgentClip) HOM_AgentClip;)
21 // Force SWIG to output an __init__ method even though it determines this
22 // class is abstract.
23 SWIGOUT(%feature("notabstract") HOM_AgentClip;)
24 
26 {
27 public:
28 #ifdef SWIG
29 %extend
30 {
31  HOM_AgentClip(const char *name, const char *path, const HOM_AgentRig &rig,
32  bool keep_external_ref = true)
33  { return HOM().newAgentClip(name, path, rig, keep_external_ref); }
34 
35  HOM_AgentClip(const char *name, HOM_ChopNode &chop, const HOM_AgentRig &rig,
36  double frame = HOM_AgentClip::currentFrame())
37  { return HOM().newAgentClip(name, chop, rig, frame); }
38 
39  HOM_AgentClip(const HOM_AgentClip &clip, const HOM_AgentRig &rig,
40  const char *name = nullptr)
41  { return HOM().newAgentClip(clip, rig, name); }
42 }
43 #else
45  { HOM_CONSTRUCT_OBJECT(this) }
46 #endif
47 
48  virtual ~HOM_AgentClip()
49  { HOM_DESTRUCT_OBJECT(this) }
50 
51  virtual bool operator==(HOM_PtrOrNull<HOM_AgentClip> clip) const = 0;
53  { return !operator==(clip); }
54 
55  virtual int __hash__() const = 0;
56  virtual std::string __repr__() const = 0;
57 
58  virtual std::string name() const = 0;
59  virtual double length() const = 0;
60  virtual double sampleRate() const = 0;
61 
62  SWIGOUT(%newobject sampleLocal;)
63  virtual HOM_Matrix4 *sampleLocal(double time, int transform) const = 0;
64  SWIGOUT(%newobject sampleWorld;)
65  virtual HOM_Matrix4 *sampleWorld(double time, int transform) const = 0;
66 
67  virtual double sample(double time, const char *channel) const = 0;
68  virtual std::vector<std::string> channelNames() const = 0;
69 
70  virtual HOM_BinaryString data(bool binary, bool worldspace = false) const = 0;
71 
72  // Works around Swig errors when directly using HOM().frame() as the value
73  // of a default argument - it seems to think there are nested classes.
74  // We also don't want to add a time dependency here.
75  SWIGOUT(%ignore currentFrame;)
76  static double currentFrame()
77  {
78  return HOM().timeToFrame(HOM().getTimeWithoutAddingDependency());
79  }
80 };
81 
82 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:983
static double currentFrame()
Definition: HOM_AgentClip.h:76
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
const GLuint GLenum const void * binary
Definition: glcorearb.h:1923
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
std::string __repr__()
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:982
int __hash__()
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
GA_API const UT_StringHolder transform
virtual ~HOM_AgentClip()
Definition: HOM_AgentClip.h:48
bool operator!=(HOM_PtrOrNull< HOM_AgentClip > clip) const
Definition: HOM_AgentClip.h:52
virtual HOM_AgentClip * newAgentClip(const char *name, const char *path, const HOM_AgentRig &rig, bool keep_external_ref)=0
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER T clip(const T &p, const Box< T > &box)
Definition: ImathBoxAlgo.h:89
virtual double timeToFrame(double time)=0
HOM_API HOM_Module & HOM()
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:596
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794