DGtal  0.9.3beta
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
DGtal::Viewer3D< Space, KSpace > Class Template Reference

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

Inheritance diagram for DGtal::Viewer3D< Space, KSpace >:
[legend]
Collaboration diagram for DGtal::Viewer3D< Space, KSpace >:
[legend]

Data Structures

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

Public Types

enum  RenderingMode { RenderingDefault, RenderingMetallic, RenderingPlastic, RenderingLambertian }
 
enum  ImageDirection { xDirection, yDirection, zDirection, undefDirection }
 
enum  TextureMode { RGBMode, GrayScaleMode }
 
typedef Display3D< Space, KSpace > Display
 
typedef Display::SelectCallbackFct SelectCallbackFct
 
typedef Display::RealPoint RealPoint
 
- Public Types inherited from DGtal::Display3D< Space, KSpace >
enum  StreamKey { addNewList, updateDisplay, shiftSurfelVisu }
 
typedef Display3D< Space, KSpace > Self
 
typedef Space::RealPoint RealPoint
 
typedef Space::RealVector RealVector
 
typedef CanonicEmbedder< Space > Embedder
 
typedef CanonicCellEmbedder< KSpace > CellEmbedder
 
typedef CanonicSCellEmbedder< KSpace > SCellEmbedder
 
typedef int(* SelectCallbackFct) (void *viewer, DGtal::int32_t name, void *data)
 
typedef std::map< DGtal::int32_t, std::vector< QuadD3D > > QuadsMap
 
typedef std::map< DGtal::int32_t, std::vector< CubeD3D > > CubesMap
 
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 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 ()
 
virtual void show ()
 
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 >::LineD3Dcompute2DDomainLineRepresentation (Image2DDomainD3D &anImageDomain, double delta)
 
std::vector< typename DGtal::Viewer3D< Space, KSpace >::LineD3Dcompute2DDomainLineRepresentation (Image2DDomainD3D &anImageDomain)
 
void rotateLineD3D (typename DGtal::Display3D< Space, KSpace >::LineD3D &aLine, DGtal::PointVector< 3, int > pt, double angleRotation, ImageDirection dirRotation)
 
void rotateDomain (Image2DDomainD3D &anDom, double angle, ImageDirection rotationDir)
 
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 ()
 
virtual void draw ()
 
virtual void init ()
 
virtual QString helpString () const
 
virtual void postSelection (const QPoint &point)
 
virtual QDomElement domElement (const QString &name, QDomDocument &document) const
 
virtual void initFromDOMElement (const QDomElement &element)
 
- 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
 
 Display3D (Display3D &&)=delete
 
Display3Doperator= (const Display3D &)=delete
 
Display3Doperator= (Display3D &&)=delete
 
const Embedderembedder () const
 
const CellEmbeddercellEmbedder () const
 
const SCellEmbeddersCellEmbedder () const
 
const KSpace & space () 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
 
DGtal::Color myDefaultColor
 
bool myIsBackgroundDefault
 
bool myViewWire
 
double myGLPointMinWidth = 1.5
 
double myGLLineMinWidth = 1.5
 
bool myAutoSaveState
 
RenderingMode myRenderingMode = RenderingDefault
 
- Data Fields inherited from DGtal::Display3D< Space, KSpace >
ModeMapping myModes
 
StyleMapping myStyles
 
bool myBoundingPtEmptyTag
 
double myBoundingPtUp [3]
 
double myBoundingPtLow [3]
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *e)
 

Private Types

typedef std::vector< typename Viewer3D< Space, KSpace >::CubeD3DVectorCubes
 
typedef std::vector< typename Viewer3D< Space, KSpace >::QuadD3DVectorQuad
 
typedef std::vector< typename Viewer3D< Space, KSpace >::LineD3DVectorLine
 
typedef std::vector< typename Viewer3D< Space, KSpace >::BallD3DVectorBall
 
typedef std::vector< typename Viewer3D< Space, KSpace >::TriangleD3DVectorTriangle
 
typedef std::vector< typename Viewer3D< Space, KSpace >::PolygonD3DVectorPolygon
 
typedef std::vector< typename Viewer3D< Space, KSpace >::TextureImageVectorTextureImage
 
