IvfNodeCursor.h

00001 //
00002 // Copyright 1999-2006 by Structural Mechanics, Lund University.
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Library General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Library General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Library General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00017 // USA.
00018 //
00019 // Please report all bugs and problems to "ivf@byggmek.lth.se".
00020 //
00021 //
00022 // Written by Jonas Lindemann
00023 //
00024 
00025 #ifndef _CIvfNodeCursor_h_
00026 #define _CIvfNodeCursor_h_
00027 
00028 #include <ivf/IvfShape.h>
00029 #include <ivf/IvfComposite.h>
00030 #include <ivf/IvfTransform.h>
00031 #include <ivf/IvfArrow.h>
00032 #include <ivf/IvfQuadPlane.h>
00033 
00034 IvfSmartPointer(CIvfNodeCursor);
00035 
00041 class IVF_API CIvfNodeCursor : public CIvfShape {
00042 public:
00043         enum TCursorType {
00044                 CT_XZ,
00045                 CT_Y,
00046                 CT_XYZ,
00047                 CT_Y_TOP,
00048                 CT_NONE
00049         };
00050         enum TCursorDirection {
00051                 CD_OUTWARDS,
00052                 CD_INWARDS
00053         };
00054         enum TCursorArrowType {
00055                 AT_NORMAL,
00056                 AT_SIMPLE
00057         };
00058 private:
00059         double m_size;
00060         double m_shapeSize;
00061         TCursorType m_cursorType;
00062         TCursorDirection m_cursorDirection;
00063         TCursorArrowType m_cursorArrowType;
00064 
00065         CIvfArrowPtr m_arrow;
00066         
00067         CIvfTransformPtr m_arrowXZ1;
00068         CIvfTransformPtr m_arrowXZ2;
00069         CIvfTransformPtr m_arrowXZ3;
00070         CIvfTransformPtr m_arrowXZ4;
00071 
00072         CIvfTransformPtr m_arrowY1;
00073         CIvfTransformPtr m_arrowY2;
00074 
00075         CIvfCompositePtr m_cursorShape;
00076 
00077         CIvfShapePtr     m_nodeShape;
00078 
00079         CIvfQuadPlanePtr        m_plane;
00080 
00081         bool                    m_usePlane;
00082 
00083         void initCursor();
00084 public:
00086         CIvfNodeCursor();
00087 
00089         virtual ~CIvfNodeCursor();
00090 
00091         IvfClassInfo("CIvfNodeCursor",CIvfShape);
00092 
00094         void setSize(double size);
00095 
00097         double getSize();
00098 
00100         void setType(TCursorType type);
00101 
00103         void setShape(CIvfShape* shape);
00104 
00106         CIvfShape* getShape();
00107 
00109         void setUsePlaneHelper(bool flag);
00110 
00112         bool getUsePlaneHelper();
00113 
00115         void setArrowType(TCursorArrowType type);
00116 
00118         TCursorArrowType getArrowType();
00119 
00121         void setDirection(TCursorDirection direction);
00122 
00124         TCursorDirection getDirection();
00125 
00127         void setShapeSize(double size);
00128 protected:
00129         virtual void createGeometry();
00130 };
00131 
00132 #endif 

Generated on Fri Sep 1 15:36:45 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO