DGtal  1.3.beta
Display3D.h
1 
17 #pragma once
18 
31 #if defined(Display3D_RECURSES)
32 #error Recursive header files inclusion detected in Display3D.h
33 #else // defined(Display3D_RECURSES)
34 
35 #define Display3D_RECURSES
36 
37 #if !defined Display3D_h
38 
39 #define Display3D_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <vector>
45 #include <algorithm>
46 #include <map>
47 #include "DGtal/kernel/domains/CDomain.h"
48 #include "DGtal/base/Common.h"
49 #include "DGtal/base/CountedPtr.h"
50 #include "DGtal/io/Color.h"
51 #include "DGtal/images/CImage.h"
52 #include "DGtal/images/CConstImage.h"
53 #include "DGtal/shapes/Mesh.h"
54 
56 #include "DGtal/topology/CanonicCellEmbedder.h"
57 #include "DGtal/topology/CanonicSCellEmbedder.h"
58 #include "DGtal/kernel/CanonicEmbedder.h"
59 #include "DGtal/helpers/StdDefs.h"
60 #include "DGtal/io/DrawWithDisplay3DModifier.h"
61 #include "DGtal/kernel/CSpace.h"
62 
63 
65 
66 
67 namespace DGtal
68 {
69 
71  // class Display3D
91  template < typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
92  class Display3D
93  {
94  public:
95 
96  BOOST_CONCEPT_ASSERT((concepts::CSpace<Space>));
97  public:
98 
101  typedef typename Space::RealPoint RealPoint;
103  typedef typename Space::RealVector RealVector;
107 
109  typedef int (*SelectCallbackFct)( void* viewer, DGtal::int32_t name, void* data );
110 
111  protected:
112 
118  SelectCallbackFctStore( SelectCallbackFct _fct,
119  void* _data,
120  DGtal::int32_t _min, DGtal::int32_t _max )
121  : fct( _fct ), data( _data ), min( _min ), max( _max ) {}
122  bool operator<( const SelectCallbackFctStore& other ) const
123  {
124  return ( min < other.min ); // simple since there is no overlap.
125  }
126  bool isSelected( DGtal::int32_t name ) const
127  { return ( min <= name ) && ( name <= max ); }
128 
129  SelectCallbackFct fct;
130  void* data;
133  };
134 
138  struct CommonD3D {
141 
142  protected:
143  ~CommonD3D() = default;
144  };
145 
149  struct LineD3D : public CommonD3D {
152  double width;
153  bool isSigned;
154  bool signPos;
155  };
156 
160  struct CubeD3D : public CommonD3D {
164  double width;
165  };
166 
173  struct ClippingPlaneD3D : public CommonD3D {
174  double a,b,c,d;
175  };
176 
177 
185  struct QuadD3D : public CommonD3D {
190  double nx, ny, nz;
191  };
192 
193 
194 
200  struct TriangleD3D : public CommonD3D {
204  double nx, ny, nz;
205  };
206 
207 
208  public:
209 
210 
211 
215  //have to be public because of external functions
216  struct BallD3D : public CommonD3D
217  {
219  const double & operator[]( unsigned int i ) const
220  {
221  assert(i<3);
222  return center[i];
223  };
224  double & operator[]( unsigned int i )
225  {
226  assert(i<3);
227  return center[i];
228  };
230  bool isSigned;
231  bool signPos;
232  double radius;
233  unsigned int resolution;
234  };
235 
236 
241  struct PolygonD3D : public CommonD3D
242  {
243  std::vector<RealPoint> vertices;
244  double nx, ny, nz;
246  };
247 
248 
250 
251 
252  public:
254  typedef std::map<DGtal::int32_t, std::vector< QuadD3D > > QuadsMap;
255 
257  typedef std::map<DGtal::int32_t, std::vector< CubeD3D > > CubesMap;
258 
259 
260  protected:
269 
270 
271 
272 
273  //----end of private data
274 
275  // ----------------------- Standard services ------------------------------
276  public:
277 
281  virtual ~Display3D()
282  {
283  delete myEmbedder;
284  delete mySCellEmbedder;
285  delete myCellEmbedder;
286  }
287 
292  Display3D( const KSpace & KSEmb )
293  : myKSpace( KSEmb )
294  , myEmbedder( new Embedder() )
297  , myBoundingPtEmptyTag( true )
298  , myCurrentFillColor( 220, 220, 220 )
299  , myCurrentLineColor( 22, 22, 222, 50 )
300  {
301  }
302 
308  : Display3D( KSpace() )
309  {
310  }
311 
313  Display3D( const Display3D & ) = delete;
314 
316  Display3D( Display3D && ) = delete;
317 
319  Display3D & operator= ( const Display3D & ) = delete;
320 
322  Display3D & operator= ( Display3D && ) = delete;
323 
324  // ----------------------- Interface --------------------------------------
325  public:
326 
328  const Embedder& embedder() const
329  { return *myEmbedder; }
330 
332  const CellEmbedder& cellEmbedder() const
333  { return *myCellEmbedder; }
334 
336  const SCellEmbedder& sCellEmbedder() const
337  { return *mySCellEmbedder; }
338 
340  const KSpace& space() const
341  { return myKSpace; }
342 
347  virtual void setFillColor(DGtal::Color aColor);
348 
353  virtual void setFillTransparency(unsigned char alpha);
354 
355 
360  virtual void setLineColor(DGtal::Color aColor);
361 
362 
368  virtual DGtal::Color getFillColor();
369 
375  virtual DGtal::Color getLineColor();
376 
381  virtual void setKSpace( const KSpace & aKSpace );
382 
383 
388  void setName3d( DGtal::int32_t name = -1 );
389 
393  DGtal::int32_t name3d() const;
394 
406  void setSelectCallback3D( SelectCallbackFct fct, void* data,
407  DGtal::int32_t min_name, DGtal::int32_t max_name );
408 
415  SelectCallbackFct getSelectCallback3D( DGtal::int32_t aName, void*& data ) const;
416 
417  // ----------------------- Graphical directives ----------------------------------
418  public:
419 
420 
432  void addClippingPlane(double a, double b, double c, double d, bool drawPlane);
433 
434 
435 
436 
444  std::string getMode( const std::string & objectName ) const;
445 
451  void createNewLineList(std::string s= "");
452 
453 
459  void createNewBallList(std::string s= "");
460 
461 
469 
470 
477  bool deleteCubeList(const DGtal::int32_t name);
478 
485 
486 
493  bool deleteQuadList(const DGtal::int32_t name);
494 
500  void createNewTriangleList(std::string s= "");
501 
507  void createNewPolygonList(std::string s= "");
508 
509 
521  void addQuad(const RealPoint &p1, const RealPoint &p2,
522  const RealPoint &p3, const RealPoint &p4);
523 
542  void addQuadWithNormal(const RealPoint &p1, const RealPoint &p2,
543  const RealPoint &p3, const RealPoint &p4,
544  const RealPoint &n,
545  const bool enableReorientation,
546  const bool enableDoubleFace = false);
547 
557  void addQuadFromSurfelCenter(const RealPoint &baseQuadCenter,
558  bool xSurfel, bool ySurfel, bool zSurfel);
559 
560 
561 
584  void addQuadFromSurfelCenterWithNormal(const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel,
585  const RealVector &aNormal,
586  const bool enableReorientation,
587  const bool sign,
588  const bool enableDoubleFace = false);
589 
590 
597  void addTriangle(const RealPoint &p1, const RealPoint &p2, const RealPoint &p3);
598 
599 
604  void addPolygon(const std::vector<RealPoint> &vertices);
605 
606 
616  void addLine(const RealPoint &p1, const RealPoint &p2, const double width=0.03);
617 
618 
626  void addCube(const RealPoint &center, double width=1.0);
627 
628 
636  void addBall(const RealPoint &center ,
637  const double radius=0.5,
638  const unsigned int resolution = 30);
639 
640 
641 
655  void addPrism(const RealPoint &baseQuadCenter,
656  bool xSurfel, bool ySurfel, bool zSurfel, double sizeShiftFactor,
657  double sizeFactor=1.0, bool isSigned= false, bool aSign=true);
658 
659 
660 
669  void addBasicSurfel(const RealPoint &baseQuadCenter,
670  bool xSurfel, bool ySurfel, bool zSurfel);
671 
672 
680  void addCone(const RealPoint &p1, const RealPoint &p2,
681  double width=0.08);
682 
683 
690  void addCylinder(const RealPoint &p1, const RealPoint &p2,
691  const double width=0.02);
692 
693 
699  void updateBoundingBox(const RealPoint &point);
700 
701 
702 
703 
710  void exportToMesh(Mesh<RealPoint> & aMesh ) const;
711 
712 
721  template <typename TDrawableWithDisplay3D>
722  Display3D & operator<<( const TDrawableWithDisplay3D & object );
723 
724 
725 
730  void selfDisplay ( std::ostream & out ) const;
731 
732 
737  bool isValid() const;
738 
739 
743  void clear();
744 
745 
746 
752  RealPoint embed(const typename Space::Point & dp) const ;
753 
759  RealPoint embedKS( const typename KSpace::SCell & cell ) const;
760 
761 
767  RealPoint embedKS( const DGtal::TransformedPrism& aTrans ) const;
768 
769 
775  RealPoint embedK( const typename KSpace::Cell & cell ) const;
776 
777  //---end interface
778 
779  // ------------------------- Protected Datas ------------------------------
780  public:
781 
786  typedef std::map< std::string, std::string > ModeMapping;
787 
792  typedef std::map< std::string,CountedPtr<DrawableWithDisplay3D> > StyleMapping;
793 
794 
807 
811  double myBoundingPtUp [3];
813  double myBoundingPtLow [3];
814 
815  protected:
816  //the current fill color of the display
818  //the current line color of the display
820 
824 
827  std::vector< std::vector<LineD3D> > myLineSetList;
828 
831  std::vector< std::vector<BallD3D> > myBallSetList;
832 
835  std::vector< ClippingPlaneD3D > myClippingPlaneList;
836 
839  std::vector< QuadD3D > myPrismList;
840 
846 
848  std::vector<std::vector< TriangleD3D > > myTriangleSetList;
849 
851  std::vector<std::vector<PolygonD3D> > myPolygonSetList;
852 
853 
858 
859 
862  std::vector<std::string> myCubeSetNameList;
863 
866  std::vector<std::string> myLineSetNameList;
867 
870  std::vector<std::string> myBallSetNameList;
873  std::vector<std::string> myClippingPlaneNameList;
874 
877  std::vector<std::string> myPrismNameList;
878 
881  std::vector<std::string> myQuadSetNameList;
882 
885  std::vector<std::string> myTriangleSetNameList;
886 
889  std::vector<std::string> myPolygonSetNameList;
890 
894 
897  std::set<SelectCallbackFctStore> mySelectCallBackFcts;
898 
900 
901  //----end of protected datas
902 
903  // ------------------------- Internals ------------------------------------
904  protected:
905 
912  static void cross (double dst[3], double srcA[3], double srcB[3]);
913 
918  static void normalize (double vec[3]);
919 
920 
921  }; // end of class Display3D
922 
929  template <typename Space , typename KSpace >
930  std::ostream&
931  operator<< ( std::ostream & out, const DGtal::Display3D<Space , KSpace > & object );
932 
933 
934  template <typename Space , typename KSpace >
941  void
942  operator>> ( const Display3D<Space , KSpace > &aDisplay3D,
944 
945 
952  template < typename Space , typename KSpace >
953  void
954  operator>> ( const Display3D< Space , KSpace > &aDisplay3D, std::string aFilename);
955 
956 
957 } // namespace DGtal
958 
959 
961 // Includes inline functions.
962 #include "DGtal/io/Display3D.ih"
963 
964 
965 // //
967 
968 #endif // !defined Display3D_h
969 
970 #undef Display3D_RECURSES
971 #endif // else defined(Display3D_RECURSES)
DGtal::TransformedPrism
class to modify the position and scale to construct better illustration mode.
Definition: DrawWithDisplay3DModifier.h:179
DGtal::Display3D::CubeD3D::center
RealPoint center
The center coordinate of the cube.
Definition: Display3D.h:162
DGtal::CanonicCellEmbedder
Aim: A trivial embedder for signed and unsigned cell, which corresponds to the canonic injection of c...
Definition: CanonicCellEmbedder.h:65
DGtal::Display3D::QuadD3D::point1
RealPoint point1
Definition: Display3D.h:186
DGtal::Display3D::PolygonD3D::nx
double nx
Definition: Display3D.h:244
DGtal::Display3D::PolygonD3D::color
DGtal::Color color
Definition: Display3D.h:245
DGtal::Display3D::SCellEmbedder
CanonicSCellEmbedder< KSpace > SCellEmbedder
Definition: Display3D.h:106
DGtal::Display3D::addQuadFromSurfelCenter
void addQuadFromSurfelCenter(const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel)
DGtal::Display3D::PolygonD3D::ny
double ny
Definition: Display3D.h:244
DGtal::Display3D::operator=
Display3D & operator=(const Display3D &)=delete
Assignment operator. Deleted.
DGtal::Display3D::myPolygonSetList
std::vector< std::vector< PolygonD3D > > myPolygonSetList
Represents all the polygon drawn in the Display3D.
Definition: Display3D.h:851
DGtal::Display3D::QuadD3D::nz
double nz
Definition: Display3D.h:190
DGtal::Display3D::SelectCallbackFctStore
Definition: Display3D.h:117
DGtal::PointVector::Dimension
DGtal::Dimension Dimension
Copy of the dimension type.
Definition: PointVector.h:623
DGtal::Display3D::addNewList
@ addNewList
Definition: Display3D.h:249
DGtal::Display3D::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSpace< Space >))
DGtal::Display3D::LineD3D::point2
RealPoint point2
Definition: Display3D.h:151
DGtal::Display3D::myClippingPlaneList
std::vector< ClippingPlaneD3D > myClippingPlaneList
Definition: Display3D.h:835
DGtal::Display3D::getLineColor
virtual DGtal::Color getLineColor()
DGtal::Display3D
Aim: This semi abstract class defines the stream mechanism to display 3d primitive (like BallVector,...
Definition: Common.h:158
DGtal::Display3D::Display3D
Display3D(const KSpace &KSEmb)
Definition: Display3D.h:292
DGtal::Display3D::getSelectCallback3D
SelectCallbackFct getSelectCallback3D(DGtal::int32_t aName, void *&data) const
DGtal::Display3D::addBall
void addBall(const RealPoint &center, const double radius=0.5, const unsigned int resolution=30)
DGtal::Display3D::addTriangle
void addTriangle(const RealPoint &p1, const RealPoint &p2, const RealPoint &p3)
DGtal::Display3D::normalize
static void normalize(double vec[3])
DGtal::Display3D::CubeD3D
Definition: Display3D.h:160
DGtal::Display3D::cross
static void cross(double dst[3], double srcA[3], double srcB[3])
DGtal::Display3D::isValid
bool isValid() const
DGtal::Display3D< S, KS >::StreamKey
StreamKey
Definition: Display3D.h:249
DGtal::Display3D::createNewBallList
void createNewBallList(std::string s="")
DGtal::Display3D::CommonD3D::~CommonD3D
~CommonD3D()=default
Protected destructor to disallow polymorphism.
DGtal::Color
Structure representing an RGB triple with alpha component.
Definition: Color.h:66
DGtal::Display3D::SelectCallbackFctStore::min
DGtal::int32_t min
Definition: Display3D.h:131
DGtal::Display3D::BallD3D::isSigned
bool isSigned
Definition: Display3D.h:230
DGtal::Display3D::clear
void clear()
DGtal::int32_t
boost::int32_t int32_t
signed 32-bit integer.
Definition: BasicTypes.h:72
DGtal::Display3D::embedKS
RealPoint embedKS(const typename KSpace::SCell &cell) const
DGtal::Display3D::addClippingPlane
void addClippingPlane(double a, double b, double c, double d, bool drawPlane)
DGtal::Display3D::Embedder
CanonicEmbedder< Space > Embedder
Definition: Display3D.h:104
DGtal::Display3D::ClippingPlaneD3D
Definition: Display3D.h:173
DGtal::Display3D::myKSpace
KSpace myKSpace
The Khalimsky space.
Definition: Display3D.h:262
DGtal::Display3D::myCubeSetNameList
std::vector< std::string > myCubeSetNameList
Definition: Display3D.h:862
DGtal::Display3D::deleteQuadList
bool deleteQuadList(const DGtal::int32_t name)
DGtal::Display3D::setFillTransparency
virtual void setFillTransparency(unsigned char alpha)
DGtal::Display3D::updateDisplay
@ updateDisplay
Definition: Display3D.h:249
DGtal::Display3D::LineD3D::width
double width
Definition: Display3D.h:152
DGtal::Display3D::myModes
ModeMapping myModes
Definition: Display3D.h:795
DGtal::Display3D::BallD3D::operator[]
double & operator[](unsigned int i)
Definition: Display3D.h:224
DGtal::Display3D::createNewQuadList
DGtal::int32_t createNewQuadList()
DGtal::Display3D::CellEmbedder
CanonicCellEmbedder< KSpace > CellEmbedder
Definition: Display3D.h:105
DGtal::Display3D::getFillColor
virtual DGtal::Color getFillColor()
DGtal::Display3D::SelectCallbackFctStore::isSelected
bool isSelected(DGtal::int32_t name) const
Definition: Display3D.h:126
DGtal::Display3D::QuadD3D
Definition: Display3D.h:185
DGtal::Display3D::getMode
std::string getMode(const std::string &objectName) const
DGtal::Display3D::myEmbedder
Embedder * myEmbedder
an embeder from a dgtal space point to a real space point
Definition: Display3D.h:264
DGtal::Display3D::myCellEmbedder
CellEmbedder * myCellEmbedder
an embeder from a unsigned khalimsky space point to a real space point
Definition: Display3D.h:266
DGtal::SignedKhalimskyCell
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Definition: KhalimskySpaceND.h:208
DGtal::Display3D::operator<<
Display3D & operator<<(const TDrawableWithDisplay3D &object)
DGtal::Display3D::mySCellEmbedder
SCellEmbedder * mySCellEmbedder
an embeder from a signed khalimsky space point to a real space point
Definition: Display3D.h:268
DGtal::Display3D::Self
Display3D< Space, KSpace > Self
Definition: Display3D.h:99
DGtal::Display3D::SelectCallbackFctStore::data
void * data
Definition: Display3D.h:130
DGtal::Display3D::myStyles
StyleMapping myStyles
Definition: Display3D.h:806
DGtal::Display3D::shiftSurfelVisu
@ shiftSurfelVisu
Definition: Display3D.h:249
DGtal::Display3D::myPolygonSetNameList
std::vector< std::string > myPolygonSetNameList
Definition: Display3D.h:889
DGtal::Display3D::setSelectCallback3D
void setSelectCallback3D(SelectCallbackFct fct, void *data, DGtal::int32_t min_name, DGtal::int32_t max_name)
DGtal::Display3D::ClippingPlaneD3D::b
double b
Definition: Display3D.h:174
DGtal::Display3D::addQuadWithNormal
void addQuadWithNormal(const RealPoint &p1, const RealPoint &p2, const RealPoint &p3, const RealPoint &p4, const RealPoint &n, const bool enableReorientation, const bool enableDoubleFace=false)
DGtal::Display3D::createNewCubeList
DGtal::int32_t createNewCubeList()
DGtal::Display3D::myLineSetList
std::vector< std::vector< LineD3D > > myLineSetList
Definition: Display3D.h:827
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::Display3D::embedK
RealPoint embedK(const typename KSpace::Cell &cell) const
DGtal::Display3D::LineD3D::isSigned
bool isSigned
Definition: Display3D.h:153
DGtal::Display3D::deleteCubeList
bool deleteCubeList(const DGtal::int32_t name)
KSpace
Z3i::KSpace KSpace
Definition: testArithmeticalDSSComputerOnSurfels.cpp:48
DGtal::Display3D::name3d
DGtal::int32_t name3d() const
DGtal::Display3D::myBoundingPtUp
double myBoundingPtUp[3]
upper point of the bounding box
Definition: Display3D.h:811
DGtal::Display3D::myBallSetList
std::vector< std::vector< BallD3D > > myBallSetList
Definition: Display3D.h:831
DGtal::Display3D::CommonD3D
Definition: Display3D.h:138
DGtal::Display3D::Display3D
Display3D()
Definition: Display3D.h:307
DGtal::Display3D::myName3d
DGtal::int32_t myName3d
Definition: Display3D.h:893
DGtal::Display3D::LineD3D::point1
RealPoint point1
Definition: Display3D.h:150
DGtal::Display3D::SelectCallbackFctStore::fct
SelectCallbackFct fct
Definition: Display3D.h:129
DGtal::Mesh
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition: Mesh.h:91
DGtal::Display3D::CubeD3D::width
double width
The width of a cube face.
Definition: Display3D.h:164
DGtal::Display3D::BallD3D
Definition: Display3D.h:216
DGtal::operator>>
void operator>>(const Display3D< Space, KSpace > &aDisplay3D, DGtal::Mesh< typename Display3D< Space, KSpace >::RealPoint > &aMesh)
DGtal::Display3D::PolygonD3D::nz
double nz
Definition: Display3D.h:244
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::Display3D::RealPoint
Space::RealPoint RealPoint
RealPoint type.
Definition: Display3D.h:101
DGtal::Display3D::myBoundingPtEmptyTag
bool myBoundingPtEmptyTag
True if the bounding box is empty (no objects added)
Definition: Display3D.h:809
DGtal::Display3D::QuadD3D::ny
double ny
Definition: Display3D.h:190
DGtal::Display3D::RealVector
Space::RealVector RealVector
RealVector type.
Definition: Display3D.h:103
DGtal::Display3D::embed
RealPoint embed(const typename Space::Point &dp) const
DGtal::CanonicEmbedder
Aim: A trivial embedder for digital points, which corresponds to the canonic injection of Zn into Rn.
Definition: CanonicEmbedder.h:64
DGtal::Display3D::addQuadFromSurfelCenterWithNormal
void addQuadFromSurfelCenterWithNormal(const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel, const RealVector &aNormal, const bool enableReorientation, const bool sign, const bool enableDoubleFace=false)
DGtal::Display3D::myPrismNameList
std::vector< std::string > myPrismNameList
Definition: Display3D.h:877
DGtal::Display3D::myPrismList
std::vector< QuadD3D > myPrismList
Definition: Display3D.h:839
DGtal::Display3D::ClippingPlaneD3D::a
double a
Definition: Display3D.h:174
DGtal::Display3D::SelectCallbackFctStore::max
DGtal::int32_t max
Definition: Display3D.h:132
DGtal::Display3D::ModeMapping
std::map< std::string, std::string > ModeMapping
Definition: Display3D.h:786
DGtal::Display3D::TriangleD3D
Definition: Display3D.h:200
DGtal::Display3D::myBoundingPtLow
double myBoundingPtLow[3]
lower point of the bouding box
Definition: Display3D.h:813
DGtal::Display3D::myCurrentFillColor
DGtal::Color myCurrentFillColor
Definition: Display3D.h:817
DGtal::Display3D::exportToMesh
void exportToMesh(Mesh< RealPoint > &aMesh) const
DGtal::Display3D::addBasicSurfel
void addBasicSurfel(const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel)
DGtal::Display3D::myLineSetNameList
std::vector< std::string > myLineSetNameList
Definition: Display3D.h:866
DGtal::Display3D::QuadsMap
std::map< DGtal::int32_t, std::vector< QuadD3D > > QuadsMap
The type that maps identifier name -> vector of QuadD3D.
Definition: Display3D.h:254
DGtal::Display3D::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::Display3D::SelectCallbackFctStore::SelectCallbackFctStore
SelectCallbackFctStore(SelectCallbackFct _fct, void *_data, DGtal::int32_t _min, DGtal::int32_t _max)
Definition: Display3D.h:118
DGtal::Display3D::cellEmbedder
const CellEmbedder & cellEmbedder() const
Definition: Display3D.h:332
DGtal::Display3D::myTriangleSetNameList
std::vector< std::string > myTriangleSetNameList
Definition: Display3D.h:885
DGtal::Display3D::CommonD3D::color
DGtal::Color color
Color used for displaying the graphical structure.
Definition: Display3D.h:139
DGtal::Display3D::LineD3D
Definition: Display3D.h:149
DGtal::Display3D::BallD3D::signPos
bool signPos
Definition: Display3D.h:231
DGtal::PointVector::dimension
static const Dimension dimension
Copy of the static dimension of the Point/Vector.
Definition: PointVector.h:626
DGtal::Display3D::myCurrentfShiftVisuPrisms
double myCurrentfShiftVisuPrisms
Definition: Display3D.h:823
DGtal::Display3D::addLine
void addLine(const RealPoint &p1, const RealPoint &p2, const double width=0.03)
DGtal::Display3D::addPrism
void addPrism(const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel, double sizeShiftFactor, double sizeFactor=1.0, bool isSigned=false, bool aSign=true)
DGtal::Display3D::QuadD3D::point4
RealPoint point4
Definition: Display3D.h:189
DGtal::Display3D::CommonD3D::name
DGtal::int32_t name
The "OpenGL name" associated with the graphical structure, used for selecting it (-1 is none).
Definition: Display3D.h:140
DGtal::Display3D::BallD3D::operator[]
const double & operator[](unsigned int i) const
Definition: Display3D.h:219
DGtal::Display3D::BallD3D::center
RealPoint center
Definition: Display3D.h:228
DGtal::Display3D::SelectCallbackFctStore::operator<
bool operator<(const SelectCallbackFctStore &other) const
Definition: Display3D.h:122
DGtal::Display3D::createNewPolygonList
void createNewPolygonList(std::string s="")
DGtal::Display3D::addCylinder
void addCylinder(const RealPoint &p1, const RealPoint &p2, const double width=0.02)
DGtal::Display3D::addPolygon
void addPolygon(const std::vector< RealPoint > &vertices)
DGtal::Display3D::myTriangleSetList
std::vector< std::vector< TriangleD3D > > myTriangleSetList
Represents all the triangles drawn in the Display3D.
Definition: Display3D.h:848
DGtal::Display3D::ClippingPlaneD3D::d
double d
Definition: Display3D.h:174
DGtal::Display3D::setFillColor
virtual void setFillColor(DGtal::Color aColor)
DGtal::Display3D::createNewLineList
void createNewLineList(std::string s="")
DGtal::Display3D::setLineColor
virtual void setLineColor(DGtal::Color aColor)
DGtal::Display3D::addCone
void addCone(const RealPoint &p1, const RealPoint &p2, double width=0.08)
DGtal::Display3D::embedder
const Embedder & embedder() const
Definition: Display3D.h:328
DGtal::Display3D::LineD3D::signPos
bool signPos
Definition: Display3D.h:154
DGtal::Display3D::TriangleD3D::nz
double nz
Definition: Display3D.h:204
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
DGtal::Display3D::addCube
void addCube(const RealPoint &center, double width=1.0)
DGtal::Display3D::myQuadSetNameList
std::vector< std::string > myQuadSetNameList
Definition: Display3D.h:881
DGtal::Display3D::BallD3D::radius
double radius
Definition: Display3D.h:232
DGtal::Display3D::setName3d
void setName3d(DGtal::int32_t name=-1)
DGtal::Display3D::PolygonD3D
Definition: Display3D.h:241
DGtal::Display3D::QuadD3D::point3
RealPoint point3
Definition: Display3D.h:188
DGtal::Display3D::ClippingPlaneD3D::c
double c
Definition: Display3D.h:174
DGtal::Display3D::myBallSetNameList
std::vector< std::string > myBallSetNameList
Definition: Display3D.h:870
DGtal::Display3D::TriangleD3D::point2
RealPoint point2
Definition: Display3D.h:202
DGtal::Display3D::myCurrentLineColor
DGtal::Color myCurrentLineColor
Definition: Display3D.h:819
DGtal::Display3D::PolygonD3D::vertices
std::vector< RealPoint > vertices
Definition: Display3D.h:243
DGtal::Display3D::myClippingPlaneNameList
std::vector< std::string > myClippingPlaneNameList
Definition: Display3D.h:873
DGtal::Display3D::BallD3D::dimension
static const RealPoint::Dimension dimension
Definition: Display3D.h:218
DGtal::Display3D::CubesMap
std::map< DGtal::int32_t, std::vector< CubeD3D > > CubesMap
The type that maps identifier name -> vector of CubeD3D.
Definition: Display3D.h:257
DGtal::Display3D::mySelectCallBackFcts
std::set< SelectCallbackFctStore > mySelectCallBackFcts
Definition: Display3D.h:897
DGtal::Display3D::TriangleD3D::point1
RealPoint point1
Definition: Display3D.h:201
DGtal::Display3D::sCellEmbedder
const SCellEmbedder & sCellEmbedder() const
Definition: Display3D.h:336
DGtal::CanonicSCellEmbedder< KSpace >
DGtal::Display3D::QuadD3D::nx
double nx
Definition: Display3D.h:190
DGtal::Display3D::TriangleD3D::nx
double nx
Definition: Display3D.h:204
DGtal::Display3D::TriangleD3D::point3
RealPoint point3
Definition: Display3D.h:203
DGtal::Display3D::TriangleD3D::ny
double ny
Definition: Display3D.h:204
DGtal::Display3D::~Display3D
virtual ~Display3D()
Definition: Display3D.h:281
DGtal::Display3D::setKSpace
virtual void setKSpace(const KSpace &aKSpace)
DGtal::Display3D::updateBoundingBox
void updateBoundingBox(const RealPoint &point)
DGtal::Display3D::myCubesMap
CubesMap myCubesMap
Definition: Display3D.h:857
DGtal::Display3D::addQuad
void addQuad(const RealPoint &p1, const RealPoint &p2, const RealPoint &p3, const RealPoint &p4)
DGtal::Display3D::QuadD3D::point2
RealPoint point2
Definition: Display3D.h:187
DGtal::KhalimskyCell< dim, Integer >
DGtal::Display3D::myBoundingPtChangedTag
bool myBoundingPtChangedTag
Definition: Display3D.h:899
DGtal::Display3D::myQuadsMap
QuadsMap myQuadsMap
Definition: Display3D.h:845
DGtal::Display3D::StyleMapping
std::map< std::string, CountedPtr< DrawableWithDisplay3D > > StyleMapping
Definition: Display3D.h:792
DGtal::KhalimskySpaceND
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
Definition: KhalimskySpaceND.h:64
DGtal::Display3D::space
const KSpace & space() const
Definition: Display3D.h:340
DGtal::Display3D::createNewTriangleList
void createNewTriangleList(std::string s="")
DGtal::Display3D::BallD3D::resolution
unsigned int resolution
Definition: Display3D.h:233