typedef VectorCubes::iterator ItCube
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< Space >))
 
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 updateLightCoordsFromCamera ()
 
void updateRelativeCameraFromLightPosition ()
 

Private Attributes

GLuint myTriangleSetListId
 
GLuint myTriangleSetListWiredId
 
GLuint myPolygonSetListId
 
GLuint myPolygonSetListWiredId
 
GLuint myLineSetListId
 
GLuint myBallSetListId
 
GLuint myPrismListId
 
GLuint myQuadsMapId
 
GLuint myQuadsMapWiredId
 
GLuint myCubesMapId
 
GLuint myCubeSetListWiredId
 
unsigned int myNbListe
 
unsigned int myNbLineSetList
 
unsigned int myNbBallSetList
 
unsigned int myNbPrismSetList
 
int mySelectedElementId = -1
 
unsigned char mySelectionColorShift = 150
 
qglviewer::Vec myOrig
 
qglviewer::Vec myDir
 
qglviewer::Vec myDirSelector
 
qglviewer::Vec mySelectedPoint
 
QPoint myPosSelector
 
std::vector< GLTextureImagemyVectTextureImage
 
bool myIsDoubleFaceRendering = true
 
double camera_position [3]
 
double camera_direction [3]
 
double camera_upVector [3]
 
bool myLightPositionFixToCamera = true
 
double myLightTheta
 
double myLightPhi
 
double myLightR
 
GLfloat myLightPosition [4] = {0.0f, 0.0f, 1.0f, 1.0f}
 
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
 
double ZFar
 
float myMeshDefaultLineWidth
 
float myGLScaleFactorX =1.0
 
float myGLScaleFactorY =1.0
 
float myGLScaleFactorZ =1.0
 
double myLigthRotationStep
 
int myRefMouseXPos
 
int myRefMouseYPos
 
bool myIsMovingLight
 
std::vector< TextureImagemyGSImageList
 
std::vector< Image2DDomainD3DmyImageDomainList
 

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
 
EmbeddermyEmbedder
 
CellEmbeddermyCellEmbedder
 
SCellEmbeddermySCellEmbedder
 
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
 
std::vector< std::vector< PolygonD3D > > myPolygonSetList
 
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
 

Detailed Description

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
class DGtal::Viewer3D< Space, KSpace >

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();

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
Spaceany model of Digital 3D Space
KSpaceany 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/distance/distancetransform3D.cpp, geometry/volumes/distance/exampleFMM3D.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-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/mesh3DConstructionAndVisualisation.cpp, topology/3dBorderExtraction.cpp, topology/3dBorderExtractionImg.cpp, topology/3dKSSurfaceExtraction.cpp, topology/ctopo-1-3d.cpp, topology/ctopo-1s-3d.cpp, topology/ctopo-2-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 132 of file Viewer3D.h.

Member Typedef Documentation

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

Definition at line 142 of file Viewer3D.h.

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

Definition at line 1207 of file Viewer3D.h.

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

Definition at line 145 of file Viewer3D.h.

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

Definition at line 143 of file Viewer3D.h.

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

Definition at line 1201 of file Viewer3D.h.

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

Type associated to the special intern method GLCreateCubeSetList.

Definition at line 1198 of file Viewer3D.h.

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

Definition at line 1200 of file Viewer3D.h.

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

Definition at line 1203 of file Viewer3D.h.

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

Definition at line 1199 of file Viewer3D.h.

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

Definition at line 1204 of file Viewer3D.h.

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

Definition at line 1202 of file Viewer3D.h.

Member Enumeration Documentation

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
enum DGtal::Viewer3D::ImageDirection

the 3 possible axes for the image direction

Enumerator
xDirection 
yDirection 
zDirection 
undefDirection 

Definition at line 309 of file Viewer3D.h.

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

Definition at line 147 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
enum DGtal::Viewer3D::TextureMode

the modes of representation of an image

Enumerator
RGBMode 
GrayScaleMode 

Definition at line 311 of file Viewer3D.h.

Constructor & Destructor Documentation

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
DGtal::Viewer3D< Space, KSpace >::Viewer3D ( )
inline

Constructor

