Quantum GIS API Documentation
1.7.4
|
00001 /*************************************************************************** 00002 TriDecorator.h - description 00003 ------------------- 00004 copyright : (C) 2004 by Marco Hugentobler 00005 email : mhugent@geo.unizh.ch 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 00017 #ifndef TRIDECORATOR_H 00018 #define TRIDECORATOR_H 00019 00020 #include "Triangulation.h" 00021 00023 class TriDecorator: public Triangulation 00024 { 00025 public: 00026 TriDecorator(); 00027 TriDecorator( Triangulation* t ); 00028 virtual ~TriDecorator(); 00029 virtual void addLine( Line3D* line, bool breakline ); 00030 virtual int addPoint( Point3D* p ); 00032 virtual void addTriangulation( Triangulation* t ); 00034 virtual void performConsistencyTest(); 00035 virtual bool calcNormal( double x, double y, Vector3D* result ); 00036 virtual bool calcPoint( double x, double y, Point3D* result ); 00037 virtual Point3D* getPoint( unsigned int i ) const; 00038 virtual int getNumberOfPoints() const; 00039 virtual bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 ); 00040 virtual bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 ); 00041 virtual int getOppositePoint( int p1, int p2 ); 00042 virtual QList<int>* getSurroundingTriangles( int pointno ); 00043 virtual double getXMax() const; 00044 virtual double getXMin() const; 00045 virtual double getYMax() const; 00046 virtual double getYMin() const; 00047 virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ); 00048 virtual void setEdgeColor( int r, int g, int b ); 00049 virtual void setForcedEdgeColor( int r, int g, int b ); 00050 virtual void setBreakEdgeColor( int r, int g, int b ); 00051 virtual void setTriangleInterpolator( TriangleInterpolator* interpolator ); 00052 virtual void eliminateHorizontalTriangles(); 00053 virtual void ruppertRefinement(); 00054 virtual bool pointInside( double x, double y ); 00055 virtual bool swapEdge( double x, double y ); 00056 virtual QList<int>* getPointsAroundEdge( double x, double y ); 00057 protected: 00059 Triangulation* mTIN; 00060 }; 00061 00062 inline TriDecorator::TriDecorator(): mTIN( 0 ) 00063 { 00064 00065 } 00066 00067 inline TriDecorator::TriDecorator( Triangulation* t ): mTIN( t ) 00068 { 00069 00070 } 00071 00072 inline TriDecorator::~TriDecorator() 00073 { 00074 00075 } 00076 00077 inline void TriDecorator::addTriangulation( Triangulation* t ) 00078 { 00079 mTIN = t; 00080 } 00081 00082 #endif 00083