HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GDT_CaptureWeight.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: GDT_CaptureWeight.h (Geo Delta Library)
7  *
8  * COMMENTS: This contains a full list of vectors that describe the changes
9  * to the gdp's point capture weight attributes.
10  *
11  */
12 
13 #ifndef __GDT_CaptureWeight_h__
14 #define __GDT_CaptureWeight_h__
15 
16 #include "GDT_API.h"
17 #include <UT/UT_IntArray.h>
18 #include <UT/UT_ValArray.h>
19 #include <UT/UT_VectorTypes.h>
20 #include <GA/GA_Types.h>
21 
22 #include "GDT_Token.h"
23 
24 class GA_AIFEditDelta;
25 class GA_AIFEditSnapshot;
26 class GA_Attribute;
27 class GEO_Detail;
28 class GDT_TokenList;
29 class GU_DetailHandle;
30 
31 typedef int (*GDT_CaptureRegionCB)( void *user_data,
32  char *cregion,
33  UT_Matrix4 &parent_xform,
34  GU_DetailHandle &tube_gdp );
35 
36 
38 {
39 public:
41  virtual ~GDT_CaptureWeight();
42 
43  GDT_CaptureWeight( const GDT_CaptureWeight &other );
44 
45  virtual int64 getMemoryUsage(bool inclusive) const;
46 
47  void getOpPaths( UT_StringList &paths );
48  void getOpPathsCopy( UT_ValArray<char *> &paths );
49  void setOpPaths( const UT_ValArray<char *> &paths );
50  int changeOpPaths( const char *old_name,
51  const char *new_name );
52  void changeCaptureRegionRoot( const char *old_root,
53  const char *new_root );
54  void refreshCaptureFrameInfo(
55  const GEO_Detail &gdp,
56  GDT_CaptureRegionCB get_region,
57  void *user_data );
58 
59  virtual void applyDeltas( const GDT_TokenList &token_list,
60  GEO_Detail &gdp,
61  const GA_AIFEditDeltaMap &map,
62  bool inverse=false ) const;
63  virtual void applyScaledDelta(GEO_Detail &gdp, GA_Offset pt,
64  fpreal scale,
65  const GA_AIFEditDeltaMap &map) const;
66 
67  void mergeCaptureWeightDeltas(
68  const GDT_CaptureWeight &other,
69  bool inverse = false );
70 
71  virtual void zeroDeltas();
72 
73  // Begin/end a change to a point capture weight
74  void beginCaptureWeightChange( const GA_Attribute *capt,
75  GA_Offset element );
76  void endCaptureWeightChange(
77  const GA_AIFEditDeltaMap &map);
78 
79  virtual unsigned int changed() const;
80 
81  // I/O Methods
82  virtual bool legacyLoad( UT_IStream &is, unsigned int numtotal );
83 
84  virtual bool save( UT_JSONWriter &w, const GDT_JSON &jsn ) const;
85  virtual bool load( UT_JSONParser &p, const GDT_JSON &jsn );
86 
87 private: // methods
88  void destroy();
89 
90 private: // data
91  GA_AIFEditDelta *myDelta;
92  GA_AIFEditSnapshot *mySnapshot;
93 };
94 
95 #endif // __GDT_CaptureWeight_h__
Definition of a geometry attribute.
Definition: GA_Attribute.h:189
#define GDT_API
Definition: GDT_API.h:10
JSON reader class which handles parsing of JSON or bJSON files.
Definition: UT_JSONParser.h:72
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:32
virtual bool legacyLoad(UT_IStream &is, unsigned int numtotal)=0
GA_Size GA_Offset
Definition: GA_Types.h:617
long long int64
Definition: SYS_Types.h:100
GA_API const UT_StringHolder scale
Base class for storing snapshots during an edit operation.
Definition: GA_AIFEdit.h:112
int(* GDT_CaptureRegionCB)(void *user_data, char *cregion, UT_Matrix4 &parent_xform, GU_DetailHandle &tube_gdp)
double fpreal
Definition: SYS_Types.h:263
virtual void applyDeltas(const GDT_TokenList &list, GEO_Detail &gdp, const GA_AIFEditDeltaMap &map, bool inverse=false) const =0
typedef int
Definition: png.h:1175
Base class to store recorder data.
Definition: GA_AIFEdit.h:217
virtual bool load(UT_JSONParser &p, const GDT_JSON &json)=0
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
virtual bool save(UT_JSONWriter &w, const GDT_JSON &json) const =0
virtual int64 getMemoryUsage(bool inclusive=false) const =0
Class for mapping between an index and an attribute data offset.
Definition: GA_AIFEdit.h:48