Definition at line 155 of file Viewer3D.h.

155  :QGLViewer(), Display3D<Space, KSpace>()
156  {
157  resize(800,600);
158  };
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
DGtal::Viewer3D< Space, KSpace >::Viewer3D ( const KSpace &  KSEmb)
inline

Constructor with a khalimsky space

Parameters
KSEmbthe Khalimsky space

Definition at line 164 of file Viewer3D.h.

164  :QGLViewer(), Display3D<Space,KSpace>(KSEmb)
165  {
166  resize(800,600);
167  }

Member Function Documentation

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
template<typename TDomain >
void DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
DGtal::Viewer3D< Space, KSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< Space >)  )
private
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
std::vector<typename DGtal::Viewer3D< Space , KSpace >::LineD3D> DGtal::Viewer3D< Space, KSpace >::compute2DDomainLineRepresentation ( Image2DDomainD3D anImageDomain,
double  delta 
)

compute2DDomainLineRepresentation

Parameters
anImageDomainthe image domain
deltathe delte for computing
Returns
the vector containing the line domain representation.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
std::vector<typename DGtal::Viewer3D< Space , KSpace >::LineD3D> DGtal::Viewer3D< Space, KSpace >::compute2DDomainLineRepresentation ( Image2DDomainD3D anImageDomain)

compute2DDomainLineRepresentation

Parameters
anImageDomainthe image domain
Returns
the vector containing the line domain representation.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual QDomElement DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::draw ( )
virtual

draw

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

drawWithNames

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual unsigned int DGtal::Viewer3D< Space, KSpace >::getCurrentDomainNumber ( )
virtual
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual unsigned int DGtal::Viewer3D< Space, KSpace >::getCurrentGLImageNumber ( )
virtual
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::glDrawGLBall ( const typename Viewer3D< Space, KSpace >::BallD3D aBall)

Draw a ball by using quads strip primitive.

Parameters
[in]aBallthe ball to be drawn
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::glUpdateLightRenderingMode ( ) const
private

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

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

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

Parameters
[in]aVectImagethe vector containing
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual QString DGtal::Viewer3D< Space, KSpace >::helpString ( ) const
virtual
Returns
astring corresponding to the help of the viewer (list of commands, etc)
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::init ( )
virtual

init

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< Space, KSpace >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::mouseMoveEvent ( QMouseEvent *  e)
virtual

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

Parameters
ethe QMouseEvent
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::mousePressEvent ( QMouseEvent *  e)
virtual

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

Parameters
ethe QMouseEvent
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::mouseReleaseEvent ( QMouseEvent *  e)
virtual

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

Parameters
ethe QMouseEvent
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
Viewer3D<Space, KSpace>& DGtal::Viewer3D< Space, KSpace >::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'.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
Viewer3D<Space, KSpace>& DGtal::Viewer3D< Space, KSpace >::operator<< ( const typename Viewer3D< Space, KSpace >::StreamKey key)

Set the default color for future drawing.

