trianglePoint.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: trianglePoint.h,v 1.12.18.1 2007/03/25 21:25:33 oliver Exp $
00005 //
00006 
00007 #ifndef BALL_STRUCTURE_TRIANGLEPOINT_H
00008 #define BALL_STRUCTURE_TRIANGLEPOINT_H
00009 
00010 #ifndef BALL_MATHS_VECTOR3_H
00011 # include <BALL/MATHS/vector3.h>
00012 #endif
00013 
00014 #ifndef BALL_STRUCTURE_GRAPHEDGE_H
00015 # include <BALL/STRUCTURE/graphEdge.h>
00016 #endif
00017 
00018 #ifndef BALL_STRUCTURE_GRAPHFACE_H
00019 # include <BALL/STRUCTURE/graphFace.h>
00020 #endif
00021 
00022 #ifndef BALL_STRUCTURE_GRAPHVERTEX_H
00023 # include <BALL/STRUCTURE/graphVertex.h>
00024 #endif
00025 
00026 
00027 namespace BALL
00028 {
00029 
00030   class TriangleEdge;
00031   class Triangle;
00032   class TriangulatedSurface;
00033   class TriangulatedSphere;
00034   class TriangulatedSES;
00035   class SESTriangulator;
00036   class TriangulatedSAS;
00037   class SASTriangulator;
00038 
00039 
00043   class BALL_EXPORT TrianglePoint
00044       : public GraphVertex< TrianglePoint,TriangleEdge,Triangle >
00045   {
00046     
00047     public:
00048 
00061     friend class Triangle;
00062     friend class TriangleEdge;
00063     friend class TriangulatedSurface;
00064     friend class TriangulatedSphere;
00065     friend class TriangulatedSES;
00066     friend class SESTriangulator;
00067     friend class TriangulatedSAS;
00068     friend class SASTriangulator;
00069 
00070     BALL_CREATE(TrianglePoint)
00071 
00072     
00075 
00079     TrianglePoint()
00080       ;
00081 
00086     TrianglePoint(const TVector3<double>& point, const TVector3<double>& normal = TVector3<double>(0.));
00087 
00095     TrianglePoint(const TrianglePoint& point, bool deep = false)
00096       ;
00097 
00101     virtual ~TrianglePoint()
00102       ;
00103 
00105 
00108 
00116     void set(const TrianglePoint& point, bool deep = false)
00117       ;
00118 
00124     TrianglePoint& operator = (const TrianglePoint& point)
00125       ;
00126 
00128 
00131 
00134     TVector3<double> getPoint() const
00135       ;
00136 
00139     void setPoint(const TVector3<double>& point)
00140       ;
00141 
00144     TVector3<double> getNormal() const
00145       ;
00146 
00149     void setNormal(const TVector3<double>& normal)
00150       throw(Exception::DivisionByZero);
00151 
00153 
00157 
00162     virtual bool operator == (const TrianglePoint& point) const
00163       ;
00164 
00169     virtual bool operator != (const TrianglePoint& point) const
00170       ;
00171 
00176     virtual bool operator *= (const TrianglePoint& point) const
00177       ;
00178 
00180 
00181     protected:
00182 
00183     /*_ The point itself
00184     */
00185     TVector3<double> point_;
00186     /*_ The normal vector of the point
00187     */
00188     TVector3<double> normal_;
00189 
00190   };
00191 
00192 
00196 
00199   BALL_EXPORT std::ostream& operator << (std::ostream& s, const TrianglePoint& point);
00200 
00202 
00203 
00204 } // namespace BALL
00205 
00206 
00207 #endif  // BALL_STRUCTURE_TRIANGLEPOINT_H