DGtal 2.1.0
Loading...
Searching...
No Matches
DGtal::Display3D< Space, KSpace > Class Template Referenceabstract

Base class for viewing DGtal objects. More...

#include <DGtal/io/Display3D.h>

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

Data Structures

struct  Callback
 A general callback for the viewer to give control to the user. More...
 

Public Types

using Point = typename Space::Point
 
using KCell = typename KSpace::Cell
 
using SCell = typename KSpace::SCell
 
using RealPoint = typename Space::RealPoint
 
using Embedder = CanonicEmbedder< Space >
 
using CellEmbedder = CanonicCellEmbedder< KSpace >
 
using SCellEmbedder = CanonicSCellEmbedder< KSpace >
 

Public Member Functions

 Display3D (const KSpace &space)
 
 Display3D ()
 
virtual ~Display3D ()
 
virtual void show ()=0
 Starts the event loop and display of elements.
 
virtual void renderNewData ()=0
 Renders newly added data.
 
virtual void renderAll ()
 (Re)Render all data
 
virtual void clearView ()=0
 Clear the screen.
 
virtual void clear ()
 Clear the viewer, including screen and internal data.
 
virtual void setCallback (Callback *callback)
 Sets callback.
 
std::string newList (const std::string &name, size_t eSize=0)
 Create a new group.
 
bool setCurrentList (const std::string &name)
 Set the current group for further updates.
 
bool canCreateNewList (size_t elementSize) const
 Tells if a list of a given elementSize can be reused.
 
std::string createOrReuseList (const std::string &name, size_t elementSize)
 Reuse a list if possible, otherwise create a new one.
 
void endCurrentGroup ()
 End current group and sets an invalid current group.
 
std::string newCubeList (const std::string &name)
 
std::string newBallList (const std::string &name)
 
std::string newLineList (const std::string &name)
 
std::string newQuadList (const std::string &name)
 
std::string newPolygonList (const std::string &name)
 
std::string newTriangleList (const std::string &name)
 
std::string newVolumetricList (const std::string &name)
 
std::string createOrReuseCubeList (const std::string &name)
 
std::string createOrReuseBallList (const std::string &name)
 
std::string createOrReuseLineList (const std::string &name)
 
std::string createOrReuseQuadList (const std::string &name)
 
std::string createOrReusePolygonList (const std::string &name)
 
std::string createOrReuseTriangleList (const std::string &name)
 
std::string createOrReuseVolumetricList (const std::string &name)
 
template<typename Obj >
Display3Doperator<< (const Obj &obj)
 Draw object with stream API.
 
std::string draw (const Point &p, const std::string &uname="Point_{i}")
 
std::string draw (const RealPoint &rp, const std::string &uname="Point_{i}")
 
template<typename T >
std::string draw (const std::vector< T > &vec, const std::string &uname="")
 
template<typename A , typename B , typename C >
std::string draw (const ConstRangeAdapter< A, B, C > range, const std::string &uname="")
 
template<typename A , typename B , typename C >
std::string draw (const ConstIteratorAdapter< A, B, C > &adapter, const std::string &uname="")
 
std::string draw (const GridCurve< KSpace > &curve, const std::string &uname="GridCurve_{i}")
 
std::string draw (const typename GridCurve< KSpace >::MidPointsRange &range, const std::string &uname="MidPoints_{i}")
 
std::string draw (const typename GridCurve< KSpace >::ArrowsRange &range, const std::string &uname="Arrows_{i}")
 
template<DGtal::Dimension emb, DGtal::Dimension amb, typename Algebra , typename Int >
std::string draw (const DiscreteExteriorCalculus< emb, amb, Algebra, Int > &calc, const std::string &uname="Calculus_{i}")
 
template<typename Calculus , DGtal::Order order, DGtal::Duality duality>
std::string draw (const KForm< Calculus, order, duality > &kform, const std::string &uname="KForm_{i}")
 
template<typename Calculus , DGtal::Duality dual>
std::string draw (const VectorField< Calculus, dual > &field, const std::string &uname="Field_{i}")
 
std::string draw (const KCell &cell, const std::string &name="KCell_{i}_{d}d")
 
