DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::Viewer3D< TSpace, TKSpace > Class Template Reference

#include <DGtal/io/viewers/Viewer3D.h>

Inheritance diagram for DGtal::Viewer3D< TSpace, TKSpace >:
[legend]

Data Structures

struct  CompFarthestPolygonFromCamera
 
struct  CompFarthestSurfelFromCamera
 
struct  CompFarthestTriangleFromCamera
 
struct  CompFarthestVoxelFromCamera
 
struct  Extension
 
struct  GLTextureImage
 
struct  Image2DDomainD3D
 
struct  TextureImage
 

Public Types

enum  RenderingMode { RenderingDefault , RenderingMetallic , RenderingPlastic , RenderingLambertian }
 
enum  ImageDirection { xDirection , yDirection , zDirection , undefDirection }
 the 3 possible axes for the image direction More...
 
enum  TextureMode { RGBMode , GrayScaleMode }
 the modes of representation of an image More...
 
typedef TSpace Space
 
typedef TKSpace KSpace
 
typedef Viewer3D< Space, KSpaceSelf
 
typedef Display3D< Space, KSpaceDisplay
 
typedef Display::SelectCallbackFct SelectCallbackFct
 
typedef Display::RealPoint RealPoint
 
- Public Types inherited from DGtal::Display3D< Space, KSpace >
enum  StreamKey { addNewList , updateDisplay , shiftSurfelVisu }
 
typedef Display3D< Space, KSpaceSelf
 
typedef Space::RealPoint RealPoint
 RealPoint type.
 
typedef Space::RealVector RealVector
 RealVector type.
 
typedef CanonicEmbedder< SpaceEmbedder
 
typedef CanonicCellEmbedder< KSpaceCellEmbedder
 
typedef CanonicSCellEmbedder< KSpaceSCellEmbedder
 
typedef int(* SelectCallbackFct) (void *viewer, DGtal::int32_t name, void *data)
 Select callback function type.
 
typedef std::map< DGtal::int32_t, std::vector< QuadD3D > > QuadsMap
 The type that maps identifier name -> vector of QuadD3D.
 
typedef std::map< DGtal::int32_t, std::vector< CubeD3D > > CubesMap
 The type that maps identifier name -> vector of CubeD3D.
 
typedef std::map< std::string, std::string > ModeMapping
 
typedef std::map< std::string, CountedPtr< DrawableWithDisplay3D > > StyleMapping
 

Public Member Functions

 Viewer3D ()
 
 Viewer3D (const KSpace &KSEmb)
 
void setExtension (Extension *ext)
 
void removeExtension ()
 
void setCameraPosition (double ax, double ay, double az)
 
void setCameraDirection (double ax, double ay, double az)
 
void setCameraUpVector (double ax, double ay, double az)
 
void setNearFar (double _near, double _far)
 
void setGLScale (float sx, float sy, float sz)
 
void setGLDoubleRenderingMode (bool doubleSidedRendering)
 
void setGLMaterialShininessCoefficient (const GLfloat matShininessCoeff)
 
void setGLLightAmbientCoefficients (const GLfloat lightAmbientCoeffs[4])
 
void setGLLightDiffuseCoefficients (const GLfloat lightDiffuseCoeffs[4])
 
void setGLLightSpecularCoefficients (const GLfloat lightSpecularCoeffs[4])
 
void setUseGLPointForBalls (bool useOpenGLPt)
 
void updateRenderingCoefficients (const RenderingMode aRenderMode, bool displayState=true)
 
Viewer3D< Space, KSpace > & operator<< (const DGtal::Color &aColor)
 
Viewer3D< Space, KSpace > & operator<< (const typename Viewer3D< Space, KSpace >::StreamKey &key)
 
void sortSurfelFromCamera ()
 
void sortTriangleFromCamera ()
 
void sortQuadFromCamera ()
 
void sortPolygonFromCamera ()
 
template<typename TDrawableWithViewer3D >
Viewer3D< Space, KSpace > & operator<< (const TDrawableWithViewer3D &object)
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
virtual unsigned int getCurrentDomainNumber ()
 
virtual unsigned int getCurrentGLImageNumber ()
 
virtual void paintGL ()
 Overload of the QGLViewer method in order to change the order of display (to fix the QGLViewer axis display trough transparency).
 
virtual void show ()
 Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are well created in the particular case where show() is called at the end of the program).
 
void addTextureImage (const TextureImage &image)
 
template<typename TImageType , typename TFunctor >
void updateTextureImage (unsigned int imageIndex, const TImageType &image, const TFunctor &aFunctor, double xTranslation=0.0, double yTranslation=0.0, double zTranslation=0.0, double rotationAngle=0.0, ImageDirection rotationDir=zDirection)
 
void updateOrientationTextureImage (unsigned int imageIndex, double xPosition, double yPosition, double zPosition, ImageDirection newDirection)
 
void updateEmbeddingTextureImage (unsigned int anImageIndex, typename Space::Point aPoint1, typename Space::Point aPoint2, typename Space::Point aPoint3, typename Space::Point aPoint4)
 
template<typename TDomain >
void addImage2DDomainD3D (const TDomain &anImageDomain, std::string mode, const DGtal::Color &aColor=DGtal::Color::Red)
 
void updateAn2DDomainOrientation (unsigned int imageIndex, double xPosition, double yPosition, double zPosition, ImageDirection newDirection)
 
void translateAn2DDomain (unsigned int domainIndex, double xTranslation, double yTranslation, double zTranslation)
 
std::vector< typename DGtal::Viewer3D< Space, KSpace >::LineD3D > compute2DDomainLineRepresentation (Image2DDomainD3D &anImageDomain, double delta)
 
std::vector< typename DGtal::Viewer3D< Space, KSpace >::LineD3D > compute2DDomainLineRepresentation (Image2DDomainD3D &anImageDomain)
 
template<typename TContainer >
void rotateLineD3D (typename DGtal::Display3D< Space, KSpace >::LineD3D &aLine, DGtal::PointVector< 3, int, TContainer > pt, double angleRotation, ImageDirection dirRotation)
 
void rotateDomain (Image2DDomainD3D &anDom, double angle, ImageDirection rotationDir)
 
void setLightModeFixToCamera (bool fixedToCam, bool verbose=true)
 
void drawSomeLight (GLenum light) const
 To call the protected method drawLight.
 
void drawSomeLight (GLenum light, float zoom) const
 To call the protected method drawLight.
 
void updateList (bool needToUpdateBoundingBox=true)
 
void glDrawGLBall (const typename Viewer3D< Space, KSpace >::BallD3D &aBall)
 
virtual void keyPressEvent (QKeyEvent *e)
 
virtual void mouseMoveEvent (QMouseEvent *e)
 
virtual void mousePressEvent (QMouseEvent *e)
 
virtual void mouseReleaseEvent (QMouseEvent *e)
 
virtual void drawWithNames ()
 drawWithNames
 
virtual void draw ()
 draw
 
virtual void init ()
 init
 
virtual QString helpString () const
 
virtual void postSelection (const QPoint &point)
 postSelection
 
virtual QDomElement domElement (const QString &name, QDomDocument &document) const
 Overload of the QGLViewer method which returns an XML QDomElement representing the QGLViewer state. This overload adds the light position attribute.
 
virtual void initFromDOMElement (const QDomElement &element)
 Overload of the QGLViewer method which restores the viewer state from a QDomDocument element. This overload recovers and loads default viewer attributes with the add of the the light position.
 
- Public Member Functions inherited from DGtal::Display3D< Space, KSpace >
 BOOST_CONCEPT_ASSERT ((concepts::CSpace< Space >))
 
virtual ~Display3D ()
 
 Display3D (const KSpace &KSEmb)
 
 Display3D ()
 
 Display3D (const Display3D &)=delete
 Copy constructor. Deleted.
 
 Display3D (Display3D &&)=delete
 Move constructor. Deleted.
 
Display3Doperator= (const Display3D &)=delete
 Assignment operator. Deleted.
 
Display3Doperator= (Display3D &&)=delete
 Move operator. Deleted.
 
const Embedderembedder () const
 
const CellEmbeddercellEmbedder () const
 
const SCellEmbeddersCellEmbedder () const
 
const KSpacespace () const
 
virtual void setFillColor (DGtal::Color aColor)
 
virtual void setFillTransparency (unsigned char alpha)
 
virtual void setLineColor (DGtal::Color aColor)
 
virtual DGtal::Color getFillColor ()
 
virtual DGtal::Color getLineColor ()
 
virtual void setKSpace (const KSpace &aKSpace)
 
void setName3d (DGtal::int32_t name=-1)
 
DGtal::int32_t name3d () const
 
void setSelectCallback3D (SelectCallbackFct fct, void *data, DGtal::int32_t min_name, DGtal::int32_t max_name)
 
SelectCallbackFct getSelectCallback3D (DGtal::int32_t aName, void *&data) const
 
void addClippingPlane (double a, double b, double c, double d, bool drawPlane)
 
std::string getMode (const std::string &objectName) const
 
void createNewLineList (std::string s="")
 
void createNewBallList (std::string s="")
 
