HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  SWIGOUT(%kwargs fileName;)
60  virtual std::string fileName(bool expanded = false) const = 0;
61  virtual double length() const = 0;
62  virtual double sampleRate() const = 0;
63 
64  SWIGOUT(%newobject sampleLocal;)
65  virtual HOM_Matrix4 *sampleLocal(double time, int transform) const = 0;
66  SWIGOUT(%newobject sampleWorld;)
67  virtual HOM_Matrix4 *sampleWorld(double time, int transform) const = 0;
68 
69  virtual double sample(double time, const char *channel) const = 0;
70  virtual std::vector<std::string> channelNames() const = 0;
71 
72  virtual HOM_BinaryString data(bool binary, bool worldspace = false) const = 0;
73 
74  // Works around Swig errors when directly using HOM().frame() as the value
75  // of a default argument - it seems to think there are nested classes.
76  // We also don't want to add a time dependency here.
77  SWIGOUT(%ignore currentFrame;)
78  static double currentFrame()
79  {
80  return HOM().timeToFrame(HOM().getTimeWithoutAddingDependency());
81  }
82 };
83 
84 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1053
static double currentFrame()
Definition: HOM_AgentClip.h:78
GT_API const UT_StringHolder time
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
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:344
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1052
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:590
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794