std::string draw (const SCell &cell, const std::string &name="SCell_{i}_{d}d")
 
std::string draw (const HyperRectDomain< Space > &domain, const std::string &uname="\xff Domain_{i}")
 
template<typename Vec >
std::string drawPolygon (const std::vector< Vec > &vertices, const std::string &uname="Polygon_{i}")
 Draws a polygon.
 
std::string drawBall (const RealPoint &c, const std::string &uname="Ball_{i}")
 
std::string drawLine (const RealPoint &a, const RealPoint &b, const std::string &uname="Line_{i}")
 
std::string drawQuad (const RealPoint &a, const RealPoint &b, const RealPoint &c, const RealPoint &d, const std::string &uname="Quad_{i}")
 
template<typename Obj , typename Cont >
std::string draw (const DigitalSetByAssociativeContainer< Obj, Cont > &set, const std::string &name="Set_{i}")
 
template<typename Adj , typename Set >
std::string draw (const DGtal::Object< Adj, Set > &obj, const std::string &uname="Object_{i}")
 
template<typename D , typename T >
std::string draw (const ImageContainerBySTLVector< D, T > &image, const std::string &name="Image_{i}")
 
template<typename TImageContainer , typename TNewDomain , typename TFunctorD , typename TNewValue , typename TFunctorV , typename TFunctorVm1 >
std::string draw (const ImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV, TFunctorVm1 > &adapter, const std::string &name="Image_{i}")
 
template<typename TImageContainer , typename TNewDomain , typename TFunctorD , typename TNewValue , typename TFunctorV >
std::string draw (const ConstImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV > &adapter, const std::string &name="Image_{i}")
 
template<typename Pt >
std::string draw (const Mesh< Pt > &mesh, const std::string &uname="Mesh_{i}")
 
template<typename It , typename Int , int Con>
std::string draw (const StandardDSS6Computer< It, Int, Con > &computer, const std::string &uname="Computer_{i}")
 
template<typename It , typename Int , int Con>
std::string draw (const Naive3DDSSComputer< It, Int, Con > &computer, const std::string &uname="Computer_{i}")
 
template<typename T , typename Type >
std::string draw (const WithQuantity< T, Type > &props, const std::string &uname="")
 
template<typename Type >
void addQuantity (const std::string &oName, const std::string &qName, const Type &value, QuantityScale scale=QuantityScale::UNKNOWN)
 
template<typename Type >
void addQuantity (const std::string &oName, const std::string &qName, const std::vector< Type > &value, QuantityScale scale=QuantityScale::UNKNOWN)
 
std::string draw (const ClippingPlane &plane, const std::string &name="")
 
template<typename T >
std::string draw (const SphericalAccumulator< T > accumulator, const std::string &uname="SphericalAccumulator_{i}")
 
std::string draw (const DGtal::Color &color, const std::string &name="")
 
void drawColor (const DGtal::Color &color)
 
void setDefaultColors ()
 
void drawAdjacencies (bool toggle=true)
 
void drawAsSimplified (bool toggle=true)
 
void drawAsGrid (bool toggle=true)
 
void defaultStyle ()
 
void drawAsPaving ()
 
void drawAsBalls ()
 

Data Fields

DisplayStyle currentStyle
 
bool allowReuseList = false
 
std::vector< ClippingPlaneplanes
 
std::map< std::string, DisplayData< RealPoint > > data
 

Protected Attributes

KSpace myKSpace
 
Embedder myEmbedder
 
CellEmbedder myCellEmbedder
 
SCellEmbedder mySCellEmbedder
 
CallbackmyCallback = nullptr
 
std::vector< std::string > myToRender
 
std::string myCurrentName = ""
 
DisplayData< RealPoint > * myCurrentData = nullptr
 

Private Member Functions

std::string draw (const std::pair< RealPoint, RealPoint > &arrow, const std::string &uname="Arrow_{i}")
 
template<typename Range >
std::string drawGenericRange (const Range &range, const std::string &uname)
 Draws a range of object to the screen.
 
template<typename T >
std::string drawImage (const std::string &uname, const T &image)
 