DGtal::int32_t createNewCubeList ()
 
bool deleteCubeList (const DGtal::int32_t name)
 
DGtal::int32_t createNewQuadList ()
 
bool deleteQuadList (const DGtal::int32_t name)
 
void createNewTriangleList (std::string s="")
 
void createNewPolygonList (std::string s="")
 
void addQuad (const RealPoint &p1, const RealPoint &p2, const RealPoint &p3, const RealPoint &p4)
 
void addQuadWithNormal (const RealPoint &p1, const RealPoint &p2, const RealPoint &p3, const RealPoint &p4, const RealPoint &n, const bool enableReorientation, const bool enableDoubleFace=false)
 
void addQuadFromSurfelCenter (const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel)
 
void addQuadFromSurfelCenterWithNormal (const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel, const RealVector &aNormal, const bool enableReorientation, const bool sign, const bool enableDoubleFace=false)
 
void addTriangle (const RealPoint &p1, const RealPoint &p2, const RealPoint &p3)
 
void addPolygon (const std::vector< RealPoint > &vertices)
 
void addLine (const RealPoint &p1, const RealPoint &p2, const double width=0.03)
 
void addCube (const RealPoint &center, double width=1.0)
 
void addBall (const RealPoint &center, const double radius=0.5, const unsigned int resolution=30)
 
void addPrism (const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel, double sizeShiftFactor, double sizeFactor=1.0, bool isSigned=false, bool aSign=true)
 
void addBasicSurfel (const RealPoint &baseQuadCenter, bool xSurfel, bool ySurfel, bool zSurfel)
 
void addCone (const RealPoint &p1, const RealPoint &p2, double width=0.08)
 
void addCylinder (const RealPoint &p1, const RealPoint &p2, const double width=0.02)
 
void updateBoundingBox (const RealPoint &point)
 
void exportToMesh (Mesh< RealPoint > &aMesh) const
 
template<typename TDrawableWithDisplay3D >
Display3Doperator<< (const TDrawableWithDisplay3D &object)
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
void clear ()
 
RealPoint embed (const typename Space::Point &dp) const
 
RealPoint embedKS (const typename KSpace::SCell &cell) const
 
RealPoint embedKS (const DGtal::TransformedPrism &aTrans) const
 
RealPoint embedK (const typename KSpace::Cell &cell) const
 

Static Public Member Functions

template<typename TImageORDomain >
static void rotateImageVertex (TImageORDomain &anImageOrDom, double angle, ImageDirection rotationDir)
 
template<typename TValues >
static void rotatePoint (TValues &x, TValues &y, TValues &z, double cx, double cy, double cz, double rotationAngle, ImageDirection rotationDir)
 

Data Fields

DGtal::Color myDefaultBackgroundColor
 the default background color of the viewer
 
DGtal::Color myDefaultColor
 the default color of the viewer
 
bool myIsBackgroundDefault
 true if the background is default
 
bool myViewWire
 objects have shadows which follow the camera if false
 
double myGLPointMinWidth = 1.5
 
double myGLLineMinWidth = 1.5
 to improve the display of gl points

 
bool myAutoSaveState
 flag to save automatically or not the Viewer3d state when closing the viewer
 
RenderingMode myRenderingMode = RenderingDefault
 
- Data Fields inherited from DGtal::Display3D< Space, KSpace >
ModeMapping myModes
 
StyleMapping myStyles
 
bool myBoundingPtEmptyTag
 True if the bounding box is empty (no objects added)
 
double myBoundingPtUp [3]
 upper point of the bounding box
 
double myBoundingPtLow [3]
 lower point of the bouding box
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *e)
 Overload the QWidget method to customize the viewer state auto saving. Now it save the viewer state if the flag myAutoSaveState is true (false by default) and call the QGLWidget::closeEvent().
 

Private Types

typedef std::vector< typename Viewer3D< Space, KSpace >::CubeD3D > VectorCubes
 
typedef std::vector< typename Viewer3D< Space, KSpace >::QuadD3D > VectorQuad
 
typedef std::vector< typename Viewer3D< Space, KSpace >::LineD3D > VectorLine
 
typedef std::vector< typename Viewer3D< Space, KSpace >::BallD3D > VectorBall
 
typedef std::vector< typename Viewer3D< Space, KSpace >::TriangleD3D > VectorTriangle
 
typedef std::vector< typename Viewer3D< Space, KSpace >::PolygonD3D > VectorPolygon
 
typedef std::vector< typename Viewer3D< Space, KSpace >::TextureImage > VectorTextureImage
 
typedef VectorCubes::iterator ItCube
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
void glCreateListCubesMaps (const typename Display3D< Space, KSpace >::CubesMap &aCubeMap, unsigned int idList)
 
void glCreateListQuadD3D (const VectorQuad &aVectQuad, unsigned int idList)
 
void glCreateListLines (const VectorLine &aVectLine, unsigned int idList)
 
void glCreateListBalls (const VectorBall &aVectBall, unsigned int idList)
 
void glCreateListQuadMaps (const typename Display3D< Space, KSpace >::QuadsMap &aQuadMap, unsigned int idList)
 
void glCreateListQuadMapsWired (const typename Display3D< Space, KSpace >::QuadsMap &aQuadMap, unsigned int idList)
 
void glCreateListTriangles (const std::vector< VectorTriangle > &aVectTriangle, unsigned int idList)
 
void glCreateListTrianglesWired (const std::vector< VectorTriangle > &aVectTriangle, unsigned int idList)
 
void glCreateListPolygons (const std::vector< VectorPolygon > &aVectPolygon, unsigned int idList)
 
void glCreateListPolygonsWired (const std::vector< VectorPolygon > &aVectPolygon, unsigned int idList)
 
void glUpdateTextureImages (const VectorTextureImage &aVectImage)
 
void glUpdateLightRenderingMode () const
 
void glUpdateBackground ()
 
void updateLightCoordsFromCamera ()
 
void updateRelativeCameraFromLightPosition ()
 

Private Attributes

GLuint myTriangleSetListId
 lists of the list to draw
 
GLuint myTriangleSetListWiredId
 
GLuint myPolygonSetListId
 
GLuint myPolygonSetListWiredId
 
GLuint myLineSetListId
 
GLuint myBallSetListId
 
GLuint myPrismListId
 
GLuint myQuadsMapId
 
GLuint myQuadsMapWiredId
 
GLuint myCubesMapId
 
GLuint myCubeSetListWiredId
 
unsigned int myNbListe
 number of lists in myListToAff
 
unsigned int myNbLineSetList
 
unsigned int myNbBallSetList
 
unsigned int myNbPrismSetList
 
int mySelectedElementId = -1
 used to displayed selected elements
 
unsigned char mySelectionColorShift = 150
 
qglviewer::Vec myOrig
 information linked to the navigation in the viewer
 
qglviewer::Vec myDir
 
qglviewer::Vec myDirSelector
 
qglviewer::Vec mySelectedPoint
 
QPoint myPosSelector
 a point selected with postSelection
 
std::vector< GLTextureImagemyVectTextureImage
 list of the images textures in this viewer
 
bool myIsDoubleFaceRendering = true
 true if is double face rendering
 
double camera_position [3]
 camera position
 
double camera_direction [3]
 camera direction
 
double camera_upVector [3]
 camera up-vector
 
bool myLightPositionFixToCamera = true
 
double myLightTheta
 
double myLightPhi
 the light position (inclination)
 
double myLightR
 the light position (azimuth)
 
GLfloat myLightPosition [4] = {0.0f, 0.0f, 1.0f, 1.0f}
 the light position (distance)
 
GLfloat myLightPositionRefCameraDefault [3] = {-100.0f, 100.0f, 0.0f}
 
GLfloat myLightPositionRefCamera [3] = {0.0f, 0.0f, 0.0f}
 
GLfloat myMaterialShininessCoeff [1] = {50.0f}
 
GLfloat myMaterialSpecularCoeffs [4] = { 1.0f, 1.0f, 1.0f, 1.0f }
 
GLfloat myLightSpecularCoeffs [4] = { 0.3f, 0.3f, 0.3f, 1.0f }
 
GLfloat myLightAmbientCoeffs [4] = { 0.0f, 0.0f, 0.0f, 1.0f }
 
GLfloat myLightDiffuseCoeffs [4] = { 0.7f, 0.7f, 0.7f, 1.0f }
 
const GLfloat myDefaultRenderSpec = 0.3f
 
const GLfloat myDefaultRenderDiff = 0.7f
 
const GLfloat myLambertRenderSpec = 0.0f
 
const GLfloat myLambertRenderDiff = 0.9f
 
const GLfloat myMetallicRenderSpec = 0.5f
 
const GLfloat myMetallicRenderDiff = 0.5f
 
const GLfloat myPlasticRenderSpec = 0.8f
 
const GLfloat myPlasticRenderDiff = 0.2f
 
bool myUseGLPointsForBalls = false
 
double ZNear
 znear distance
 
double ZFar
 zfar distance
 
float myMeshDefaultLineWidth
 
float myGLScaleFactorX =1.0
 
