|
Quantum GIS API Documentation
master-ce49b66
|
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; 00040 bool getTriangle( double x, double y, Point3D* p1, int* n1, Point3D* p2, int* n2, Point3D* p3, int* n3 ); 00041 bool getTriangle( double x, double y, Point3D* p1, Point3D* p2, Point3D* p3 ); 00042 virtual int getOppositePoint( int p1, int p2 ); 00043 virtual QList<int>* getSurroundingTriangles( int pointno ); 00044 virtual double getXMax() const; 00045 virtual double getXMin() const; 00046 virtual double getYMax() const; 00047 virtual double getYMin() const; 00048 virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ); 00049 virtual void setEdgeColor( int r, int g, int b ); 00050 virtual void setForcedEdgeColor( int r, int g, int b ); 00051 virtual void setBreakEdgeColor( int r, int g, int b ); 00052 virtual void setTriangleInterpolator( TriangleInterpolator* interpolator ); 00053 virtual void eliminateHorizontalTriangles(); 00054 virtual void ruppertRefinement(); 00055 virtual bool pointInside( double x, double y ); 00056 virtual bool swapEdge( double x, double y ); 00057 virtual QList<int>* getPointsAroundEdge( double x, double y ); 00058 protected: 00060 Triangulation* mTIN; 00061 }; 00062 00063 inline TriDecorator::TriDecorator(): mTIN( 0 ) 00064 { 00065 00066 } 00067 00068 inline TriDecorator::TriDecorator( Triangulation* t ): mTIN( t ) 00069 { 00070 00071 } 00072 00073 inline TriDecorator::~TriDecorator() 00074 { 00075 00076 } 00077 00078 inline void TriDecorator::addTriangulation( Triangulation* t ) 00079 { 00080 mTIN = t; 00081 } 00082 00083 #endif 00084