DGtal  0.9.4beta
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< TSpace, TKSpace > Class Template Reference

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

Inheritance diagram for DGtal::Viewer3D< TSpace, TKSpace >:
[legend]
Collaboration 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 }
 
enum  TextureMode { RGBMode, GrayScaleMode }
 
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< TSpace, TKSpace >
enum  StreamKey
 
typedef Display3D< TSpace, TKSpace > Self
 
typedef TSpace::RealPoint RealPoint
 
typedef TSpace::RealVector RealVector
 
typedef CanonicEmbedder< TSpace > Embedder
 
typedef CanonicCellEmbedder< TKSpace > CellEmbedder
 
typedef CanonicSCellEmbedder< TKSpace > 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 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 ()
 
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 >::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 drawSomeLight (GLenum light) const
 
void drawSomeLight (GLenum light, float zoom) const
 
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< TSpace, TKSpace >
 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
virtual ~Display3D ()
 
 Display3D (const TKSpace &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 TKSpace & 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 TKSpace &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
 
Display3Doperator<< (const TDrawableWithDisplay3D &object)
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
void clear ()
 
RealPoint embed (const typename TSpace::Point &dp) const
 
RealPoint embedKS (const typename TKSpace::SCell &cell) const
 
RealPoint embedKS (const DGtal::TransformedPrism &aTrans) const
 
RealPoint embedK (const typename TKSpace::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< TSpace, TKSpace >
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 >::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 >::TextureImageVectorTextureImage
 
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
 
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
 
ExtensionmyExtension
 

Additional Inherited Members

- Static Protected Member Functions inherited from DGtal::Display3D< TSpace, TKSpace >
static void cross (double dst[3], double srcA[3], double srcB[3])
 
static void normalize (double vec[3])
 
- Protected Attributes inherited from DGtal::Display3D< TSpace, TKSpace >
TKSpace 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< ClippingPlaneD3D > myClippingPlaneList
 
std::vector< QuadD3D > myPrismList
 
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< SelectCallbackFctStore > mySelectCallBackFcts
 
bool myBoundingPtChangedTag
 

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

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, geometry/curves/exampleArithDSS3d.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-11-extension.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-8bis-2Dimages.cpp, io/viewers/viewer3D-9-3Dimages.cpp, shapes/mesh3DConstructionAndVisualisation.cpp, topology/3dBorderExtraction.cpp, topology/3dBorderExtractionImg.cpp, topology/3dKSSurfaceExtraction.cpp, topology/ctopo-2-3d.cpp, topology/digitalSurfaceSlice.cpp, topology/frontierAndBoundary.cpp, topology/homotopicThinning3D.cpp, topology/volBreadthFirstTraversal.cpp, topology/volScanBoundary.cpp, topology/volTrackBoundary.cpp, and tutorial-examples/volDTGranulo.cpp.

Definition at line 132 of file Viewer3D.h.

Member Typedef Documentation

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

Definition at line 144 of file Viewer3D.h.

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

Definition at line 1376 of file Viewer3D.h.

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

Definition at line 142 of file Viewer3D.h.

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

Definition at line 146 of file Viewer3D.h.

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

Definition at line 145 of file Viewer3D.h.

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

Definition at line 143 of file Viewer3D.h.

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

Definition at line 141 of file Viewer3D.h.

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 1370 of file Viewer3D.h.

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 1367 of file Viewer3D.h.

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 1369 of file Viewer3D.h.

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 1372 of file Viewer3D.h.

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 1368 of file Viewer3D.h.

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 1373 of file Viewer3D.h.

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 1371 of file Viewer3D.h.

Member Enumeration Documentation

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 469 of file Viewer3D.h.

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

Definition at line 149 of file Viewer3D.h.

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 471 of file Viewer3D.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 293 of file Viewer3D.h.

293  : QGLViewer(), Display3D<Space, KSpace>(), myExtension( 0 )
294  {
295  resize( 800, 600 );
296  };
Extension * myExtension
Stored a possible extension to the viewer (pointer owned).
Definition: Viewer3D.h:1665
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 302 of file Viewer3D.h.

303  : QGLViewer(), Display3D<Space, KSpace>( KSEmb ), myExtension( 0 )
304  {
305  resize(800,600);
306  }
Extension * myExtension
Stored a possible extension to the viewer (pointer owned).
Definition: Viewer3D.h:1665

Member Function Documentation

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
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.
template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
DGtal::Viewer3D< TSpace, TKSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
private
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.
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.
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.
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
template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::draw ( )
virtual

draw

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 976 of file Viewer3D.h.

977  {
978  QGLViewer::drawLight( light );
979  }
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 981 of file Viewer3D.h.

982  {
983  QGLViewer::drawLight( light, zoom );
984  }
template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::drawWithNames ( )
virtual

drawWithNames

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual unsigned int DGtal::Viewer3D< TSpace, TKSpace >::getCurrentDomainNumber ( )
virtual
template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual unsigned int DGtal::Viewer3D< TSpace, TKSpace >::getCurrentGLImageNumber ( )
virtual
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).
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).
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).
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.
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.
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).
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).
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).
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.
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.
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
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)

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.

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
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)
template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::init ( )
virtual