float myGLScaleFactorY =1.0
 
float myGLScaleFactorZ =1.0
 
double myLigthRotationStep
 
int myRefMouseXPos
 the angle rotation increment used for interactive light move
 
int myRefMouseYPos
 the reference mouse x-position used to determince the light position change (azimuth)
 
bool myIsMovingLight
 the reference mouse y-position used to determince the light position change (inclination)
 
std::vector< TextureImagemyGSImageList
 flag to display the ligth source when it is moved by the user
 
std::vector< Image2DDomainD3DmyImageDomainList
 Used to store all the domains.
 
ExtensionmyExtension
 Stored a possible extension to the viewer (pointer owned).
 

Additional Inherited Members

- Static Protected Member Functions inherited from DGtal::Display3D< Space, KSpace >
static void cross (double dst[3], double srcA[3], double srcB[3])
 
static void normalize (double vec[3])
 
- Protected Attributes inherited from DGtal::Display3D< Space, KSpace >
KSpace myKSpace
 The Khalimsky space.
 
EmbeddermyEmbedder
 an embeder from a dgtal space point to a real space point
 
CellEmbeddermyCellEmbedder
 an embeder from a unsigned khalimsky space point to a real space point
 
SCellEmbeddermySCellEmbedder
 an embeder from a signed khalimsky space point to a real space point
 
DGtal::Color myCurrentFillColor
 
DGtal::Color myCurrentLineColor
 
double myCurrentfShiftVisuPrisms
 
std::vector< std::vector< LineD3D > > myLineSetList
 
std::vector< std::vector< BallD3D > > myBallSetList
 
std::vector< ClippingPlaneD3DmyClippingPlaneList
 
std::vector< QuadD3DmyPrismList
 
QuadsMap myQuadsMap
 
std::vector< std::vector< TriangleD3D > > myTriangleSetList
 Represents all the triangles drawn in the Display3D.
 
std::vector< std::vector< PolygonD3D > > myPolygonSetList
 Represents all the polygon drawn in the Display3D.
 
CubesMap myCubesMap
 
std::vector< std::string > myCubeSetNameList
 
std::vector< std::string > myLineSetNameList
 
std::vector< std::string > myBallSetNameList
 
std::vector< std::string > myClippingPlaneNameList
 
std::vector< std::string > myPrismNameList
 
std::vector< std::string > myQuadSetNameList
 
std::vector< std::string > myTriangleSetNameList
 
std::vector< std::string > myPolygonSetNameList
 
DGtal::int32_t myName3d
 
std::set< SelectCallbackFctStoremySelectCallBackFcts
 
bool myBoundingPtChangedTag = false
 

Detailed Description

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
class DGtal::Viewer3D< TSpace, TKSpace >

Description of class 'Viewer3D'

Aim: Display 3D primitive (like PointVector, DigitalSetBySTLSet, Object ...). This class uses the libQGLViewer library (

See also
http://www.libqglviewer.com ). It inherits of the class Display3D and displays objects using a simple stream mechanism of "<<".

For instance you can display objects as follows:

#include <QtGui/qapplication.h>
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/io/viewers/Viewer3D.h"
...
using namespace Z3i;
...
Point p1( 0, 0, 0 );
Point p2( 5, 5 ,5 );
Point p3( 2, 3, 4 );
Domain domain( p1, p2 );
Viewer3D<> viewer;
viewer.show();
viewer << domain;
viewer << p1 << p2 << p3;
viewer<< Viewer3D<>::updateDisplay;
return application.exec();
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
MyPointD Point
Domain domain

This class is parametrized by both the Digital and Khalimsky space used to display object. More precisely, embed methods are used to compute the Euclidean coordinate of digital objects/khalimksy cells.

Template Parameters
TSpaceany model of Digital 3D Space
TKSpaceany mode of Khalimksky 3D space
Note
You must provide a Khalimksy space at instanciation if you wish to display cells with the viewer. If you are not going to display cells, then it is not compulsory to provide it.
See also
Display3D, Board3DTo2D
Examples
dec/exampleDECSurface.cpp, dec/exampleDiscreteExteriorCalculusSolve.cpp, examples/tutorial-examples/polyhedralizer.cpp, geometry/curves/exampleArithDSS3d.cpp, geometry/curves/exampleGridCurve3d-2.cpp, geometry/curves/exampleGridCurve3d.cpp, geometry/surfaces/dvcm-3d.cpp, geometry/surfaces/greedy-plane-segmentation-ex2.cpp, geometry/surfaces/greedy-plane-segmentation.cpp, geometry/volumes/digitalPolyhedronBuilder3D.cpp, geometry/volumes/distance/distancetransform3D.cpp, geometry/volumes/distance/exampleFMM3D.cpp, geometry/volumes/fullConvexityAnalysis3D.cpp, geometry/volumes/fullConvexityShortestPaths3D.cpp, geometry/volumes/fullConvexityThinning3D.cpp, geometry/volumes/standardDigitalPolyhedronBuilder3D.cpp, graph/volDistanceTraversal.cpp, images/extract2DImagesFrom3DandVisu.cpp, io/digitalSetFromPointList.cpp, io/digitalSetFromVol.cpp, io/meshFromOFF.cpp, io/viewDualSurface.cpp, io/viewers/demo-kernel-2.cpp, io/viewers/viewer3D-1-points.cpp, io/viewers/viewer3D-10-interaction.cpp, io/viewers/viewer3D-11-extension.cpp, io/viewers/viewer3D-2-sets.cpp, io/viewers/viewer3D-3-objects.cpp, io/viewers/viewer3D-4-modes.cpp, io/viewers/viewer3D-4bis-illustrationMode.cpp, io/viewers/viewer3D-5-custom.cpp, io/viewers/viewer3D-6-clipping.cpp, io/viewers/viewer3D-7-planes.cpp, io/viewers/viewer3D-7-stdplane.cpp, io/viewers/viewer3D-7bis-planes.cpp, io/viewers/viewer3D-7bis-stdplane.cpp, io/viewers/viewer3D-8-2DSliceImages.cpp, io/viewers/viewer3D-8bis-2Dimages.cpp, io/viewers/viewer3D-9-3Dimages.cpp, shapes/exampleSurfaceMesh.cpp, shapes/mesh3DConstructionAndVisualisation.cpp, shapes/viewMarchingCubes.cpp, shapes/viewPolygonalMarchingCubes.cpp, topology/3dBorderExtraction.cpp, topology/3dBorderExtractionImg.cpp, topology/3dKSSurfaceExtraction.cpp, topology/ctopo-1-3d.cpp, topology/ctopo-1s-3d.cpp, topology/cubical-complex-collapse.cpp, topology/digitalSurfaceSlice.cpp, topology/frontierAndBoundary.cpp, topology/homotopicThinning3D.cpp, topology/volBreadthFirstTraversal.cpp, topology/volScanBoundary.cpp, topology/volTrackBoundary.cpp, tutorial-examples/polyhedralizer.cpp, and tutorial-examples/volDTGranulo.cpp.

Definition at line 131 of file Viewer3D.h.

Member Typedef Documentation

◆ Display

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef Display3D<Space, KSpace> DGtal::Viewer3D< TSpace, TKSpace >::Display

Definition at line 143 of file Viewer3D.h.

◆ ItCube

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef VectorCubes::iterator DGtal::Viewer3D< TSpace, TKSpace >::ItCube
private

Definition at line 1400 of file Viewer3D.h.

◆ KSpace

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef TKSpace DGtal::Viewer3D< TSpace, TKSpace >::KSpace

Definition at line 141 of file Viewer3D.h.

◆ RealPoint

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef Display::RealPoint DGtal::Viewer3D< TSpace, TKSpace >::RealPoint

Definition at line 145 of file Viewer3D.h.

◆ SelectCallbackFct

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef Display::SelectCallbackFct DGtal::Viewer3D< TSpace, TKSpace >::SelectCallbackFct

Definition at line 144 of file Viewer3D.h.

◆ Self

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef Viewer3D<Space, KSpace> DGtal::Viewer3D< TSpace, TKSpace >::Self

Definition at line 142 of file Viewer3D.h.

◆ Space

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef TSpace DGtal::Viewer3D< TSpace, TKSpace >::Space

Definition at line 140 of file Viewer3D.h.

◆ VectorBall

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef std::vector<typename Viewer3D<Space, KSpace>::BallD3D> DGtal::Viewer3D< TSpace, TKSpace >::VectorBall
private

Definition at line 1394 of file Viewer3D.h.

◆ VectorCubes

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef std::vector<typename Viewer3D<Space, KSpace>::CubeD3D> DGtal::Viewer3D< TSpace, TKSpace >::VectorCubes
private

Type associated to the special intern method GLCreateCubeSetList.

Definition at line 1391 of file Viewer3D.h.

◆ VectorLine

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef std::vector<typename Viewer3D<Space, KSpace>::LineD3D> DGtal::Viewer3D< TSpace, TKSpace >::VectorLine
private

Definition at line 1393 of file Viewer3D.h.

◆ VectorPolygon

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef std::vector<typename Viewer3D<Space, KSpace>::PolygonD3D> DGtal::Viewer3D< TSpace, TKSpace >::VectorPolygon
private

Definition at line 1396 of file Viewer3D.h.

◆ VectorQuad

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef std::vector<typename Viewer3D<Space, KSpace>::QuadD3D> DGtal::Viewer3D< TSpace, TKSpace >::VectorQuad
private

Definition at line 1392 of file Viewer3D.h.

◆ VectorTextureImage

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef std::vector<typename Viewer3D<Space, KSpace>::TextureImage> DGtal::Viewer3D< TSpace, TKSpace >::VectorTextureImage
private

Definition at line 1397 of file Viewer3D.h.

◆ VectorTriangle

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef std::vector<typename Viewer3D<Space, KSpace>::TriangleD3D> DGtal::Viewer3D< TSpace, TKSpace >::VectorTriangle
private

Definition at line 1395 of file Viewer3D.h.

Member Enumeration Documentation

◆ ImageDirection

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
enum DGtal::Viewer3D::ImageDirection

the 3 possible axes for the image direction

Enumerator
xDirection 
yDirection 
zDirection 
undefDirection 

Definition at line 470 of file Viewer3D.h.

◆ RenderingMode

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
enum DGtal::Viewer3D::RenderingMode
Enumerator
RenderingDefault 
RenderingMetallic 
RenderingPlastic 
RenderingLambertian 

Definition at line 148 of file Viewer3D.h.

◆ TextureMode

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
enum DGtal::Viewer3D::TextureMode

the modes of representation of an image

Enumerator
RGBMode 
GrayScaleMode 

Definition at line 472 of file Viewer3D.h.

Constructor & Destructor Documentation

◆ Viewer3D() [1/2]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
DGtal::Viewer3D< TSpace, TKSpace >::Viewer3D ( )
inline

Constructor

Definition at line 294 of file Viewer3D.h.

294 : QGLViewer(), Display3D<Space, KSpace>(), myExtension( 0 )
295 {
296 resize( 800, 600 );
297 };
Extension * myExtension
Stored a possible extension to the viewer (pointer owned).
Definition Viewer3D.h:1689

◆ Viewer3D() [2/2]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
DGtal::Viewer3D< TSpace, TKSpace >::Viewer3D ( const KSpace & KSEmb)
inline

Constructor with a khalimsky space

Parameters
KSEmbthe Khalimsky space

Definition at line 303 of file Viewer3D.h.

304 : QGLViewer(), Display3D<Space, KSpace>( KSEmb ), myExtension( 0 )
305 {
306 resize(800,600);
307 }

Member Function Documentation

◆ addImage2DDomainD3D()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
template<typename TDomain >
void DGtal::Viewer3D< TSpace, TKSpace >::addImage2DDomainD3D ( const TDomain & anImageDomain,
std::string mode,
const DGtal::Color & aColor = DGtal::Color::Red )

add an 2D image in a 3d space

Parameters
anImageDomainan image and its domain
modemode of representation
aColorcolor of the image

◆ addTextureImage()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::addTextureImage ( const TextureImage & image)

Add a TextureImage in the list of image to be displayed.

Parameters
imagea TextureImage including image data buffer and position, orientation.

◆ BOOST_CONCEPT_ASSERT()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
DGtal::Viewer3D< TSpace, TKSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >) )
private

