Main Page | Class Hierarchy | Class List | File List | Class Members

State.h

00001 /**************************************************************************\ 00002 * 00003 * FILE: State.h 00004 * 00005 * This source file is part of DIME. 00006 * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved. 00007 * 00008 * This library is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU General Public License, version 2, as 00010 * published by the Free Software Foundation. 00011 * 00012 * This library is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * General Public License (the accompanying file named COPYING) for more 00016 * details. 00017 * 00018 ************************************************************************** 00019 * 00020 * If you need DIME for a non-GPL project, contact Systems In Motion 00021 * to acquire a Professional Edition License: 00022 * 00023 * Systems In Motion http://www.sim.no/ 00024 * Prof. Brochs gate 6 sales@sim.no 00025 * N-7030 Trondheim Voice: +47 22114160 00026 * NORWAY Fax: +47 67172912 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 // private flags 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; // to speed up things... 00067 unsigned int flags; 00068 const dimeInsert *currentInsert; 00069 }; // class dimeState 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

Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.