template<typename T >
std::string drawImageAdaptDom (const std::string &uname, const T &image)
 
std::string drawKCell (std::string uname, const RealPoint &rp, bool xodd, bool yodd, bool zodd, bool hasSign, bool sign)
 

Detailed Description

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
class DGtal::Display3D< Space, KSpace >

Base class for viewing DGtal objects.

Template Parameters
SpaceSpace of draw objects
KSpaceKhalimsky space of drawn objects

Drawing:

Lists: Lists are a key part of this class. A list is a collection of object that are linked together. As such, they should be managed, updated with the same options.

Each DisplayData elements corresponds to a list of elements. However the intent behind subsequent drawcalls can be to groups elements together. For example, looping through a Digital surface doing a computation and then display the current element. For this reason, the field "allowReuseList" can be set to true. This will try, if possible to use reuse the current element if possible. This may not success (common cases are if elements of different size were inserted, or after drawing an object which always create its own list). If this does not fit the need, use setCurrentList.

Definition at line 381 of file Display3D.h.

Member Typedef Documentation

◆ CellEmbedder

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
using DGtal::Display3D< Space, KSpace >::CellEmbedder = CanonicCellEmbedder<KSpace>

Definition at line 400 of file Display3D.h.

◆ Embedder

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
using DGtal::Display3D< Space, KSpace >::Embedder = CanonicEmbedder<Space>

Definition at line 399 of file Display3D.h.

◆ KCell

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
using DGtal::Display3D< Space, KSpace >::KCell = typename KSpace::Cell

Definition at line 395 of file Display3D.h.

◆ Point

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
using DGtal::Display3D< Space, KSpace >::Point = typename Space::Point

Definition at line 394 of file Display3D.h.

◆ RealPoint

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
using DGtal::Display3D< Space, KSpace >::RealPoint = typename Space::RealPoint

Definition at line 397 of file Display3D.h.

◆ SCell

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
using DGtal::Display3D< Space, KSpace >::SCell = typename KSpace::SCell

Definition at line 396 of file Display3D.h.

◆ SCellEmbedder

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
using DGtal::Display3D< Space, KSpace >::SCellEmbedder = CanonicSCellEmbedder<KSpace>

Definition at line 401 of file Display3D.h.

Constructor & Destructor Documentation

◆ Display3D() [1/2]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
DGtal::Display3D< Space, KSpace >::Display3D ( const KSpace space)
inline

Definition at line 383 of file Display3D.h.

383 :
384 myKSpace(space),
387 { }
SCellEmbedder mySCellEmbedder
Definition Display3D.h:750
CellEmbedder myCellEmbedder
Definition Display3D.h:749

◆ Display3D() [2/2]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
DGtal::Display3D< Space, KSpace >::Display3D ( )
inline

Definition at line 389 of file Display3D.h.

◆ ~Display3D()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
virtual DGtal::Display3D< Space, KSpace >::~Display3D ( )
inlinevirtual

Definition at line 391 of file Display3D.h.

391{};

Member Function Documentation

◆ addQuantity() [1/2]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Type >
void DGtal::Display3D< Space, KSpace >::addQuantity ( const std::string &  oName,
const std::string &  qName,
const std::vector< Type > &  value,
QuantityScale  scale = QuantityScale::UNKNOWN 
)

◆ addQuantity() [2/2]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Type >
void DGtal::Display3D< Space, KSpace >::addQuantity ( const std::string &  oName,
const std::string &  qName,
const Type &  value,
QuantityScale  scale = QuantityScale::UNKNOWN 
)

Referenced by main().

◆ canCreateNewList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
bool DGtal::Display3D< Space, KSpace >::canCreateNewList ( size_t  elementSize) const

Tells if a list of a given elementSize can be reused.

Parameters
elementSizeThe size of each elements

◆ clear()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
virtual void DGtal::Display3D< Space, KSpace >::clear ( )
virtual

Clear the viewer, including screen and internal data.

Referenced by DGtal::PolyscopeViewer< Space, KSpace >::~PolyscopeViewer().

◆ clearView()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
virtual void DGtal::Display3D< Space, KSpace >::clearView ( )
pure virtual