◆ closeEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::closeEvent ( QCloseEvent * e)
protectedvirtual

Overload the QWidget method to customize the viewer state auto saving. Now it save the viewer state if the flag myAutoSaveState is true (false by default) and call the QGLWidget::closeEvent().

Parameters
ethe QCloseEvent calling the method.

◆ compute2DDomainLineRepresentation() [1/2]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
std::vector< typename DGtal::Viewer3D< Space, KSpace >::LineD3D > DGtal::Viewer3D< TSpace, TKSpace >::compute2DDomainLineRepresentation ( Image2DDomainD3D & anImageDomain)

compute2DDomainLineRepresentation

Parameters
anImageDomainthe image domain
Returns
the vector containing the line domain representation.

◆ compute2DDomainLineRepresentation() [2/2]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
std::vector< typename DGtal::Viewer3D< Space, KSpace >::LineD3D > DGtal::Viewer3D< TSpace, TKSpace >::compute2DDomainLineRepresentation ( Image2DDomainD3D & anImageDomain,
double delta )

compute2DDomainLineRepresentation

Parameters
anImageDomainthe image domain
deltathe delte for computing
Returns
the vector containing the line domain representation.

◆ domElement()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual QDomElement DGtal::Viewer3D< TSpace, TKSpace >::domElement ( const QString & name,
QDomDocument & document ) const
virtual

Overload of the QGLViewer method which returns an XML QDomElement representing the QGLViewer state. This overload adds the light position attribute.

Parameters
namethe name of the QDomElement tag.
documentthe QDomElement factory used to create QDomElement.
See also
initFromDOMElement

◆ draw()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::draw ( )
virtual

draw

◆ drawSomeLight() [1/2]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::drawSomeLight ( GLenum light) const
inline

To call the protected method drawLight.

Definition at line 1000 of file Viewer3D.h.

1001 {
1002 QGLViewer::drawLight( light );
1003 }

◆ drawSomeLight() [2/2]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::drawSomeLight ( GLenum light,
float zoom ) const
inline

To call the protected method drawLight.

Definition at line 1005 of file Viewer3D.h.

1006 {
1007 QGLViewer::drawLight( light, zoom );
1008 }

◆ drawWithNames()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::drawWithNames ( )
virtual

drawWithNames

◆ getCurrentDomainNumber()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual unsigned int DGtal::Viewer3D< TSpace, TKSpace >::getCurrentDomainNumber ( )
virtual

◆ getCurrentGLImageNumber()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual unsigned int DGtal::Viewer3D< TSpace, TKSpace >::getCurrentGLImageNumber ( )
virtual

◆ glCreateListBalls()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListBalls ( const VectorBall & aVectBall,
unsigned int idList )
private

Creates an OpenGL list of type GL_POINTS from a vector of BallD3D.

Parameters
[in]aVectBalla vector of balls (BallD3D) containing the points to be displayed.
[in]idListthe Id of the list (should be given by glGenLists).

◆ glCreateListCubesMaps()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListCubesMaps ( const typename Display3D< Space, KSpace >::CubesMap & aCubeMap,
unsigned int idList )
private

Creates an OpenGL list of type GL_QUADS from a CubeD3D. Only one OpenGL list is created but each map compoment (CubeD3D vector) are marked by its identifier through the OpenGl glPushName() function. See Limited interaction when using selection with QGLViewer Viewer3D stream mechanism for more details.

Parameters
[in]aCubeMapa map of cube (CubesMap) associating a name to a vector of CubeD3D.
[in]idListthe Id of the list (should be given by glGenLists).

◆ glCreateListLines()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListLines ( const VectorLine & aVectLine,
unsigned int idList )
private

Creates an OpenGL list of type QL_LINES from a vector of LineD3D.

Parameters
[in]aVectLinea vector of lines (LineD3D) containing the quads to be displayed.
[in]idListthe Id of the list (should be given by glGenLists).

◆ glCreateListPolygons()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListPolygons ( const std::vector< VectorPolygon > & aVectPolygon,
unsigned int idList )
private

Creates an OpenGL list of type GL_POLYGON from a vector of VectorPolygon. All polygons are displayed in the same list.

Parameters
aVectPolygona vector of VectorPolygon containing the points to be displayed.
idListthe Id of the list (should be given by glGenLists).
Todo
change the structure to support interactions as QuadMap do. See Limited interaction when using selection with QGLViewer Viewer3D stream mechanism for more details.

◆ glCreateListPolygonsWired()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListPolygonsWired ( const std::vector< VectorPolygon > & aVectPolygon,
unsigned int idList )
private

Creates an OpenGL list of type GL_LINES from a vector of VectorPolygon. All polygons are displayed in the same list.

Parameters
[in]aVectPolygona vector of vector of polygons (VectorPolygon) containing the points to be displayed.
[in]idListthe Id of the list (should be given by glGenLists).
Todo
change the structure to support interactions as QuadMap do. See Limited interaction when using selection with QGLViewer Viewer3D stream mechanism for more details.

◆ glCreateListQuadD3D()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListQuadD3D ( const VectorQuad & aVectQuad,
unsigned int idList )
private

Creates an OpenGL list of type GL_QUADS from a vector of QuadD3D.

Parameters
[in]aVectQuada vector of quads (QuadD3D) containing the quads to be displayed.
[in]idListthe Id of the list (should be given by glGenLists).

◆ glCreateListQuadMaps()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListQuadMaps ( const typename Display3D< Space, KSpace >::QuadsMap & aQuadMap,
unsigned int idList )
private

Creates an OpenGL list of type GL_QUADS from a QuadsMap. Only one OpenGL list is created but each map compoment (QuadD3D vector) are marked by its identifier through the OpenGl glPushName() function. See Limited interaction when using selection with QGLViewer Viewer3D stream mechanism for more details.

