00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef DIME_STATE_H
00031 #define DIME_STATE_H
00032
00033 #include <dime/util/Linear.h>
00034
00035 class dimeInsert;
00036
00037 class DIME_DLL_API dimeState
00038 {
00039 public:
00040 dimeState(const bool traversePolylineVertices,
00041 const bool explodeInserts);
00042 dimeState(const dimeState &st);
00043
00044 const dimeMatrix &getMatrix() const;
00045 const dimeMatrix &getInvMatrix() const;
00046 void getMatrix(dimeMatrix &m) const;
00047 void setMatrix(const dimeMatrix &matrix);
00048
00049 enum {
00050 TRAVERSE_POLYLINE_VERTICES = 0x1,
00051 EXPLODE_INSERTS = 0x2,
00052
00053 PUBLIC_MASK = 0x7fff,
00054 PRIVATE_MASK = 0x8000,
00055 INVMATRIX_DIRTY = 0x8000
00056 };
00057
00058 void setFlags(const unsigned int flags);
00059 unsigned int getFlags() const;
00060
00061 const dimeInsert *getCurrentInsert() const;
00062
00063 private:
00064 friend class dimeInsert;
00065 dimeMatrix matrix;
00066 dimeMatrix invmatrix;
00067 unsigned int flags;
00068 const dimeInsert *currentInsert;
00069 };
00070
00071 inline const dimeMatrix &
00072 dimeState::getMatrix() const {
00073 return this->matrix;
00074 }
00075
00076 inline void
00077 dimeState::setFlags(const unsigned int flags)
00078 {
00079 this->flags = (this->flags & PRIVATE_MASK) | flags;
00080 }
00081
00082 inline unsigned int
00083 dimeState::getFlags() const
00084 {
00085 return (this->flags & PUBLIC_MASK);
00086 }
00087
00088 inline const dimeInsert *
00089 dimeState::getCurrentInsert() const
00090 {
00091 return this->currentInsert;
00092 }
00093
00094 #endif // ! DIME_STATE_H
00095