gre/3dgmelem.h

Go to the documentation of this file.
00001 /*** 
00002  * \file 3dgmelem.h <gre/3dgmelem.h>
00003  * \brief Geometrical elements
00004  *
00005  * \if NODOC
00006  * $Id: 3dgmelem.h_v 1.15 2006/09/20 14:50:35 scowan Exp $
00007  *
00008  * $Log: 3dgmelem.h_v $
00009  * Revision 1.15  2006/09/20 14:50:35  scowan
00010  * Thinned out unneeded include files and changed style patterns to current.
00011  *
00012  * Revision 1.14  2005/11/11 21:39:00  vdronov
00013  * *** empty log message ***
00014  *
00015  * Revision 1.13  2005/10/14 21:31:54  mju
00016  * Fix guard name.
00017  *
00018  * Revision 1.12  2005/10/05 15:41:17  mju
00019  * Fix unref parm warning.
00020  *
00021  * Revision 1.11  2005/09/12 18:34:19  vdronov
00022  * added labels rendering
00023  *
00024  * Revision 1.10  2005/08/22 20:42:15  vdronov
00025  * text rendering in 3d
00026  *
00027  * Revision 1.9  2005/07/22 21:49:16  vdronov
00028  * added bitmap pattern rendering
00029  *
00030  * Revision 1.8  2005/06/02 19:19:48  vdronov
00031  * *** empty log message ***
00032  *
00033  * Revision 1.7  2005/05/20 21:53:28  vdronov
00034  * *** empty log message ***
00035  *
00036  * Revision 1.6  2005/05/05 21:09:52  vdronov
00037  * finished symbolpattern
00038  *
00039  * Revision 1.5  2005/04/29 22:08:34  vdronov
00040  * *** empty log message ***
00041  *
00042  * Revision 1.4  2005/04/15 15:07:23  vdronov
00043  * added 3d line rendering
00044  *
00045  * Revision 1.3  2005/04/08 19:09:31  vdronov
00046  * *** empty log message ***
00047  *
00048  * Revision 1.2  2005/03/10 21:42:44  vdronov
00049  * *** empty log message ***
00050  *
00051  * Revision 1.1  2005/02/17 18:01:16  vdronov
00052  * Initial revision
00053  *
00054  *
00055  * \endif
00056  */ 
00057 
00058 #ifndef  INC_GRE_3DGMELEM_H
00059 #define  INC_GRE_3DGMELEM_H
00060 
00061 #ifndef  INC_MI32_BITSET_H
00062 #include <mi32/bitset.h>
00063 #endif
00064 
00065 #ifndef  INC_MI32_SIMPLEAR_H
00066 #include <mi32/simplear.h>
00067 #endif
00068 
00069 #ifndef  INC_MI32_MG2ENUMS_H
00070 #include <mi32/mg2enums.h>
00071 #endif
00072 
00073 #ifndef  INC_MI32_POLYLINE_H
00074 #include <mi32/polyline.h>
00075 #endif
00076 
00077 #ifndef  INC_GRE_3DUTILS_H
00078 #include <gre/3dutils.h>
00079 #endif
00080 
00081 #ifndef  INC_GRE_3DSCENE_H
00082 #include <gre/3dscene.h>
00083 #endif
00084 
00085 #ifndef  INC_GRE_3DPNTFLD_H
00086 #include <gre/3dpntfld.h>
00087 #endif
00088 
00089 #ifndef  INC_MI32_TRIANGUL_H
00090 #include <mi32/triangul.h>
00091 #endif
00092 
00093 #ifndef  INC_RVC_VECTOR_H
00094 #include <rvc/vector.h>
00095 #endif
00096 
00097 #ifndef GENERATING_DOXYGEN_OUTPUT
00098 class REGION2D;
00099 class SUBREGION2D;
00100 #endif // GENERATING_DOXYGEN_OUTPUT
00101 
00102 namespace RVC {
00103 #ifndef GENERATING_DOXYGEN_OUTPUT
00104 class STYLE;
00105 class STYLEPATTERN_BITMAP;
00106 class STYLEPATTERN_HATCH;
00107 class STYLEPATTERN_LINE;
00108 class STYLEPATTERN_SYMBOL;
00109 #endif // GENERATING_DOXYGEN_OUTPUT
00110 }
00111 
00112 namespace GRE {
00113 
00114 #ifndef GENERATING_DOXYGEN_OUTPUT
00115 struct TRIANGULATION;
00116 class  TERRAIN;
00117 #endif // GENERATING_DOXYGEN_OUTPUT
00118 
00119 class GEOMETRIC3D_BUILDER {
00120 public:
00121 
00122    enum ELEMMODE {
00123       ELEMMODE_Standard,
00124       ELEMMODE_Highlighted,
00125       ELEMMODE_Active
00126       };
00127 
00128    ERRVALUE DrawPoint2D (
00129       const DPOINT2D& point, 
00130       const POINTSTYLE& style
00131       );
00132 
00133    ERRVALUE DrawLabel2D (
00134       const RVC::VECTOR::LABEL& label, 
00135       const LABELSTYLE& style
00136       );
00137 
00138    ERRVALUE DrawPoint3D (
00139       const DPOINT3D& point, 
00140       const POINTSTYLE& style
00141       );
00142 
00143    ERRVALUE DrawLine2D (
00144       const POLYLINE& polyline, 
00145       const LINESTYLE& style,
00146       const RVC::STYLEPATTERN_LINE& pattern
00147       );
00148 
00149    ERRVALUE DrawLine3D (
00150       const POLYLINE& polyline, 
00151       const LINESTYLE& style
00152       );
00153 
00154    ERRVALUE DrawRectangle2D (
00155       const DRECT2D& rect, 
00156       const LINESTYLE& style,
00157       const RVC::STYLEPATTERN_LINE& pattern
00158       );
00159 
00160    ERRVALUE DrawCircle2D (
00161       const DPOINT2D& center, 
00162       const double radius, 
00163       const LINESTYLE& style,
00164       const RVC::STYLEPATTERN_LINE& pattern
00165       );
00166 
00167    ERRVALUE DrawPolygon2D (
00168       const POLYLINE& polyline, 
00169       const POLYSTYLE& style//,
00170       //const RVC::STYLEPATTERN_LINE& pattern
00171       );
00172 
00173    ERRVALUE DrawSubRegion2D (
00174       const SUBREGION2D& subregion, 
00175       const POLYSTYLE& style//,
00176       //const RVC::STYLEPATTERN_LINE& pattern
00177       );
00178 
00179    ERRVALUE DrawRegion2D (
00180       const REGION2D& region, 
00181       const POLYSTYLE& style//,
00182       //const RVC::STYLEPATTERN_LINE& pattern
00183       );
00184 
00185    ERRVALUE FillPoint2D (
00186       const DPOINT2D& point, 
00187       const POINTSTYLE& style,
00188       const RVC::STYLEPATTERN_SYMBOL& pattern
00189       );
00190 
00191    ERRVALUE FillLabel2D (
00192       const RVC::VECTOR::LABEL& label, 
00193       const LABELSTYLE& style,
00194       const RVC::STYLE& styleobj
00195       );
00196 
00197    ERRVALUE FillPoint3D (
00198       const DPOINT3D& point, 
00199       const POINTSTYLE& style
00200       );
00201 
00202    ERRVALUE FillLine2D (
00203       const POLYLINE& polyline, 
00204       const LINESTYLE& style,
00205       const RVC::STYLEPATTERN_LINE& pattern,
00206       const MGD::LINECAP linecap = MGD::LINECAP_Butt
00207       );
00208 
00209    ERRVALUE FillLine3D (
00210       const POLYLINE& polyline, 
00211       const LINESTYLE& style
00212       );
00213 
00214    ERRVALUE FillRectangle2D (
00215       const DRECT2D& rect, 
00216       const POLYSTYLE& style,
00217       const RVC::STYLE& styleobj
00218       );
00219 
00220    ERRVALUE FillCircle2D (
00221       const DPOINT2D& center, 
00222       const double radius, 
00223       const POLYSTYLE& style,
00224       const RVC::STYLE& styleobj
00225       );
00226 
00227    ERRVALUE FillPolygon2D (
00228       const POLYLINE& polyline, 
00229       const POLYSTYLE& style,
00230       const RVC::STYLE& styleobj
00231       );
00232 
00233    ERRVALUE FillSubRegion2D (
00234       const SUBREGION2D& subregion, 
00235       const POLYSTYLE& style,
00236       const RVC::STYLE& styleobj
00237       );
00238 
00239    ERRVALUE FillRegion2D (
00240       const REGION2D& region, 
00241       const POLYSTYLE& style,
00242       const RVC::STYLE& styleobj
00243       );
00244 
00245    double GetFactor (
00246       ) { return m_SF; };
00247 
00248 
00249 // MGD::DEVICE& GetDevice () { return m_Device; };
00250 
00251    ERRVALUE Init (
00252       GRE::SCENE3D* scene, 
00253       GRE::TERRAIN* terrain,
00254       const double s2d
00255       );
00256 
00257    void Clear (
00258       ) {
00259       m_Scene = 0; 
00260       m_Terrain = 0;
00261       };
00262 
00263    void SetHighlightedColor (
00264       const COLOR color
00265       ) { m_HighlightedColor = color; return; };
00266 
00267    void SetActiveColor (
00268       const COLOR color
00269       ) { m_ActiveColor = color; return; };
00270 
00271    void SetElementsMode (
00272       const ELEMMODE mode
00273       ) { m_ElementsMode = mode; return; };
00274 
00275 protected:
00276 
00277    GEOMETRIC3D_BUILDER () {};
00278    virtual ~GEOMETRIC3D_BUILDER () {};
00279 
00280 private:
00281 
00282    static bool Intersect (
00283       const FPOINT2D& ps,
00284       const FPOINT2D& pe,
00285       const FPOINT2D& qs,
00286       const FPOINT2D& qe,
00287       FPOINT2D& p
00288       );
00289 
00290 // class BUILDER_DEVICE : public MGD::DEVICE {
00291 // public:
00292 // private:
00293 //    };
00294 
00295    static const INT32 s_IcosahedronNumVertices = 12;
00296    static const INT32 s_IcosahedronNumTriangles = 20;
00297    static const float s_IcosahedronTriangleArea;
00298 
00299    static const FPOINT3D s_IcosahedronVertices[12];
00300    static const GRE::TRIANGLEINDEX s_IcosahedronTriangles[20];
00301 
00302    static const double s_FScale;
00303    static const double s_FXOffset;
00304    static const double s_FYOffset;
00305 
00306    GRE::SCENE3D* m_Scene; 
00307    GRE::TERRAIN* m_Terrain;
00308    DPOINT3D m_Direction;
00309    DPOINT3D m_Viewer;
00310    ELEMMODE m_ElementsMode;
00311    COLOR m_HighlightedColor;
00312    COLOR m_ActiveColor;
00313    FPOINT3D m_SunDirection;
00314 
00315    SIMPLE_ARRAY<FPOINT3D> m_Points;
00316    POLYLINE m_Polyline;
00317    POLYLINE m_PolylineE;
00318    SIMPLE_ARRAY<double> m_Offset;
00319    GRE::TRIANGULATION m_Triangulation;
00320    GRE::PIXALIZATION m_Pixalization;
00321    TRIANGULATOR2D m_Triangulator;
00322    SIMPLE_ARRAY<DTRIANGLE2D> m_Triangles;
00323 // BUILDER_DEVICE m_Device;
00324 
00325    double m_S2D;
00326    double m_S3D;
00327    double m_SF;
00328 
00329    virtual void OnConstruction (
00330       GRE::TRIANGULATION& triangulation
00331       ) = 0;
00332 
00333    virtual void OnConstruction (
00334       GRE::PIXALIZATION& pixalization
00335       ) = 0;
00336 
00337    ERRVALUE DrawSegment2D (
00338       const FPOINT2D& pt1,
00339       const FPOINT2D& pt2,
00340       const COLOR& color
00341       );
00342 
00343    ERRVALUE OutlinePolygon2D (
00344       const POLYLINE& polyline, 
00345       const float thickness,
00346       const COLOR& color,
00347       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round
00348       );
00349 
00350    ERRVALUE OutlineSubRegion2D (
00351       const SUBREGION2D& subregion, 
00352       const float thickness,
00353       const COLOR& color,
00354       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round
00355       );
00356 
00357    ERRVALUE OutlineRegion2D (
00358       const REGION2D& region, 
00359       const float thickness,
00360       const COLOR& color,
00361       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round
00362       );
00363 
00364    ERRVALUE FillPoint2DBuildIn (
00365       const DPOINT2D& point, 
00366       const POINTSTYLE& style
00367       );
00368 
00369    ERRVALUE FillPoint2DUseSymbol (
00370       const DPOINT2D& point, 
00371       const POINTSTYLE& style,
00372       const RVC::STYLEPATTERN_SYMBOL& pattern
00373       );
00374 
00375    ERRVALUE FillPoint3DBuildIn (
00376       const DPOINT3D& point, 
00377       const POINTSTYLE& style
00378       );
00379 
00380    ERRVALUE FillPoint3DUseSymbol (
00381       const DPOINT3D& point, 
00382       const POINTSTYLE& style
00383       );
00384 
00385    ERRVALUE FillLine2DSolid (
00386       const POLYLINE& polyline, 
00387       const LINESTYLE& style,
00388       const MGD::LINECAP linecap = MGD::LINECAP_Round
00389       );
00390 
00391    ERRVALUE FillLine2DSolid (
00392       const POLYLINE& polyline, 
00393       const float thickness,
00394       const COLOR& color,
00395       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round,
00396       const MGD::LINECAP linecap = MGD::LINECAP_Round
00397       );
00398 
00399 
00400    ERRVALUE FillLine2DUsePattern (
00401       const POLYLINE& polyline, 
00402       const LINESTYLE& style,
00403       const RVC::STYLEPATTERN_LINE& pattern
00404       );
00405 
00406    ERRVALUE FillLine3DSolid (
00407       const POLYLINE& polyline, 
00408       const LINESTYLE& style
00409       );
00410 
00411    ERRVALUE FillLine3DUsePattern (
00412       const POLYLINE& polyline, 
00413       const LINESTYLE& style
00414       );
00415 
00416    ERRVALUE FillTriangle2D (
00417       const FPOINT2D& pt1,
00418       const FPOINT2D& pt2,
00419       const FPOINT2D& pt3,
00420       const COLOR& color
00421       );
00422 
00423    ERRVALUE GRE::GEOMETRIC3D_BUILDER::FillTriangle2D (
00424       const FPOINT2D& pt1,
00425       const FPOINT2D& pt2,
00426       const FPOINT2D& pt3,
00427       const COLOR& color,
00428       const RVC::STYLEPATTERN_BITMAP& pattern
00429       );
00430 
00431    ERRVALUE FillRectangle2D (
00432       const DRECT2D& rectangle,
00433       const COLOR& color
00434       );
00435 
00436    ERRVALUE FillTriangle3D (
00437       const FPOINT3D& pt1,
00438       const FPOINT3D& pt2,
00439       const FPOINT3D& pt3,
00440       const COLOR& color
00441       );
00442 
00443    ERRVALUE DrawCircle2D (
00444       const FPOINT2D& point,
00445       const float radius,
00446       const float thickness,
00447       const COLOR& color
00448       );
00449 
00450    ERRVALUE DrawArc2D (
00451       const FPOINT2D& point,
00452       const float radius,
00453       const float thickness,
00454       const float start,
00455       const float sweep,
00456       const COLOR& color,
00457       const MGD::SHAPECLOSE shapeclose = MGD::SHAPECLOSE_None
00458       );
00459 
00460    ERRVALUE DrawEllipse2D (
00461       const FPOINT2D& point,
00462       const float x,
00463       const float y,
00464       const float thickness,
00465       const float rotation,
00466       const COLOR& color
00467       );
00468 
00469    ERRVALUE FillCircle2D (
00470       const FPOINT2D& point,
00471       const float radius,
00472       const COLOR& color
00473       );
00474 
00475    ERRVALUE FillArcWedge2D (
00476       const FPOINT2D& point,
00477       const float radius,
00478       const float start,
00479       const float sweep,
00480       const COLOR& color
00481       );
00482 
00483    ERRVALUE FillArcChord2D (
00484       const FPOINT2D& point,
00485       const float radius,
00486       const float start,
00487       const float sweep,
00488       const COLOR& color
00489       );
00490 
00491    ERRVALUE FillArcChord(
00492       const FPOINT2D& point1,
00493       const FPOINT2D& point2,
00494       const FPOINT2D& center,
00495       const float radius,
00496       const COLOR& color
00497       );
00498 
00499    ERRVALUE FillEllipse2D (
00500       const FPOINT2D& point,
00501       const float x,
00502       const float y,
00503       const float rotation,
00504       const COLOR& color
00505       );
00506 
00507    ERRVALUE FillSphericalTriangle3D (
00508       const FPOINT3D& center,
00509       const float radius,
00510       const INT32 depth,
00511       const FPOINT3D& pt1,
00512       const FPOINT3D& pt2,
00513       const FPOINT3D& pt3,
00514       const COLOR& color
00515       );
00516 
00517    ERRVALUE FillSphere3D (
00518       const FPOINT3D& center,
00519       const float radius,
00520       const COLOR& color
00521       );
00522 
00523    ERRVALUE FillCube3D (
00524       const FPOINT3D& center,
00525       const float x,
00526       const float y,
00527       const float z,
00528       const COLOR& color
00529       );
00530 
00531    ERRVALUE FillCylindricalRectangle3D (
00532       const FPOINT3D& scenter,
00533       const float sradius,
00534       const FPOINT3D& ecenter,
00535       const float eradius,
00536       const FPOINT3D& n1,
00537       const FPOINT3D& n2,
00538       const INT32 depth,
00539       const COLOR& color
00540       );
00541 
00542    ERRVALUE FillCylinder3D (
00543       const FPOINT3D& scenter,
00544       const float sradius,
00545       const FPOINT3D& ecenter,
00546       const float eradius,
00547       const COLOR& color
00548       );
00549 
00550    ERRVALUE FillTriangles2DSolid (
00551       const SIMPLE_ARRAY<DTRIANGLE2D>& triangles,
00552       const COLOR& color
00553       );
00554 
00555    ERRVALUE FillTriangles2DUseBitmap (
00556       const SIMPLE_ARRAY<DTRIANGLE2D>& triangles,
00557       const POLYSTYLE& style,
00558       const RVC::STYLEPATTERN_BITMAP& pattern
00559       );
00560 
00561    DRECT2D ComputeExtents (
00562       const SIMPLE_ARRAY<DTRIANGLE2D>& triangles
00563       );
00564 
00565    ERRVALUE FillRectangle2DUseHatch (
00566       const DRECT2D& extents,
00567       const POLYSTYLE& style,
00568       const RVC::STYLEPATTERN_HATCH& pattern
00569       );
00570 
00571    ERRVALUE FillBorder2DSolid (
00572       const POLYLINE& polyline, 
00573       const POLYSTYLE& style
00574       );
00575 
00576    ERRVALUE FillBorder2DSolid (
00577       const POLYLINE& polyline, 
00578       const float thickness,
00579       const COLOR& color,
00580       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round
00581       );
00582 
00583    ERRVALUE FillBorder2DUsePattern (
00584       const POLYLINE& polyline, 
00585       const POLYSTYLE& style,
00586       const RVC::STYLEPATTERN_LINE& pattern
00587       );
00588 
00589    ERRVALUE FillPolygon2D (
00590       const POLYLINE& polyline, 
00591       const bool fill,
00592       const float thickness,
00593       const COLOR& color,
00594       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round
00595       );
00596 
00597    ERRVALUE FillSubRegion2D (
00598       const SUBREGION2D& subregion, 
00599       const bool fill,
00600       const float thickness,
00601       const COLOR& color,
00602       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round
00603       );
00604 
00605    ERRVALUE FillRegion2D (
00606       const REGION2D& region, 
00607       const bool fill,
00608       const float thickness,
00609       const COLOR& color,
00610       const MGD::LINEJOIN linejoin = MGD::LINEJOIN_Round
00611       );
00612 
00613    void ApplyAffineForward (
00614       const TRANS2D_AFFINE& affine, 
00615       FPOINT2D& point
00616       );
00617 
00618    void ApplyAffineInverse (
00619       const TRANS2D_AFFINE& affine, 
00620       FPOINT2D& point
00621       );
00622 
00623    void SetMask (
00624       const SIMPLE_ARRAY<DTRIANGLE2D> triangles,
00625       GRE::POINTSFIELD& PointsField
00626       );
00627 
00628    void ClearMask (
00629       GRE::POINTSFIELD& PointsField
00630       );
00631 
00632    ERRVALUE DrawPixels (
00633       SIMPLE_ARRAY<FPOINT3D>& points,
00634       const COLOR& color
00635       );
00636 
00637    ERRVALUE GRE::GEOMETRIC3D_BUILDER::DrawPixels (
00638       SIMPLE_ARRAY<FPOINT3D>& points,
00639       const COLOR& color,
00640       const RVC::STYLEPATTERN_BITMAP& pattern
00641       );
00642 
00643    ERRVALUE GRE::GEOMETRIC3D_BUILDER::DrawTriangle3D (
00644       const FPOINT3D& pt1,
00645       const FPOINT3D& pt2,
00646       const FPOINT3D& pt3,
00647       const COLOR& color
00648       );
00649 
00650    ERRVALUE ConstructScales ();
00651    double GetElevation( const double x, const double y);
00652 
00653    };
00654 
00655 
00656 //! GEOMETRIC3D_ELEMENTS class describes base container class of geometric elements
00657 class GEOMETRIC3D_ELEMENTS {
00658 
00659 public:
00660 
00661    class ITERATOR_BASE {
00662    public:
00663 
00664       virtual ~ITERATOR_BASE (
00665          ) {};
00666 
00667       // Dereference operator
00668       virtual INT32 operator* (
00669          ) const = 0;
00670    
00671       // Pre-increment operator.
00672       virtual ITERATOR_BASE* operator++ (
00673          ) = 0;
00674 
00675       // Equality operator.
00676       virtual bool operator== (
00677          const ITERATOR_BASE* rhs
00678          ) const = 0;
00679 
00680       // Inequality operator.
00681       virtual bool operator!= (
00682          const ITERATOR_BASE* rhs
00683          ) const = 0;
00684 
00685    protected:
00686 
00687       ITERATOR_BASE () {};
00688 
00689       };
00690 
00691 
00692    class BITSET_ITERATOR_BASE : public ITERATOR_BASE {
00693    public:
00694 
00695       ~BITSET_ITERATOR_BASE () {};
00696 
00697       void Begin();
00698 
00699       void End();
00700 
00701       INT32 operator* () const;
00702    
00703       GRE::GEOMETRIC3D_ELEMENTS::ITERATOR_BASE* operator++ ();
00704 
00705       bool operator== (
00706          const GRE::GEOMETRIC3D_ELEMENTS::ITERATOR_BASE* rhs
00707          ) const;
00708 
00709       bool operator!= (
00710          const GRE::GEOMETRIC3D_ELEMENTS::ITERATOR_BASE* rhs
00711          ) const;
00712    
00713    protected:
00714 
00715       BITSET_ITERATOR_BASE (const bool selected) : m_Selected(selected) { End(); };
00716 
00717    private:
00718 
00719       const bool m_Selected;
00720       BITSET m_Bitset;
00721       BITSET::ITERATOR m_Iterator;
00722 
00723       BITSET_ITERATOR_BASE ();
00724 
00725       virtual ERRVALUE ComputeSelectedElements (BITSET& bitset) = 0;
00726       virtual ERRVALUE ComputeHighlightedElements (BITSET& bitset) = 0;
00727 
00728       };
00729 
00730    class ITERATOR;
00731    friend class ITERATOR;
00732 
00733    class ITERATOR {
00734       public:
00735 
00736          ITERATOR () : m_Base(0) {};
00737          ~ITERATOR () {};
00738 
00739          // Dereference operator
00740          INT32 operator* (
00741             ) const {return m_Base->operator*();};
00742    
00743          // Pre-increment operator.
00744          ITERATOR& operator++ (
00745             ) {m_Base->operator++(); return *this; }
00746 
00747          // Equality operator.
00748          bool operator== (
00749             const ITERATOR& rhs
00750             ) const { return m_Base->operator==(rhs.m_Base); };
00751 
00752          // Inequality operator.
00753          bool operator!= (
00754             const ITERATOR& rhs
00755             ) const { return m_Base->operator!=(rhs.m_Base); };
00756 
00757       private:
00758 
00759          ITERATOR_BASE *m_Base;
00760 
00761          ITERATOR (ITERATOR_BASE* base) : m_Base(base) {};
00762 
00763          friend class GEOMETRIC3D_ELEMENTS;
00764          };
00765 
00766    GEOMETRIC3D_ELEMENTS (                          //! Constructor 
00767       ) {};
00768 
00769    virtual ~GEOMETRIC3D_ELEMENTS (                    //! Destructor 
00770       ) {};
00771 
00772    //!   Is terrain needed for geometric construction 
00773    //!
00774    //! @return true id needed or false if not
00775    bool IsTerrainNeeded (
00776       ) { return v_IsTerrainNeeded(); };
00777 
00778    //!   Is points field needed for geometric construction 
00779    //!
00780    //! @return true id needed or false if not
00781    bool IsPointsFieldNeeded (
00782       ) { return v_IsPointsFieldNeeded(); };
00783 
00784    void ConstructWireframe (
00785       const INT32 id,
00786       GEOMETRIC3D_BUILDER* builder
00787       ) { v_ConstructWireframe(id, builder); return; };
00788 
00789    void ConstructSolid (
00790       const INT32 id,
00791       GEOMETRIC3D_BUILDER* builder
00792       ) { v_ConstructSolid(id, builder); return; };
00793 
00794    void OnConstructionBegin (
00795       const bool wireframe
00796       ) { v_OnConstructionBegin(wireframe); return; };
00797 
00798    void OnConstructionEnd (
00799       ) { v_OnConstructionEnd(); return; };
00800 
00801    ITERATOR BeginSelected (
00802       ) { return ITERATOR(GetSelectedBase(true)); };
00803 
00804    ITERATOR EndSelected (
00805       ) { return ITERATOR(GetSelectedBase(false)); }; 
00806 
00807    ITERATOR BeginHighlited (
00808       ) { return ITERATOR(GetHighlightedBase(true)); };
00809 
00810    ITERATOR EndHighlited (
00811       ) { return ITERATOR(GetHighlightedBase(false)); }; 
00812 
00813    INT32 GetActiveElement (
00814       ) { return v_GetActiveElement(); };
00815 
00816    INT32 GetNumSelectedElements (
00817       ) { return v_GetNumSelectedElements(); };
00818 
00819    INT32 GetNumHighlightedElements (
00820       ) { return v_GetNumHighlightedElements(); };
00821 
00822 private:
00823 
00824    #ifndef GENERATING_DOXYGEN_OUTPUT
00825 
00826    virtual ITERATOR_BASE* GetSelectedBase (const bool begin) = 0;
00827    virtual ITERATOR_BASE* GetHighlightedBase (const bool begin) = 0;
00828    virtual INT32 v_GetActiveElement () = 0;
00829    virtual INT32 v_GetNumSelectedElements () = 0;
00830    virtual INT32 v_GetNumHighlightedElements () = 0;
00831    virtual void v_ConstructWireframe (const INT32 id, GEOMETRIC3D_BUILDER* builder) = 0;
00832    virtual void v_ConstructSolid (const INT32 id, GEOMETRIC3D_BUILDER* builder) = 0;
00833    virtual void v_OnConstructionBegin (const bool /*wireframe*/) { return; };
00834    virtual void v_OnConstructionEnd () { return; };
00835    virtual bool v_IsTerrainNeeded () = 0;
00836    virtual bool v_IsPointsFieldNeeded () = 0;
00837 
00838 
00839    #endif //!< GENERATING_DOXYGEN_OUTPUT
00840    };
00841 
00842 typedef SIMPLE_ARRAY<GEOMETRIC3D_ELEMENTS*> GEOMETRIC3D_ELEMENTS_ARRAY;
00843 
00844 }     // End of GRE namespace
00845 
00846 #endif
00847 

Generated on Thu Apr 26 04:03:28 2007 for TNTsdk by  doxygen 1.5.2