Parameters
[in]aQuadMapa map of quad (QuadsMap) associating a name to a vector of QuadD3D.
[in]idListthe Id of the list (should be given by glGenLists).

◆ glCreateListQuadMapsWired()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListQuadMapsWired ( const typename Display3D< Space, KSpace >::QuadsMap & aQuadMap,
unsigned int idList )
private

Creates an OpenGL list of type GL_LINES from a QuadsMap. Only one OpenGL list is created but each map compoment (QuadD3D vector) are marked by its identifier through the OpenGl glPushName() function. See Limited interaction when using selection with QGLViewer Viewer3D stream mechanism for more details.

Parameters
[in]aQuadMapa map of quad (QuadsMap) associating a name to a vector of QuadD3D.
[in]idListthe Id of the list (should be given by glGenLists).

◆ glCreateListTriangles()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListTriangles ( const std::vector< VectorTriangle > & aVectTriangle,
unsigned int idList )
private

Creates an OpenGL list of type GL_TRIANGLES from a vector of VectorTriangle. All triangles are displayed in the same list.

Parameters
[in]aVectTrianglea vector of VectorTriangle containing the set of triangles to be displayed.
[in]idListthe Id of the list (should be given by glGenLists).
Todo
change the structure to support interactions as QuadMap do. See Limited interaction when using selection with QGLViewer Viewer3D stream mechanism for more details.

◆ glCreateListTrianglesWired()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glCreateListTrianglesWired ( const std::vector< VectorTriangle > & aVectTriangle,
unsigned int idList )
private

Creates an OpenGL list of type GL_LINES defines from a vector of VectorTriangle. All triangles are displayed in the same list.

Parameters
[in]aVectTrianglea vector of VectorTriangle containing the set of triangles to be displayed.
[in]idListthe Id of the list (should be given by glGenLists).
Todo
change the structure to support interactions as QuadMap do. See Limited interaction when using selection with QGLViewer Viewer3D stream mechanism for more details.

◆ glDrawGLBall()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glDrawGLBall ( const typename Viewer3D< Space, KSpace >::BallD3D & aBall)

Draw a ball by using quads strip primitive.

Parameters
[in]aBallthe ball to be drawn

◆ glUpdateBackground()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glUpdateBackground ( )
private

Updates opengl background color according the current mode (default or customized color)

◆ glUpdateLightRenderingMode()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glUpdateLightRenderingMode ( ) const
private

Updates opengl light rendering mode (GL_LIGHT_MODEL_TWO_SIDE) according to the values of private attribute myIsDoubleFaceRendering.

◆ glUpdateTextureImages()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::glUpdateTextureImages ( const VectorTextureImage & aVectImage)
private

Updates the container of GLTextureImage object with the given vector of TextureImage.

Parameters
[in]aVectImagethe vector containing

◆ helpString()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual QString DGtal::Viewer3D< TSpace, TKSpace >::helpString ( ) const
virtual
Returns
astring corresponding to the help of the viewer (list of commands, etc)

◆ init()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::init ( )
virtual

◆ initFromDOMElement()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::initFromDOMElement ( const QDomElement & element)
virtual

Overload of the QGLViewer method which restores the viewer state from a QDomDocument element. This overload recovers and loads default viewer attributes with the add of the the light position.

Parameters
elementQDomDocument used to apply the restoration.
See also
domElement

◆ isValid()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ keyPressEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::keyPressEvent ( QKeyEvent * e)
virtual

Used to manage new key event (wich are added from the default QGLviewer keys).

Note that when a new key event is taken into account it could be added in the QGLviewer init() method to update automatically the key description in the help QGLviewer window. For instance when a new key is processed in this method you simply should add the following code in the init() method:

setKeyDescription(Qt::Key_NEW, "Description of the new Key.");
Parameters
ethe QKeyEvent

◆ mouseMoveEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::mouseMoveEvent ( QMouseEvent * e)
virtual

Used to manage a mouse move event (to handle light move).

Parameters
ethe QMouseEvent

◆ mousePressEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::mousePressEvent ( QMouseEvent * e)
virtual

Used to manage a mouse press event (to handle light move).

Parameters
ethe QMouseEvent

◆ mouseReleaseEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::mouseReleaseEvent ( QMouseEvent * e)
virtual

Used to manage a mouse release event (to handle light move).

Parameters
ethe QMouseEvent

◆ operator<<() [1/3]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
Viewer3D< Space, KSpace > & DGtal::Viewer3D< TSpace, TKSpace >::operator<< ( const DGtal::Color & aColor)

Set the default color for future drawing.

Parameters
aColora DGtal::Color (allow to set a trasnparency value).
Returns
a reference on 'this'.

◆ operator<<() [2/3]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
template<typename TDrawableWithViewer3D >
Viewer3D< Space, KSpace > & DGtal::Viewer3D< TSpace, TKSpace >::operator<< ( const TDrawableWithViewer3D< TSpace, TKSpace > & object)

Draws the drawable [object] in this board. It should satisfy the concept CDrawableWithViewer3D, which requires for instance a method setStyle( Viewer3D<Space, KSpace> & ).

Parameters
objectany drawable object.
Returns
a reference on 'this'.

◆ operator<<() [3/3]

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
Viewer3D< Space, KSpace > & DGtal::Viewer3D< TSpace, TKSpace >::operator<< ( const typename Viewer3D< Space, KSpace >::StreamKey & key)

Set the default color for future drawing.

Parameters
keya stream key
Returns
a reference on 'this'.

◆ paintGL()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::paintGL ( )
virtual

Overload of the QGLViewer method in order to change the order of display (to fix the QGLViewer axis display trough transparency).

◆ postSelection()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::postSelection ( const QPoint & point)
virtual

postSelection

Parameters
pointa point

◆ removeExtension()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::removeExtension ( )
inline

Removes the current extension to the viewer or does nothing if no extension was present.

Definition at line 321 of file Viewer3D.h.

322 {
323 if ( myExtension != 0 )
324 delete myExtension;
325 myExtension = 0;
326 }

References DGtal::Viewer3D< TSpace, TKSpace >::myExtension.

◆ rotateDomain()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::rotateDomain ( Image2DDomainD3D & anDom,
double angle,
ImageDirection rotationDir )

Rotate an Image2DDomainD3D from its bounding points and from its grid line.

Parameters
anDom(returns) the domain to be rotated.
anglethe angle of rotation.
rotationDirthe rotation will be applied around this direction.

◆ rotateImageVertex()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
template<typename TImageORDomain >
static void DGtal::Viewer3D< TSpace, TKSpace >::rotateImageVertex ( TImageORDomain & anImageOrDom,
double angle,
ImageDirection rotationDir )
inlinestatic

Rotates Image2DDomainD3D or TextureImage vertex from a given angle and a rotation direction. The center of rotation is defined from the image center point.

Template Parameters
TImageORDomainthe type object to be rotated (should be an Image2DDomainD3D or a TextureImage)
Parameters
anImageOrDom(returns) the domain or image to be rotated.
anglethe angle of the rotation.
rotationDirthe rotation is applied around this axis direction.

Definition at line 1563 of file Viewer3D.h.

1563 {
1564 double xB = (anImageOrDom.point1[0]+anImageOrDom.point2[0]+anImageOrDom.point3[0]+anImageOrDom.point4[0])/4.0;
1565 double yB = (anImageOrDom.point1[1]+anImageOrDom.point2[1]+anImageOrDom.point3[1]+anImageOrDom.point4[1])/4.0;
1566 double zB = (anImageOrDom.point1[2]+anImageOrDom.point2[2]+anImageOrDom.point3[2]+anImageOrDom.point4[2])/4.0;
1567 rotatePoint( anImageOrDom.point1[0], anImageOrDom.point1[1], anImageOrDom.point1[2], xB, yB, zB, angle, rotationDir);
1568 rotatePoint( anImageOrDom.point2[0], anImageOrDom.point2[1], anImageOrDom.point2[2], xB, yB, zB, angle, rotationDir);
1569 rotatePoint( anImageOrDom.point3[0], anImageOrDom.point3[1], anImageOrDom.point3[2], xB, yB, zB, angle, rotationDir);
1570 rotatePoint( anImageOrDom.point4[0], anImageOrDom.point4[1], anImageOrDom.point4[2], xB, yB, zB, angle, rotationDir);
1571
1572 }
static void rotatePoint(TValues &x, TValues &y, TValues &z, double cx, double cy, double cz, double rotationAngle, ImageDirection rotationDir)

References DGtal::Viewer3D< TSpace, TKSpace >::rotatePoint().

◆ rotateLineD3D()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
template<typename TContainer >
void DGtal::Viewer3D< TSpace, TKSpace >::rotateLineD3D ( typename DGtal::Display3D< Space, KSpace >::LineD3D & aLine,
DGtal::PointVector< 3, int, TContainer > pt,
double angleRotation,
ImageDirection dirRotation )

Rotate an lineD3D from its two extremity points.

Parameters
aLine(returns) the line to be rotated.
ptthe center of rotation.
angleRotationthe angle of rotation.
dirRotationthe rotation will be applied around this direction.