init

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
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.
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
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
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
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
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'.
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'.
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'.
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).

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

postSelection

Parameters
pointa point
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 320 of file Viewer3D.h.

321  {
322  if ( myExtension != 0 )
323  delete myExtension;
324  myExtension = 0;
325  }
Extension * myExtension
Stored a possible extension to the viewer (pointer owned).
Definition: Viewer3D.h:1665
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.
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 1539 of file Viewer3D.h.

1539  {
1540  double xB = (anImageOrDom.point1[0]+anImageOrDom.point2[0]+anImageOrDom.point3[0]+anImageOrDom.point4[0])/4.0;
1541  double yB = (anImageOrDom.point1[1]+anImageOrDom.point2[1]+anImageOrDom.point3[1]+anImageOrDom.point4[1])/4.0;
1542  double zB = (anImageOrDom.point1[2]+anImageOrDom.point2[2]+anImageOrDom.point3[2]+anImageOrDom.point4[2])/4.0;
1543  rotatePoint( anImageOrDom.point1[0], anImageOrDom.point1[1], anImageOrDom.point1[2], xB, yB, zB, angle, rotationDir);
1544  rotatePoint( anImageOrDom.point2[0], anImageOrDom.point2[1], anImageOrDom.point2[2], xB, yB, zB, angle, rotationDir);
1545  rotatePoint( anImageOrDom.point3[0], anImageOrDom.point3[1], anImageOrDom.point3[2], xB, yB, zB, angle, rotationDir);
1546  rotatePoint( anImageOrDom.point4[0], anImageOrDom.point4[1], anImageOrDom.point4[2], xB, yB, zB, angle, rotationDir);
1547 
1548  }
static void rotatePoint(TValues &x, TValues &y, TValues &z, double cx, double cy, double cz, double rotationAngle, ImageDirection rotationDir)
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.
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< Space, KSpace >::rotateImageVertex().

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.
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 344 of file Viewer3D.h.

345  {
346  camera_direction[0] = ax; camera_direction[1] = ay; camera_direction[2] = az;
347  }
double camera_direction[3]
camera direction
Definition: Viewer3D.h:1616
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 333 of file Viewer3D.h.

334  {
335  camera_position[0] = ax; camera_position[1] = ay; camera_position[2] = az;
336  }
double camera_position[3]
camera position
Definition: Viewer3D.h:1615
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 355 of file Viewer3D.h.

356  {
357  camera_upVector[0] = ax; camera_upVector[1] = ay; camera_upVector[2] = az;
358  }
double camera_upVector[3]
camera up-vector
Definition: Viewer3D.h:1617
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 311 of file Viewer3D.h.

312  {
313  if ( myExtension != 0 )
314  delete myExtension;
315  myExtension = ext;
316  }
Extension * myExtension
Stored a possible extension to the viewer (pointer owned).
Definition: Viewer3D.h:1665
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.
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}).
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}).
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}).
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).
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 379 of file Viewer3D.h.

380  {
381  myGLScaleFactorX=sx;
382  myGLScaleFactorY=sy;
383  myGLScaleFactorZ=sz;
384  // In order to have the light source rendering the same as wtih the default scale 1.
385  glEnable(GL_NORMALIZE);
386  }
float myGLScaleFactorX
Definition: Viewer3D.h:1650
float myGLScaleFactorZ
Definition: Viewer3D.h:1652
float myGLScaleFactorY
Definition: Viewer3D.h:1651
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 365 of file Viewer3D.h.

366  {
367  ZNear = _near; ZFar = _far;
368  }
double ZFar
zfar distance
Definition: Viewer3D.h:1644
double ZNear
znear distance
Definition: Viewer3D.h:1643
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).
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, io/viewDualSurface.cpp, and topology/digitalSurfaceSlice.cpp.
template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
void DGtal::Viewer3D< TSpace, TKSpace >::sortPolygonFromCamera ( )

Sort all polygons from the camera.

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

Sort all triangle from the camera.

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

Sort all surfels from the camera.

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

Sort all triangle from the camera.

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
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
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).
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.

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
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
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.

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.
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

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

camera direction

Definition at line 1616 of file Viewer3D.h.

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

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

camera position

Definition at line 1615 of file Viewer3D.h.

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

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

camera up-vector

Definition at line 1617 of file Viewer3D.h.

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

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 484 of file Viewer3D.h.

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

Definition at line 1586 of file Viewer3D.h.

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

Definition at line 1593 of file Viewer3D.h.

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

Definition at line 1592 of file Viewer3D.h.

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 474 of file Viewer3D.h.

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 476 of file Viewer3D.h.

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

Definition at line 1633 of file Viewer3D.h.

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

Definition at line 1632 of file Viewer3D.h.

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

Definition at line 1607 of file Viewer3D.h.

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

Definition at line 1607 of file Viewer3D.h.

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 1665 of file Viewer3D.h.

Referenced by DGtal::Viewer3D< Space, KSpace >::removeExtension(), and DGtal::Viewer3D< Space, KSpace >::setExtension().

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 482 of file Viewer3D.h.

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

Definition at line 481 of file Viewer3D.h.

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

Definition at line 1650 of file Viewer3D.h.

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

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

Definition at line 1651 of file Viewer3D.h.

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

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

Definition at line 1652 of file Viewer3D.h.

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

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 1661 of file Viewer3D.h.

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 1663 of file Viewer3D.h.

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

true if the background is default

Definition at line 478 of file Viewer3D.h.

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 1613 of file Viewer3D.h.

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 1658 of file Viewer3D.h.

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

Definition at line 1635 of file Viewer3D.h.

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

Definition at line 1634 of file Viewer3D.h.

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 1629 of file Viewer3D.h.

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 1630 of file Viewer3D.h.

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

the light position (inclination)

Definition at line 1621 of file Viewer3D.h.

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 1623 of file Viewer3D.h.

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

Definition at line 1619 of file Viewer3D.h.

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 1625 of file Viewer3D.h.

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 1624 of file Viewer3D.h.

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

the light position (azimuth)

Definition at line 1622 of file Viewer3D.h.

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 1628 of file Viewer3D.h.

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

Definition at line 1620 of file Viewer3D.h.

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

Definition at line 1655 of file Viewer3D.h.

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

Definition at line 1585 of file Viewer3D.h.

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

Definition at line 1626 of file Viewer3D.h.

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 1627 of file Viewer3D.h.

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

Definition at line 1647 of file Viewer3D.h.

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

Definition at line 1637 of file Viewer3D.h.

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

Definition at line 1636 of file Viewer3D.h.

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

Definition at line 1599 of file Viewer3D.h.

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

Definition at line 1598 of file Viewer3D.h.

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 1597 of file Viewer3D.h.

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

Definition at line 1600 of file Viewer3D.h.

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 1607 of file Viewer3D.h.

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

Definition at line 1639 of file Viewer3D.h.

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

Definition at line 1638 of file Viewer3D.h.

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

Definition at line 1582 of file Viewer3D.h.

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

Definition at line 1583 of file Viewer3D.h.

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 1609 of file Viewer3D.h.

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

Definition at line 1587 of file Viewer3D.h.

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

Definition at line 1589 of file Viewer3D.h.

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

Definition at line 1590 of file Viewer3D.h.

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 1656 of file Viewer3D.h.

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 1657 of file Viewer3D.h.

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

Definition at line 486 of file Viewer3D.h.

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 1603 of file Viewer3D.h.

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

Definition at line 1607 of file Viewer3D.h.

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

Definition at line 1604 of file Viewer3D.h.

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 1579 of file Viewer3D.h.

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

Definition at line 1580 of file Viewer3D.h.

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

Definition at line 1641 of file Viewer3D.h.

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 1611 of file Viewer3D.h.

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 480 of file Viewer3D.h.

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

zfar distance

Definition at line 1644 of file Viewer3D.h.

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

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

znear distance

Definition at line 1643 of file Viewer3D.h.

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


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