Parameters
keya stream key
Returns
a reference on 'this'.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
template<typename TDrawableWithViewer3D >
Viewer3D<Space, KSpace>& DGtal::Viewer3D< Space, KSpace >::operator<< ( const TDrawableWithViewer3D< Space, KSpace > &  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'.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::paintGL ( )
virtual

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

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

postSelection

Parameters
pointa point
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
template<typename TImageORDomain >
static void DGtal::Viewer3D< Space, KSpace >::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 1366 of file Viewer3D.h.

1366  {
1367  double xB = (anImageOrDom.point1[0]+anImageOrDom.point2[0]+anImageOrDom.point3[0]+anImageOrDom.point4[0])/4.0;
1368  double yB = (anImageOrDom.point1[1]+anImageOrDom.point2[1]+anImageOrDom.point3[1]+anImageOrDom.point4[1])/4.0;
1369  double zB = (anImageOrDom.point1[2]+anImageOrDom.point2[2]+anImageOrDom.point3[2]+anImageOrDom.point4[2])/4.0;
1370  rotatePoint( anImageOrDom.point1[0], anImageOrDom.point1[1], anImageOrDom.point1[2], xB, yB, zB, angle, rotationDir);
1371  rotatePoint( anImageOrDom.point2[0], anImageOrDom.point2[1], anImageOrDom.point2[2], xB, yB, zB, angle, rotationDir);
1372  rotatePoint( anImageOrDom.point3[0], anImageOrDom.point3[1], anImageOrDom.point3[2], xB, yB, zB, angle, rotationDir);
1373  rotatePoint( anImageOrDom.point4[0], anImageOrDom.point4[1], anImageOrDom.point4[2], xB, yB, zB, angle, rotationDir);
1374 
1375  }
static void rotatePoint(TValues &x, TValues &y, TValues &z, double cx, double cy, double cz, double rotationAngle, ImageDirection rotationDir)
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::rotateLineD3D ( typename DGtal::Display3D< Space, KSpace >::LineD3D aLine,
DGtal::PointVector< 3, int >  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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
template<typename TValues >
static void DGtal::Viewer3D< Space, KSpace >::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< DGtal::SpaceND, KSpace >::rotateImageVertex().

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

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::setCameraDirection ( double  ax,
double  ay,
double  az 
)
inline

Set camera direction.

Parameters
axx direction.
ayy direction.
azz direction.

Definition at line 186 of file Viewer3D.h.

187  {
188  camera_direction[0] = ax; camera_direction[1] = ay; camera_direction[2] = az;
189  }
double camera_direction[3]
camera direction
Definition: Viewer3D.h:1443
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::setCameraPosition ( double  ax,
double  ay,
double  az 
)
inline

Set camera position.

Parameters
axx position.
ayy position.
azz position.

Definition at line 175 of file Viewer3D.h.

176  {
177  camera_position[0] = ax; camera_position[1] = ay; camera_position[2] = az;
178  }
double camera_position[3]
camera position
Definition: Viewer3D.h:1442
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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 197 of file Viewer3D.h.

198  {
199  camera_upVector[0] = ax; camera_upVector[1] = ay; camera_upVector[2] = az;
200  }
double camera_upVector[3]
camera up-vector
Definition: Viewer3D.h:1444
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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}).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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}).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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}).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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 221 of file Viewer3D.h.

222  {
223  myGLScaleFactorX=sx;
224  myGLScaleFactorY=sy;
225  myGLScaleFactorZ=sz;
226  }
float myGLScaleFactorX
Definition: Viewer3D.h:1477
float myGLScaleFactorZ
Definition: Viewer3D.h:1479
float myGLScaleFactorY
Definition: Viewer3D.h:1478
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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 207 of file Viewer3D.h.

208  {
209  ZNear = _near; ZFar = _far;
210  }
double ZNear
znear distance
Definition: Viewer3D.h:1470
double ZFar
zfar distance
Definition: Viewer3D.h:1471
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< Space, KSpace >::show ( )
virtual
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::sortPolygonFromCamera ( )

Sort all polygons from the camera.

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

Sort all triangle from the camera.

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

Sort all surfels from the camera.

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

Sort all triangle from the camera.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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).
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< Space, KSpace >::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.
template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
template<typename TImageType , typename TFunctor >
void DGtal::Viewer3D< Space, KSpace >::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

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

camera direction

Definition at line 1443 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setCameraDirection().

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

camera position

Definition at line 1442 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setCameraPosition().

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

camera up-vector

Definition at line 1444 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setCameraUpVector().

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< Space, KSpace >::myAutoSaveState

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

to improve the display of gl line

Definition at line 324 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myBallSetListId
private

Definition at line 1413 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myCubeSetListWiredId
private

Definition at line 1420 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myCubesMapId
private

Definition at line 1419 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
DGtal::Color DGtal::Viewer3D< Space, KSpace >::myDefaultBackgroundColor

the default background color of the viewer

Definition at line 314 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
DGtal::Color DGtal::Viewer3D< Space, KSpace >::myDefaultColor

the default color of the viewer

Definition at line 316 of file Viewer3D.h.

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

Definition at line 1460 of file Viewer3D.h.

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

Definition at line 1459 of file Viewer3D.h.

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

Definition at line 1434 of file Viewer3D.h.

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

Definition at line 1434 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::myGLLineMinWidth = 1.5