◆ rotatePoint()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
template<typename TValues >
static void DGtal::Viewer3D< TSpace, TKSpace >::rotatePoint ( TValues & x,
TValues & y,
TValues & z,
double cx,
double cy,
double cz,
double rotationAngle,
ImageDirection rotationDir )
static

Rotate a vertex from a given angle, a center point and a rotation direction.

Template Parameters
TValuesthe type of coordinate to be rotated.
Parameters
xthe x coordinate of the point to rotated (return).
ythe y coordinate of the point to rotated (return).
zthe z coordinate of the point to rotated (return).
cxthe x coordinate of the rotation center.
cythe y coordinate of the rotation center.
czthe z coordinate of the rotation center.
rotationAnglethe angle of the rotation.
rotationDirthe rotation is applied around this axis direction.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::rotateImageVertex().

◆ selfDisplay()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::selfDisplay ( std::ostream & out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ setCameraDirection()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setCameraDirection ( double ax,
double ay,
double az )
inline

Set camera direction.

Parameters
axx direction.
ayy direction.
azz direction.

Definition at line 345 of file Viewer3D.h.

346 {
347 camera_direction[0] = ax; camera_direction[1] = ay; camera_direction[2] = az;
348 }
double camera_direction[3]
camera direction
Definition Viewer3D.h:1640

References DGtal::Viewer3D< TSpace, TKSpace >::camera_direction.

◆ setCameraPosition()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setCameraPosition ( double ax,
double ay,
double az )
inline

Set camera position.

Parameters
axx position.
ayy position.
azz position.

Definition at line 334 of file Viewer3D.h.

335 {
336 camera_position[0] = ax; camera_position[1] = ay; camera_position[2] = az;
337 }
double camera_position[3]
camera position
Definition Viewer3D.h:1639

References DGtal::Viewer3D< TSpace, TKSpace >::camera_position.

◆ setCameraUpVector()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setCameraUpVector ( double ax,
double ay,
double az )
inline

Set camera up-vector.

Parameters
axx coordinate of up-vector.
ayy coordinate of up-vector.
azz coordinate of up-vector.

Definition at line 356 of file Viewer3D.h.

357 {
358 camera_upVector[0] = ax; camera_upVector[1] = ay; camera_upVector[2] = az;
359 }
double camera_upVector[3]
camera up-vector
Definition Viewer3D.h:1641

References DGtal::Viewer3D< TSpace, TKSpace >::camera_upVector.

◆ setExtension()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setExtension ( Extension * ext)
inline

Sets the extension ext to the viewer. The object is acquired by the viewer and should be dynamically allocated.

Parameters
extany dynamically allocated object deriving from Extension.

Definition at line 312 of file Viewer3D.h.

313 {
314 if ( myExtension != 0 )
315 delete myExtension;
316 myExtension = ext;
317 }

References DGtal::Viewer3D< TSpace, TKSpace >::myExtension.

◆ setGLDoubleRenderingMode()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setGLDoubleRenderingMode ( bool doubleSidedRendering)

Changes the light rendering mode (GL_LIGHT_MODEL_TWO_SIDE) for single face primitives (polygons, quads or triangles). It will have no effect for cube or ball primitive which will be always rendered with single face.

Parameters
[in]doubleSidedRenderingif true (resp. false) the double (resp. single) rendering mode will be activated for polygons, quads and triangles.

◆ setGLLightAmbientCoefficients()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setGLLightAmbientCoefficients ( const GLfloat lightAmbientCoeffs[4])

Change the light ambient coefficients used in opengl rendering (used in glLightfv with GL_AMBIENT parameters).

Parameters
[in]lightAmbientCoeffsthe values of specular coefficient of RGBA channels (defined in [0,1], default: {0.0,0.0,0.0,1.0}).

◆ setGLLightDiffuseCoefficients()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setGLLightDiffuseCoefficients ( const GLfloat lightDiffuseCoeffs[4])

Change the material ambient coefficients used in opengl rendering (used in glMaterialf with GL_AMBIENT parameters).

Parameters
[in]lightDiffuseCoeffsthe values of specular coefficient of RGBA channels (defined in [0,1], default: {1.0,1.0,1.0,1.0}).

◆ setGLLightSpecularCoefficients()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setGLLightSpecularCoefficients ( const GLfloat lightSpecularCoeffs[4])

Change the light specular coefficients used in opengl rendering (used in glLightfv with GL_SPECULAR parameters).

Parameters
[in]lightSpecularCoeffsthe values of specular coefficient of RGBA channels (defined in [0,1], default: {1.0,1.0,1.0,1.0}).

◆ setGLMaterialShininessCoefficient()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setGLMaterialShininessCoefficient ( const GLfloat matShininessCoeff)

Change the light shininess coefficients used in opengl rendering (used in glMaterialf with GL_SPECULAR parameters).

Parameters
[in]matShininessCoeffthe value of the shininess coefficient (defined in [0, 128], default 50.0).

◆ setGLScale()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setGLScale ( float sx,
float sy,
float sz )
inline

Set the open gl scale of x,y,z axis. It doesn't change the geometry of anything, it is just visualisation parameter (useful to produce more realistic 3D volume display)

Parameters
sxthe scale on the x axis.
sythe scale on the y axis.
szthe scale on the z axis.

Definition at line 380 of file Viewer3D.h.

381 {
385 // In order to have the light source rendering the same as wtih the default scale 1.
386 glEnable(GL_NORMALIZE);
387 }
float myGLScaleFactorY
Definition Viewer3D.h:1675
float myGLScaleFactorX
Definition Viewer3D.h:1674
float myGLScaleFactorZ
Definition Viewer3D.h:1676

References DGtal::Viewer3D< TSpace, TKSpace >::myGLScaleFactorX, DGtal::Viewer3D< TSpace, TKSpace >::myGLScaleFactorY, and DGtal::Viewer3D< TSpace, TKSpace >::myGLScaleFactorZ.

◆ setLightModeFixToCamera()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setLightModeFixToCamera ( bool fixedToCam,
bool verbose = true )
inline

Change the light position mode (attached to camera or to the scence).

Parameters
fixedToCamif true (resp. false) the light position will be attached to the camera (resp. scene).
verboseis set to true, it will display the current mode on the viewer.

Definition at line 971 of file Viewer3D.h.

972 {
973 myLightPositionFixToCamera = fixedToCam;
976 {
977 if (verbose)
978 {
979 displayMessage(QString("Light source position fixed to camera."), 3000);
980 }
982 }
983 else if (verbose)
984 {
985 {
986 displayMessage(QString("Light source position fixed to main scene."), 3000);
987 }
988 update();
989 }
990 };
bool myLightPositionFixToCamera
Definition Viewer3D.h:1643
void updateRelativeCameraFromLightPosition()
void updateLightCoordsFromCamera()

References DGtal::Viewer3D< TSpace, TKSpace >::myLightPositionFixToCamera, DGtal::Viewer3D< TSpace, TKSpace >::updateLightCoordsFromCamera(), and DGtal::Viewer3D< TSpace, TKSpace >::updateRelativeCameraFromLightPosition().

◆ setNearFar()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setNearFar ( double _near,
double _far )
inline

Set near and far distance, too near or too far end up not visible.

Parameters
_nearnear distance.
_farfar distance.

Definition at line 366 of file Viewer3D.h.

367 {
368 ZNear = _near; ZFar = _far;
369 }
double ZFar
zfar distance
Definition Viewer3D.h:1668
double ZNear
znear distance
Definition Viewer3D.h:1667

References DGtal::Viewer3D< TSpace, TKSpace >::ZFar, and DGtal::Viewer3D< TSpace, TKSpace >::ZNear.

◆ setUseGLPointForBalls()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::setUseGLPointForBalls ( bool useOpenGLPt)

Change the primitive to display ball (OpenGl points instead balls created with quads).

Parameters
[in]useOpenGLPtif true all points will be displayed with OpenGl points instead the default balls (defined from quads).

◆ show()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::show ( )
virtual

Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are well created in the particular case where show() is called at the end of the program).

