00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __GDT_Position_h__
00021 #define __GDT_Position_h__
00022
00023 #include "GDT_API.h"
00024 #include <UT/UT_BitArray.h>
00025 #include <UT/UT_Vector4Array.h>
00026
00027 #include "GDT_Token.h"
00028
00029 #include "GDT_CoordinateFrames.h"
00030 #include "GDT_SymmetryTransform.h"
00031
00032 class GA_PointGroup;
00033 class GA_AIFEditDelta;
00034 class GA_AIFEditSnapshot;
00035 class GDT_TokenList;
00036 class GEO_Point;
00037
00038 class GDT_API GDT_Position : public GDT_Token
00039 {
00040 public:
00041 GDT_Position() : myDelta(0), mySnapshot(0),
00042 myCoordinateFrames(0) {}
00043 GDT_Position(const GDT_Position &other);
00044
00045 virtual ~GDT_Position() {}
00046
00047
00048 virtual void applyDeltas(const GDT_TokenList &list,
00049 GEO_Detail &gdp,
00050 const GA_AIFEditDeltaMap &map,
00051 bool inverse=false) const;
00052 virtual void applyScaledDelta(GEO_Detail &gdp, GEO_Point &pt,
00053 fpreal64 scale,
00054 const GA_AIFEditDeltaMap &map) const;
00055 virtual void applyScaledDeltas(GEO_Detail &gdp,
00056 fpreal64 scale,
00057 const GA_PointGroup *ptgroup,
00058 const GA_AIFEditDeltaMap &map) const;
00059
00060 void mergePositionDeltas(const GDT_Position &other,
00061 bool inverse = false);
00062
00063
00064 virtual void zeroDeltas();
00065
00066
00067 void beginPointPositionChange(const GA_Attribute *P,
00068 GA_Offset element);
00069 void endPointPositionChange(
00070 const GA_AIFEditDeltaMap &map);
00071
00072 virtual unsigned int changed() const;
00073
00074
00075 virtual bool legacyLoad(UT_IStream &is,
00076 unsigned int numtotal);
00077
00078 virtual bool save(UT_JSONWriter &w,
00079 const GDT_JSON &json) const;
00080 virtual bool load(UT_JSONParser &p,
00081 const GDT_JSON &json);
00082
00083 void setCoordinateFrames(const GDT_CoordinateFrames *coords);
00084
00085 void createSymmetryDeltas(const GDT_Position &input,
00086 GDT_SymmetryTransform *transform,
00087 const GA_AIFEditDeltaMap &map);
00088
00089 private:
00090 GA_AIFEditDelta *myDelta;
00091 GA_AIFEditSnapshot *mySnapshot;
00092
00093 const GDT_CoordinateFrames *myCoordinateFrames;
00094 };
00095
00096 #endif