Clear the screen.

Implemented in DGtal::PolyscopeViewer< Space, KSpace >.

◆ createOrReuseBallList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReuseBallList ( const std::string &  name)
inline

Definition at line 544 of file Display3D.h.

544{ return createOrReuseList(name, 1); }
std::string createOrReuseList(const std::string &name, size_t elementSize)
Reuse a list if possible, otherwise create a new one.

References DGtal::Display3D< Space, KSpace >::createOrReuseList().

◆ createOrReuseCubeList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReuseCubeList ( const std::string &  name)
inline

Definition at line 543 of file Display3D.h.

543{ return createOrReuseList(name, 8); }

References DGtal::Display3D< Space, KSpace >::createOrReuseList().

◆ createOrReuseLineList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReuseLineList ( const std::string &  name)
inline

Definition at line 545 of file Display3D.h.

545{ return createOrReuseList(name, 2); }

References DGtal::Display3D< Space, KSpace >::createOrReuseList().

◆ createOrReuseList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReuseList ( const std::string &  name,
size_t  elementSize 
)

◆ createOrReusePolygonList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReusePolygonList ( const std::string &  name)
inline

Definition at line 547 of file Display3D.h.

547{ return createOrReuseList(name, 0); }

References DGtal::Display3D< Space, KSpace >::createOrReuseList().

◆ createOrReuseQuadList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReuseQuadList ( const std::string &  name)
inline

Definition at line 546 of file Display3D.h.

546{ return createOrReuseList(name, 4); }

References DGtal::Display3D< Space, KSpace >::createOrReuseList().

◆ createOrReuseTriangleList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReuseTriangleList ( const std::string &  name)
inline

Definition at line 548 of file Display3D.h.

548{ return createOrReuseList(name, 3); }

References DGtal::Display3D< Space, KSpace >::createOrReuseList().

◆ createOrReuseVolumetricList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::createOrReuseVolumetricList ( const std::string &  name)
inline

Definition at line 549 of file Display3D.h.

549{ return createOrReuseList(name, 8); }

References DGtal::Display3D< Space, KSpace >::createOrReuseList().

◆ defaultStyle()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::defaultStyle ( )

◆ draw() [1/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const ClippingPlane plane,
const std::string &  name = "" 
)