Examples
dec/exampleDECSurface.cpp, dec/exampleDiscreteExteriorCalculusSolve.cpp, geometry/curves/exampleArithDSS3d.cpp, geometry/curves/exampleGridCurve3d-2.cpp, geometry/curves/exampleGridCurve3d.cpp, geometry/surfaces/dvcm-3d.cpp, geometry/volumes/digitalPolyhedronBuilder3D.cpp, geometry/volumes/distance/distancetransform3D.cpp, geometry/volumes/distance/exampleFMM3D.cpp, geometry/volumes/fullConvexityAnalysis3D.cpp, geometry/volumes/fullConvexityShortestPaths3D.cpp, geometry/volumes/fullConvexityThinning3D.cpp, geometry/volumes/standardDigitalPolyhedronBuilder3D.cpp, images/extract2DImagesFrom3DandVisu.cpp, io/digitalSetFromPointList.cpp, io/digitalSetFromVol.cpp, io/meshFromOFF.cpp, io/viewDualSurface.cpp, io/viewers/demo-kernel-2.cpp, io/viewers/viewer3D-1-points.cpp, io/viewers/viewer3D-2-sets.cpp, io/viewers/viewer3D-3-objects.cpp, io/viewers/viewer3D-4-modes.cpp, io/viewers/viewer3D-5-custom.cpp, io/viewers/viewer3D-6-clipping.cpp, io/viewers/viewer3D-7-planes.cpp, io/viewers/viewer3D-7-stdplane.cpp, io/viewers/viewer3D-7bis-planes.cpp, io/viewers/viewer3D-7bis-stdplane.cpp, io/viewers/viewer3D-8-2DSliceImages.cpp, io/viewers/viewer3D-8bis-2Dimages.cpp, io/viewers/viewer3D-9-3Dimages.cpp, shapes/exampleSurfaceMesh.cpp, shapes/mesh3DConstructionAndVisualisation.cpp, shapes/viewMarchingCubes.cpp, shapes/viewPolygonalMarchingCubes.cpp, topology/3dBorderExtraction.cpp, topology/3dBorderExtractionImg.cpp, topology/3dKSSurfaceExtraction.cpp, topology/digitalSurfaceSlice.cpp, topology/frontierAndBoundary.cpp, topology/homotopicThinning3D.cpp, topology/volBreadthFirstTraversal.cpp, and tutorial-examples/volDTGranulo.cpp.

Referenced by laplacian(), main(), TEST_CASE(), and testLocalConvolutionNormalVectorEstimator().

◆ sortPolygonFromCamera()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::sortPolygonFromCamera ( )

Sort all polygons from the camera.

◆ sortQuadFromCamera()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::sortQuadFromCamera ( )

Sort all triangle from the camera.

◆ sortSurfelFromCamera()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::sortSurfelFromCamera ( )

Sort all surfels from the camera.

◆ sortTriangleFromCamera()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::sortTriangleFromCamera ( )

Sort all triangle from the camera.

◆ translateAn2DDomain()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::translateAn2DDomain ( unsigned int domainIndex,
double xTranslation,
double yTranslation,
double zTranslation )

translate a 2D domain

Parameters
domainIndexthe index of the domain in the list
xTranslationx part of the translation vector
yTranslationy part of the translation vector
zTranslationz part of the translation vector

◆ updateAn2DDomainOrientation()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::updateAn2DDomainOrientation ( unsigned int imageIndex,
double xPosition,
double yPosition,
double zPosition,
ImageDirection newDirection )

update a 2D domain orientation

Parameters
imageIndexindex of the image in the list
xPositionthe x position
yPositionthe y position
zPositionthe z position
newDirectionthe new direction

◆ updateEmbeddingTextureImage()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::updateEmbeddingTextureImage ( unsigned int anImageIndex,
typename Space::Point aPoint1,
typename Space::Point aPoint2,
typename Space::Point aPoint3,
typename Space::Point aPoint4 )

Update the vertex coordinates of the image embedded in 3D.

Parameters
anImageIndexcorresponds to the chronoloigic index given by the fuction (addTextureImage).
aPoint1the new first point position embedded in 3D associated the lower point of the 2D image.
aPoint2the new second point position embedded in 3D (in CCW order).
aPoint3the new third point position embedded in 3D associated the upper point of the 2D image.
aPoint4the new fourth point position embedded in 3D (in CCW order).

◆ updateLightCoordsFromCamera()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::updateLightCoordsFromCamera ( )
private

Updates the light source coordinates (myLightPosition) from the camera relative coordinates (myLightPositionRefCamera). It could be useful when the light source position is fix according to camera position.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setLightModeFixToCamera().

◆ updateList()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::updateList ( bool needToUpdateBoundingBox = true)

Permit to update the OpenGL list to be displayed. Need to called after a number of addVoxel or after a sortSurfelFromCamera().

Parameters
needToUpdateBoundingBoxflag to update the bounding box

◆ updateOrientationTextureImage()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::updateOrientationTextureImage ( unsigned int imageIndex,
double xPosition,
double yPosition,
double zPosition,
ImageDirection newDirection )

Update the image parameters from std image (image buffer, vertex coordinates) The new image should be with same dimension than the original.

Parameters
imageIndexcorresponds to the chronoloigic index given by the fuction (addTextureImage).
xPositionthe image translation in the x direction (default 0).
yPositionthe image translation in the y direction (default 0).
zPositionthe image translation in the z direction (default 0).
newDirectiona new direction

◆ updateRelativeCameraFromLightPosition()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::updateRelativeCameraFromLightPosition ( )
private

Updates the camera relative light source coordinates (myLightPositionRefCamera) from the scene light coordinates (myLightPosition). It could be useful when the light source position is fix in the main scene.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setLightModeFixToCamera().

◆ updateRenderingCoefficients()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::updateRenderingCoefficients ( const RenderingMode aRenderMode,
bool displayState = true )

Change the current rendering mode of the viewer.

Parameters
[in]aRenderModethe mode of the rendering.
[in]displayStateif true (default) the viewer will display the current rendering mode.

◆ updateTextureImage()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
template<typename TImageType , typename TFunctor >
void DGtal::Viewer3D< TSpace, TKSpace >::updateTextureImage ( unsigned int imageIndex,
const TImageType & image,
const TFunctor & aFunctor,
double xTranslation = 0.0,
double yTranslation = 0.0,
double zTranslation = 0.0,
double rotationAngle = 0.0,
ImageDirection rotationDir = zDirection )

Update the image parameters from std image (image buffer, vertex coordinates) The new image should be with same dimension than the original.

Parameters
imageIndexcorresponds to the chronoloigic index given by the fuction (addTextureImage).
imagethe new image containing the new buffer (with same dimensions than the other image).
aFunctora functor
xTranslationthe image translation in the x direction (default 0).
yTranslationthe image translation in the y direction (default 0).
zTranslationthe image translation in the z direction (default 0).
rotationAnglethe angle of rotation.
rotationDirthe rotation is applied around the given direction.

Field Documentation

◆ camera_direction

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::camera_direction[3]
private

camera direction

Definition at line 1640 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setCameraDirection().

◆ camera_position

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::camera_position[3]
private

camera position

Definition at line 1639 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setCameraPosition().

◆ camera_upVector

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::camera_upVector[3]
private

camera up-vector

Definition at line 1641 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setCameraUpVector().

◆ myAutoSaveState

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::myAutoSaveState

flag to save automatically or not the Viewer3d state when closing the viewer

to improve the display of gl line

Definition at line 485 of file Viewer3D.h.

◆ myBallSetListId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myBallSetListId
private

Definition at line 1610 of file Viewer3D.h.

◆ myCubeSetListWiredId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myCubeSetListWiredId
private

Definition at line 1617 of file Viewer3D.h.

◆ myCubesMapId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myCubesMapId
private

Definition at line 1616 of file Viewer3D.h.

◆ myDefaultBackgroundColor

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
DGtal::Color DGtal::Viewer3D< TSpace, TKSpace >::myDefaultBackgroundColor

the default background color of the viewer

Definition at line 475 of file Viewer3D.h.

◆ myDefaultColor

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
DGtal::Color DGtal::Viewer3D< TSpace, TKSpace >::myDefaultColor

the default color of the viewer

Definition at line 477 of file Viewer3D.h.

◆ myDefaultRenderDiff

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myDefaultRenderDiff = 0.7f
private

Definition at line 1657 of file Viewer3D.h.

◆ myDefaultRenderSpec

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myDefaultRenderSpec = 0.3f
private

Definition at line 1656 of file Viewer3D.h.

◆ myDir

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
qglviewer::Vec DGtal::Viewer3D< TSpace, TKSpace >::myDir
private

Definition at line 1631 of file Viewer3D.h.

◆ myDirSelector

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
qglviewer::Vec DGtal::Viewer3D< TSpace, TKSpace >::myDirSelector
private

Definition at line 1631 of file Viewer3D.h.

◆ myExtension

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
Extension* DGtal::Viewer3D< TSpace, TKSpace >::myExtension
private

Stored a possible extension to the viewer (pointer owned).

Definition at line 1689 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::removeExtension(), and DGtal::Viewer3D< TSpace, TKSpace >::setExtension().

◆ myGLLineMinWidth

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::myGLLineMinWidth = 1.5

to improve the display of gl points

Definition at line 483 of file Viewer3D.h.

◆ myGLPointMinWidth

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::myGLPointMinWidth = 1.5

Definition at line 482 of file Viewer3D.h.

◆ myGLScaleFactorX

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
float DGtal::Viewer3D< TSpace, TKSpace >::myGLScaleFactorX =1.0
private

Definition at line 1674 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setGLScale().

◆ myGLScaleFactorY

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
float DGtal::Viewer3D< TSpace, TKSpace >::myGLScaleFactorY =1.0
private

Definition at line 1675 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setGLScale().

◆ myGLScaleFactorZ

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
float DGtal::Viewer3D< TSpace, TKSpace >::myGLScaleFactorZ =1.0
private

Definition at line 1676 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setGLScale().

◆ myGSImageList

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
std::vector<TextureImage> DGtal::Viewer3D< TSpace, TKSpace >::myGSImageList
private