to improve the display of gl points

Definition at line 322 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::myGLPointMinWidth = 1.5

Definition at line 321 of file Viewer3D.h.

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

Definition at line 1477 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setGLScale().

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

Definition at line 1478 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setGLScale().

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

Definition at line 1479 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setGLScale().

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

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

Used to store all displayed images

Definition at line 1488 of file Viewer3D.h.

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

Used to store all the domains.

Definition at line 1490 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< Space, KSpace >::myIsBackgroundDefault

true if the background is default

Definition at line 318 of file Viewer3D.h.

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

true if is double face rendering

Definition at line 1440 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< Space, KSpace >::myIsMovingLight
private

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

Definition at line 1485 of file Viewer3D.h.

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

Definition at line 1462 of file Viewer3D.h.

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

Definition at line 1461 of file Viewer3D.h.

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

Definition at line 1456 of file Viewer3D.h.

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

Definition at line 1457 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::myLightPhi
private

the light position (inclination)

Definition at line 1448 of file Viewer3D.h.

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

the light position (distance)

Definition at line 1450 of file Viewer3D.h.

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

Definition at line 1446 of file Viewer3D.h.

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

Definition at line 1452 of file Viewer3D.h.

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

Definition at line 1451 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::myLightR
private

the light position (azimuth)

Definition at line 1449 of file Viewer3D.h.

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

Definition at line 1455 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::myLightTheta
private

Definition at line 1447 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::myLigthRotationStep
private

Definition at line 1482 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myLineSetListId
private

Definition at line 1412 of file Viewer3D.h.

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

Definition at line 1453 of file Viewer3D.h.

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

Definition at line 1454 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
float DGtal::Viewer3D< Space, KSpace >::myMeshDefaultLineWidth
private

Definition at line 1474 of file Viewer3D.h.

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

Definition at line 1464 of file Viewer3D.h.

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

Definition at line 1463 of file Viewer3D.h.

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

Definition at line 1426 of file Viewer3D.h.

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

Definition at line 1425 of file Viewer3D.h.

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

number of lists in myListToAff

Definition at line 1424 of file Viewer3D.h.

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

Definition at line 1427 of file Viewer3D.h.

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

information linked to the navigation in the viewer

Definition at line 1434 of file Viewer3D.h.

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

Definition at line 1466 of file Viewer3D.h.

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

Definition at line 1465 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myPolygonSetListId
private

Definition at line 1409 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myPolygonSetListWiredId
private

Definition at line 1410 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
QPoint DGtal::Viewer3D< Space, KSpace >::myPosSelector
private

a point selected with postSelection

See also
postSelection

Definition at line 1436 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myPrismListId
private

Definition at line 1414 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myQuadsMapId
private

Definition at line 1416 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myQuadsMapWiredId
private

Definition at line 1417 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
int DGtal::Viewer3D< Space, KSpace >::myRefMouseXPos
private

the angle rotation increment used for interactive light move

Definition at line 1483 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
int DGtal::Viewer3D< Space, KSpace >::myRefMouseYPos
private

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

Definition at line 1484 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
RenderingMode DGtal::Viewer3D< Space, KSpace >::myRenderingMode = RenderingDefault

Definition at line 326 of file Viewer3D.h.

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

used to displayed selected elements

Definition at line 1430 of file Viewer3D.h.

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

Definition at line 1434 of file Viewer3D.h.

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

Definition at line 1431 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myTriangleSetListId
private

lists of the list to draw

Definition at line 1406 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
GLuint DGtal::Viewer3D< Space, KSpace >::myTriangleSetListWiredId
private

Definition at line 1407 of file Viewer3D.h.

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

Definition at line 1468 of file Viewer3D.h.

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

list of the images textures in this viewer

Definition at line 1438 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< Space, KSpace >::myViewWire

objects have shadows which follow the camera if false

Definition at line 320 of file Viewer3D.h.

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::ZFar
private

zfar distance

Definition at line 1471 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setNearFar().

template<typename Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
double DGtal::Viewer3D< Space, KSpace >::ZNear
private

znear distance

Definition at line 1470 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< DGtal::SpaceND, KSpace >::setNearFar().


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