◆ draw() [2/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename TImageContainer , typename TNewDomain , typename TFunctorD , typename TNewValue , typename TFunctorV >
std::string DGtal::Display3D< Space, KSpace >::draw ( const ConstImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV > &  adapter,
const std::string &  name = "Image_{i}" 
)

◆ draw() [3/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename A , typename B , typename C >
std::string DGtal::Display3D< Space, KSpace >::draw ( const ConstIteratorAdapter< A, B, C > &  adapter,
const std::string &  uname = "" 
)

◆ draw() [4/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename A , typename B , typename C >
std::string DGtal::Display3D< Space, KSpace >::draw ( const ConstRangeAdapter< A, B, C >  range,
const std::string &  uname = "" 
)

◆ draw() [5/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const DGtal::Color color,
const std::string &  name = "" 
)

◆ draw() [6/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Adj , typename Set >
std::string DGtal::Display3D< Space, KSpace >::draw ( const DGtal::Object< Adj, Set > &  obj,
const std::string &  uname = "Object_{i}" 
)

◆ draw() [7/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Obj , typename Cont >
std::string DGtal::Display3D< Space, KSpace >::draw ( const DigitalSetByAssociativeContainer< Obj, Cont > &  set,
const std::string &  name = "Set_{i}" 
)

◆ draw() [8/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<DGtal::Dimension emb, DGtal::Dimension amb, typename Algebra , typename Int >
std::string DGtal::Display3D< Space, KSpace >::draw ( const DiscreteExteriorCalculus< emb, amb, Algebra, Int > &  calc,
const std::string &  uname = "Calculus_{i}" 
)

◆ draw() [9/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const GridCurve< KSpace > &  curve,
const std::string &  uname = "GridCurve_{i}" 
)

◆ draw() [10/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const HyperRectDomain< Space > &  domain,
const std::string &  uname = "\xff Domain_{i}" 
)

◆ draw() [11/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename TImageContainer , typename TNewDomain , typename TFunctorD , typename TNewValue , typename TFunctorV , typename TFunctorVm1 >
std::string DGtal::Display3D< Space, KSpace >::draw ( const ImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV, TFunctorVm1 > &  adapter,
const std::string &  name = "Image_{i}" 
)

◆ draw() [12/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename D , typename T >
std::string DGtal::Display3D< Space, KSpace >::draw ( const ImageContainerBySTLVector< D, T > &  image,
const std::string &  name = "Image_{i}" 
)

◆ draw() [13/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const KCell cell,
const std::string &  name = "KCell_{i}_{d}d" 
)

◆ draw() [14/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Calculus , DGtal::Order order, DGtal::Duality duality>
std::string DGtal::Display3D< Space, KSpace >::draw ( const KForm< Calculus, order, duality > &  kform,
const std::string &  uname = "KForm_{i}" 
)

◆ draw() [15/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Pt >
std::string DGtal::Display3D< Space, KSpace >::draw ( const Mesh< Pt > &  mesh,
const std::string &  uname = "Mesh_{i}" 
)

◆ draw() [16/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename It , typename Int , int Con>
std::string DGtal::Display3D< Space, KSpace >::draw ( const Naive3DDSSComputer< It, Int, Con > &  computer,
const std::string &  uname = "Computer_{i}" 
)

◆ draw() [17/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const Point p,
const std::string &  uname = "Point_{i}" 
)

◆ draw() [18/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const RealPoint rp,
const std::string &  uname = "Point_{i}" 
)

◆ draw() [19/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const SCell cell,
const std::string &  name = "SCell_{i}_{d}d" 
)

◆ draw() [20/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename T >
std::string DGtal::Display3D< Space, KSpace >::draw ( const SphericalAccumulator< T >  accumulator,
const std::string &  uname = "SphericalAccumulator_{i}" 
)

◆ draw() [21/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename It , typename Int , int Con>
std::string DGtal::Display3D< Space, KSpace >::draw ( const StandardDSS6Computer< It, Int, Con > &  computer,
const std::string &  uname = "Computer_{i}" 
)

◆ draw() [22/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const std::pair< RealPoint, RealPoint > &  arrow,
const std::string &  uname = "Arrow_{i}" 
)
private

◆ draw() [23/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename T >
std::string DGtal::Display3D< Space, KSpace >::draw ( const std::vector< T > &  vec,
const std::string &  uname = "" 
)

◆ draw() [24/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const typename GridCurve< KSpace >::ArrowsRange &  range,
const std::string &  uname = "Arrows_{i}" 
)

◆ draw() [25/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::draw ( const typename GridCurve< KSpace >::MidPointsRange &  range,
const std::string &  uname = "MidPoints_{i}" 
)

◆ draw() [26/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Calculus , DGtal::Duality dual>
std::string DGtal::Display3D< Space, KSpace >::draw ( const VectorField< Calculus, dual > &  field,
const std::string &  uname = "Field_{i}" 
)

◆ draw() [27/27]

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename T , typename Type >
std::string DGtal::Display3D< Space, KSpace >::draw ( const WithQuantity< T, Type > &  props,
const std::string &  uname = "" 
)

◆ drawAdjacencies()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::drawAdjacencies ( bool  toggle = true)
Examples
io/viewers/viewer3D-3-objects.cpp.

Referenced by main().

◆ drawAsBalls()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::drawAsBalls ( )

◆ drawAsGrid()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::drawAsGrid ( bool  toggle = true)

◆ drawAsPaving()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::drawAsPaving ( )

Referenced by main().

◆ drawAsSimplified()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::drawAsSimplified ( bool  toggle = true)

◆ drawBall()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::drawBall ( const RealPoint c,
const std::string &  uname = "Ball_{i}" 
)

◆ drawColor()

◆ drawGenericRange()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Range >
std::string DGtal::Display3D< Space, KSpace >::drawGenericRange ( const Range range,
const std::string &  uname 
)
private

Draws a range of object to the screen.

◆ drawImage()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename T >
std::string DGtal::Display3D< Space, KSpace >::drawImage ( const std::string &  uname,
const T &  image 
)
private

◆ drawImageAdaptDom()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename T >
std::string DGtal::Display3D< Space, KSpace >::drawImageAdaptDom ( const std::string &  uname,
const T &  image 
)
private

◆ drawKCell()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::drawKCell ( std::string  uname,
const RealPoint rp,
bool  xodd,
bool  yodd,
bool  zodd,
bool  hasSign,
bool  sign 
)
private

◆ drawLine()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::drawLine ( const RealPoint a,
const RealPoint b,
const std::string &  uname = "Line_{i}" 
)

◆ drawPolygon()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Vec >
std::string DGtal::Display3D< Space, KSpace >::drawPolygon ( const std::vector< Vec > &  vertices,
const std::string &  uname = "Polygon_{i}" 
)

Draws a polygon.

Template Parameters
VecType of vertex
Examples
io/viewDualSurface.cpp.

Referenced by main(), and viewPolygons().

◆ drawQuad()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::drawQuad ( const RealPoint a,
const RealPoint b,
const RealPoint c,
const RealPoint d,
const std::string &  uname = "Quad_{i}" 
)

Referenced by main().

◆ endCurrentGroup()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::endCurrentGroup ( )

End current group and sets an invalid current group.

The purpose of this function is to disallow further automatic update on a group.

◆ newBallList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newBallList ( const std::string &  name)
inline

Definition at line 536 of file Display3D.h.

536{ return newList(name, 1); }
std::string newList(const std::string &name, size_t eSize=0)
Create a new group.

References DGtal::Display3D< Space, KSpace >::newList().

◆ newCubeList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newCubeList ( const std::string &  name)
inline

Definition at line 535 of file Display3D.h.

535{ return newList(name, 8); }

References DGtal::Display3D< Space, KSpace >::newList().

Referenced by main().

◆ newLineList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newLineList ( const std::string &  name)
inline

Definition at line 537 of file Display3D.h.

537{ return newList(name, 2); }

References DGtal::Display3D< Space, KSpace >::newList().

◆ newList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newList ( const std::string &  name,
size_t  eSize = 0 
)

Create a new group.

If the name requested already exists; another one is computed as follows:

  • If the token {i} is present, replace the first occurence with the first available index, starting from one.
  • Otherwise, appends "_i" where i the first available index, starting from one.

This function sets the current data.

Parameters
nameThe name to insert
eSizeelementSize of the DisplayData
Returns
The computed name

Referenced by DGtal::Display3D< Space, KSpace >::newBallList(), DGtal::Display3D< Space, KSpace >::newCubeList(), DGtal::Display3D< Space, KSpace >::newLineList(), DGtal::Display3D< Space, KSpace >::newPolygonList(), DGtal::Display3D< Space, KSpace >::newQuadList(), DGtal::Display3D< Space, KSpace >::newTriangleList(), and DGtal::Display3D< Space, KSpace >::newVolumetricList().

◆ newPolygonList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newPolygonList ( const std::string &  name)
inline
Examples
io/viewDualSurface.cpp.

Definition at line 539 of file Display3D.h.

539{ return newList(name, 0); }

References DGtal::Display3D< Space, KSpace >::newList().

Referenced by main().

◆ newQuadList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newQuadList ( const std::string &  name)
inline
Examples
io/viewDualSurface.cpp.

Definition at line 538 of file Display3D.h.

538{ return newList(name, 4); }

References DGtal::Display3D< Space, KSpace >::newList().

Referenced by main(), and testLocalConvolutionNormalVectorEstimator().

◆ newTriangleList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newTriangleList ( const std::string &  name)
inline

Definition at line 540 of file Display3D.h.

540{ return newList(name, 3); }

References DGtal::Display3D< Space, KSpace >::newList().

◆ newVolumetricList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::newVolumetricList ( const std::string &  name)
inline

Definition at line 541 of file Display3D.h.

541{ return newList(name, 8); }

References DGtal::Display3D< Space, KSpace >::newList().

Referenced by main().

◆ operator<<()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
template<typename Obj >
Display3D & DGtal::Display3D< Space, KSpace >::operator<< ( const Obj &  obj)

Draw object with stream API.

Template Parameters
ObjAny type of object

◆ renderAll()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
virtual void DGtal::Display3D< Space, KSpace >::renderAll ( )
inlinevirtual

(Re)Render all data

If any modification were made within the viewer they can be lost

Definition at line 459 of file Display3D.h.

459 {
460 myToRender.clear();
461 myToRender.reserve(data.size());
462
463 for (const auto& m : data)
464 myToRender.push_back(m.first);
465
467 }
std::map< std::string, DisplayData< RealPoint > > data
Definition Display3D.h:744
std::vector< std::string > myToRender
Definition Display3D.h:753
virtual void renderNewData()=0
Renders newly added data.

References DGtal::Display3D< Space, KSpace >::data, DGtal::Display3D< Space, KSpace >::myToRender, and DGtal::Display3D< Space, KSpace >::renderNewData().

◆ renderNewData()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
virtual void DGtal::Display3D< Space, KSpace >::renderNewData ( )
pure virtual

Renders newly added data.

Implemented in DGtal::PolyscopeViewer< Space, KSpace >.

Referenced by DGtal::Display3D< Space, KSpace >::renderAll().

◆ setCallback()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
virtual void DGtal::Display3D< Space, KSpace >::setCallback ( Callback callback)
virtual

Sets callback.

◆ setCurrentList()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
bool DGtal::Display3D< Space, KSpace >::setCurrentList ( const std::string &  name)

Set the current group for further updates.

Parameters
nameThe name of the group
Examples
io/viewDualSurface.cpp.

Referenced by main().

◆ setDefaultColors()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
void DGtal::Display3D< Space, KSpace >::setDefaultColors ( )
Examples
io/viewers/viewer3D-5-colors.cpp.

Referenced by main().

◆ show()

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
virtual void DGtal::Display3D< Space, KSpace >::show ( )
pure virtual

Starts the event loop and display of elements.

It is recommended that this functions calls renderNewData

Implemented in DGtal::PolyscopeViewer< Space, KSpace >.

Field Documentation

◆ allowReuseList

◆ currentStyle

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
DisplayStyle DGtal::Display3D< Space, KSpace >::currentStyle

Definition at line 739 of file Display3D.h.

Referenced by main().

◆ data

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::map<std::string, DisplayData<RealPoint> > DGtal::Display3D< Space, KSpace >::data

◆ myCallback

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
Callback* DGtal::Display3D< Space, KSpace >::myCallback = nullptr
protected

Definition at line 752 of file Display3D.h.

◆ myCellEmbedder

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
CellEmbedder DGtal::Display3D< Space, KSpace >::myCellEmbedder
protected

Definition at line 749 of file Display3D.h.

◆ myCurrentData

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
DisplayData<RealPoint>* DGtal::Display3D< Space, KSpace >::myCurrentData = nullptr
protected

Definition at line 756 of file Display3D.h.

◆ myCurrentName

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::string DGtal::Display3D< Space, KSpace >::myCurrentName = ""
protected

Definition at line 755 of file Display3D.h.

◆ myEmbedder

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
Embedder DGtal::Display3D< Space, KSpace >::myEmbedder
protected

Definition at line 748 of file Display3D.h.

◆ myKSpace

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
KSpace DGtal::Display3D< Space, KSpace >::myKSpace
protected

Definition at line 747 of file Display3D.h.

◆ mySCellEmbedder

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
SCellEmbedder DGtal::Display3D< Space, KSpace >::mySCellEmbedder
protected

Definition at line 750 of file Display3D.h.

◆ myToRender

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::vector<std::string> DGtal::Display3D< Space, KSpace >::myToRender
protected

Definition at line 753 of file Display3D.h.

Referenced by DGtal::Display3D< Space, KSpace >::renderAll().

◆ planes

template<typename Space = Z3i::Space, typename KSpace = Z3i::KSpace>
std::vector<ClippingPlane> DGtal::Display3D< Space, KSpace >::planes

Definition at line 742 of file Display3D.h.


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