flag to display the ligth source when it is moved by the user

Used to store all displayed images

Definition at line 1685 of file Viewer3D.h.

◆ myImageDomainList

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
std::vector<Image2DDomainD3D> DGtal::Viewer3D< TSpace, TKSpace >::myImageDomainList
private

Used to store all the domains.

Definition at line 1687 of file Viewer3D.h.

◆ myIsBackgroundDefault

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::myIsBackgroundDefault

true if the background is default

Definition at line 479 of file Viewer3D.h.

◆ myIsDoubleFaceRendering

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::myIsDoubleFaceRendering = true
private

true if is double face rendering

Definition at line 1637 of file Viewer3D.h.

◆ myIsMovingLight

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::myIsMovingLight
private

the reference mouse y-position used to determince the light position change (inclination)

Definition at line 1682 of file Viewer3D.h.

◆ myLambertRenderDiff

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLambertRenderDiff = 0.9f
private

Definition at line 1659 of file Viewer3D.h.

◆ myLambertRenderSpec

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLambertRenderSpec = 0.0f
private

Definition at line 1658 of file Viewer3D.h.

◆ myLightAmbientCoeffs

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLightAmbientCoeffs[4] = { 0.0f, 0.0f, 0.0f, 1.0f }
private

Definition at line 1653 of file Viewer3D.h.

1653{ 0.0f, 0.0f, 0.0f, 1.0f }; // the material ambient coefficients used in opengl rendering

◆ myLightDiffuseCoeffs

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLightDiffuseCoeffs[4] = { 0.7f, 0.7f, 0.7f, 1.0f }
private

Definition at line 1654 of file Viewer3D.h.

1654{ 0.7f, 0.7f, 0.7f, 1.0f }; // the material diffuse coefficients used in opengl rendering

◆ myLightPhi

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::myLightPhi
private

the light position (inclination)

Definition at line 1645 of file Viewer3D.h.

◆ myLightPosition

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLightPosition[4] = {0.0f, 0.0f, 1.0f, 1.0f}
private

the light position (distance)

Definition at line 1647 of file Viewer3D.h.

1647{0.0f, 0.0f, 1.0f, 1.0f}; // the light position in cartesian coordinate

◆ myLightPositionFixToCamera

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::myLightPositionFixToCamera = true
private

◆ myLightPositionRefCamera

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLightPositionRefCamera[3] = {0.0f, 0.0f, 0.0f}
private

Definition at line 1649 of file Viewer3D.h.

1649{0.0f, 0.0f, 0.0f}; // the light position according to the camera position

◆ myLightPositionRefCameraDefault

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLightPositionRefCameraDefault[3] = {-100.0f, 100.0f, 0.0f}
private

Definition at line 1648 of file Viewer3D.h.

1648{-100.0f, 100.0f, 0.0f}; // the light default position according to the camera position

◆ myLightR

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::myLightR
private

the light position (azimuth)

Definition at line 1646 of file Viewer3D.h.

◆ myLightSpecularCoeffs

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myLightSpecularCoeffs[4] = { 0.3f, 0.3f, 0.3f, 1.0f }
private

Definition at line 1652 of file Viewer3D.h.

1652{ 0.3f, 0.3f, 0.3f, 1.0f }; // the light specular coefficients used in opengl rendering

◆ myLightTheta

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::myLightTheta
private

Definition at line 1644 of file Viewer3D.h.

◆ myLigthRotationStep

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::myLigthRotationStep
private

Definition at line 1679 of file Viewer3D.h.

◆ myLineSetListId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myLineSetListId
private

Definition at line 1609 of file Viewer3D.h.

◆ myMaterialShininessCoeff

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myMaterialShininessCoeff[1] = {50.0f}
private

Definition at line 1650 of file Viewer3D.h.

1650{50.0f} ; // the material shininess coefficient used in opengl rendering

◆ myMaterialSpecularCoeffs

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myMaterialSpecularCoeffs[4] = { 1.0f, 1.0f, 1.0f, 1.0f }
private

Definition at line 1651 of file Viewer3D.h.

1651{ 1.0f, 1.0f, 1.0f, 1.0f }; // the light specular coefficients used in opengl rendering

◆ myMeshDefaultLineWidth

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
float DGtal::Viewer3D< TSpace, TKSpace >::myMeshDefaultLineWidth
private

Definition at line 1671 of file Viewer3D.h.

◆ myMetallicRenderDiff

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myMetallicRenderDiff = 0.5f
private

Definition at line 1661 of file Viewer3D.h.

◆ myMetallicRenderSpec

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myMetallicRenderSpec = 0.5f
private

Definition at line 1660 of file Viewer3D.h.

◆ myNbBallSetList

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
unsigned int DGtal::Viewer3D< TSpace, TKSpace >::myNbBallSetList
private

Definition at line 1623 of file Viewer3D.h.

◆ myNbLineSetList

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
unsigned int DGtal::Viewer3D< TSpace, TKSpace >::myNbLineSetList
private

Definition at line 1622 of file Viewer3D.h.

◆ myNbListe

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
unsigned int DGtal::Viewer3D< TSpace, TKSpace >::myNbListe
private

number of lists in myListToAff

Definition at line 1621 of file Viewer3D.h.

◆ myNbPrismSetList

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
unsigned int DGtal::Viewer3D< TSpace, TKSpace >::myNbPrismSetList
private

Definition at line 1624 of file Viewer3D.h.

◆ myOrig

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
qglviewer::Vec DGtal::Viewer3D< TSpace, TKSpace >::myOrig
private

information linked to the navigation in the viewer

Definition at line 1631 of file Viewer3D.h.

◆ myPlasticRenderDiff

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myPlasticRenderDiff = 0.2f
private

Definition at line 1663 of file Viewer3D.h.

◆ myPlasticRenderSpec

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
const GLfloat DGtal::Viewer3D< TSpace, TKSpace >::myPlasticRenderSpec = 0.8f
private

Definition at line 1662 of file Viewer3D.h.

◆ myPolygonSetListId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myPolygonSetListId
private

Definition at line 1606 of file Viewer3D.h.

◆ myPolygonSetListWiredId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myPolygonSetListWiredId
private

Definition at line 1607 of file Viewer3D.h.

◆ myPosSelector

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
QPoint DGtal::Viewer3D< TSpace, TKSpace >::myPosSelector
private

a point selected with postSelection

See also
postSelection

Definition at line 1633 of file Viewer3D.h.

◆ myPrismListId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myPrismListId
private

Definition at line 1611 of file Viewer3D.h.

◆ myQuadsMapId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myQuadsMapId
private

Definition at line 1613 of file Viewer3D.h.

◆ myQuadsMapWiredId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myQuadsMapWiredId
private

Definition at line 1614 of file Viewer3D.h.

◆ myRefMouseXPos

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
int DGtal::Viewer3D< TSpace, TKSpace >::myRefMouseXPos
private

the angle rotation increment used for interactive light move

Definition at line 1680 of file Viewer3D.h.

◆ myRefMouseYPos

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
int DGtal::Viewer3D< TSpace, TKSpace >::myRefMouseYPos
private

the reference mouse x-position used to determince the light position change (azimuth)

Definition at line 1681 of file Viewer3D.h.

◆ myRenderingMode

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
RenderingMode DGtal::Viewer3D< TSpace, TKSpace >::myRenderingMode = RenderingDefault

Definition at line 487 of file Viewer3D.h.

◆ mySelectedElementId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
int DGtal::Viewer3D< TSpace, TKSpace >::mySelectedElementId = -1
private

used to displayed selected elements

Definition at line 1627 of file Viewer3D.h.

◆ mySelectedPoint

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
qglviewer::Vec DGtal::Viewer3D< TSpace, TKSpace >::mySelectedPoint
private

Definition at line 1631 of file Viewer3D.h.

◆ mySelectionColorShift

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
unsigned char DGtal::Viewer3D< TSpace, TKSpace >::mySelectionColorShift = 150
private

Definition at line 1628 of file Viewer3D.h.

◆ myTriangleSetListId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myTriangleSetListId
private

lists of the list to draw

Definition at line 1603 of file Viewer3D.h.

◆ myTriangleSetListWiredId

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< TSpace, TKSpace >::myTriangleSetListWiredId
private

Definition at line 1604 of file Viewer3D.h.

◆ myUseGLPointsForBalls

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::myUseGLPointsForBalls = false
private

Definition at line 1665 of file Viewer3D.h.

◆ myVectTextureImage

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
std::vector<GLTextureImage> DGtal::Viewer3D< TSpace, TKSpace >::myVectTextureImage
private

list of the images textures in this viewer

Definition at line 1635 of file Viewer3D.h.

◆ myViewWire

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::myViewWire

objects have shadows which follow the camera if false

Definition at line 481 of file Viewer3D.h.

◆ ZFar

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::ZFar
private

zfar distance

Definition at line 1668 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setNearFar().

◆ ZNear

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< TSpace, TKSpace >::ZNear
private

znear distance

Definition at line 1667 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< TSpace, TKSpace >::setNearFar().


The documentation for this class was generated from the following file: