DGtal  1.5.beta
Viewer3DFactory.ih
1 /**
2  * This program is free software: you can redistribute it and/or modify
3  * it under the terms of the GNU Lesser General Public License as
4  * published by the Free Software Foundation, either version 3 of the
5  * License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program. If not, see <http://www.gnu.org/licenses/>.
14  *
15  **/
16 
17 /**
18  * @file Viewer3DFactory.ih
19  * @author Aline Martin <aline.martin@insa-lyon.fr>
20  * @date mardi 2 juillet 2013
21  *
22  * @brief
23  *
24  * Implementation of inline methods defined in Viewer3DFactory.h
25  *
26  * This file is part of the DGtal library.
27  */
28 
29 #include <string>
30 
31 #include "DGtal/helpers/StdDefs.h"
32 #include "DGtal/images/ImageHelper.h"
33 #include "DGtal/io/Display3DFactory.h"
34 
35 
36 ///////////////////////////////////////////////////////////////////////////////
37 // Implementation of inline methods //
38 
39 
40 ///////////////////////////////////////////////////////////////////////////////
41 // Implementation of inline functions and external operators //
42 
43 template <typename Space, typename KSpace>
44 inline
45 void DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
46  const DGtal::CameraPosition & cp )
47 {
48  viewer.setCameraPosition(cp.eyex, cp.eyey, cp.eyez);
49 }
50 
51 template <typename Space, typename KSpace>
52 inline
53 void DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
54  const DGtal::CameraDirection & cd )
55 {
56  viewer.setCameraDirection(cd.dirx, cd.diry, cd.dirz);
57 }
58 
59 template <typename Space, typename KSpace>
60 inline
61 void DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::CameraUpVector & cuv )
62 {
63 
64  viewer.setCameraUpVector(cuv.upx, cuv.upy, cuv.upz);
65 }
66 
67 template <typename Space, typename KSpace>
68 inline
69 void DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
70  const DGtal::CameraZNearFar & cz )
71 {
72  viewer.setNearFar(cz.ZNear, cz.ZFar);
73 }
74 
75 
76 
77 // AddTextureImage3DWithFunctor
78 template <typename Space, typename KSpace>
79 template<typename TImageType, typename TFunctor>
80 void
81 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::AddTextureImage3DWithFunctor<TImageType, TFunctor, Space, KSpace> & anAddGS3D )
82 {
83  drawImage3D(viewer, *anAddGS3D.my3DImage, anAddGS3D.myFunctor, anAddGS3D.myMode);
84 }
85 // AddTextureImage3DWithFunctor
86 
87 // AddTextureImage2DWithFunctor
88 template <typename Space, typename KSpace>
89 template<typename TImageType, typename TFunctor>
90 void
91 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::AddTextureImage2DWithFunctor<TImageType, TFunctor, Space, KSpace> & anAddGS2D )
92 {
93  drawImage2D(viewer, *anAddGS2D.my2DImage, anAddGS2D.myFunctor, anAddGS2D.myMode);
94 }
95 // AddTextureImage2DWithFunctor
96 
97 template <typename Space, typename KSpace>
98 inline
99 void
100 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::UpdateImagePosition<Space, KSpace> & anUpdate)
101 {
102  viewer.updateOrientationTextureImage(anUpdate.myIndex, anUpdate.myPosXBottomLeft, anUpdate.myPosYBottomLeft,
103  anUpdate.myPosZBottomLeft, anUpdate.myNewDirection);
104 }
105 
106 template< typename Space, typename KSpace>
107 inline
108 void
109 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::UpdateLastImagePosition<Space, KSpace> & anUpdate )
110 {
111  unsigned int index = viewer.getCurrentGLImageNumber()-1;
112  viewer.updateOrientationTextureImage(index, anUpdate.myPosXBottomLeft, anUpdate.myPosYBottomLeft,
113  anUpdate.myPosZBottomLeft, anUpdate.myNewDirection);
114 }
115 
116 template< typename Space, typename KSpace>
117 inline
118 void
119 DGtal::Viewer3DFactory<Space, KSpace>::draw( Viewer3D<Space,KSpace> & viewer, const DGtal::UpdateImage3DEmbedding<Space, KSpace> & anUpdate)
120 {
121  viewer.updateEmbeddingTextureImage(anUpdate.myIndex, anUpdate.myNewPoint1, anUpdate.myNewPoint2, anUpdate.myNewPoint3, anUpdate.myNewPoint4);
122 }
123 
124 
125 template< typename Space, typename KSpace>
126 inline
127 void
128 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> &viewer, const DGtal::Update2DDomainPosition<Space, KSpace> & anUpdate)
129 {
130  viewer.updateAn2DDomainOrientation(anUpdate.myIndex, anUpdate.myPosXBottomLeft, anUpdate.myPosYBottomLeft,
131  anUpdate.myPosZBottomLeft, anUpdate.myNewDirection);
132 }
133 
134 template< typename Space, typename KSpace>
135 inline
136 void
137 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> &viewer, const DGtal::Translate2DDomain & anTranslation)
138 {
139  viewer.translateAn2DDomain(anTranslation.myIndex, anTranslation.myTranslateX, anTranslation.myTranslateY,
140  anTranslation.myTranslateZ);
141 }
142 
143 template <typename Space, typename KSpace>
144 template<typename TImageType, typename TFunctor>
145 void
146 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::UpdateImageData<TImageType, TFunctor> & anUpdate)
147 {
148  viewer.updateTextureImage(anUpdate.myIndex, *(anUpdate.myImage), anUpdate.myFunctor, anUpdate.myTranslateX,
149  anUpdate.myTranslateY, anUpdate.myTranslateZ, anUpdate.myRotationAngle, anUpdate.myRotationDir);
150 }
151 
152 template <typename Space, typename KSpace>
153 template < typename TImageType3D, typename TFunctor>
154 inline
155 void
156 DGtal::Viewer3DFactory<Space,KSpace>::drawImage3D( Viewer3D<Space, KSpace> & viewer, const TImageType3D & anImage3D, const TFunctor & aFunctor,
157  typename Viewer3D<Space, KSpace>::TextureMode aTextureMode)
158 {
159  std::string mode = viewer.getMode( anImage3D.className() );
160  ASSERT( (mode=="BoundingBox" || mode=="InterGrid" || mode=="Grid"|| mode=="") ||
161  ("DGtal::Viewer3DFactory<Space,KSpace>::draw( DViewer3D<Space, KSpace> & viewer,const TImageType3D & anImage ): Unknown mode "+mode)=="");
162 
163  typedef TImageType3D Image3D;
164 
165  functors::Projector<DGtal::Z2i::Space> invFunctorY; invFunctorY.initRemoveOneDim(1);
166  DGtal::Z2i::Domain domainY(invFunctorY(anImage3D.domain().lowerBound()),
167  invFunctorY(anImage3D.domain().upperBound()));
168  functors::Projector<DGtal::Z2i::Space> invFunctorZ; invFunctorZ.initRemoveOneDim(2);
169  DGtal::Z2i::Domain domainZ(invFunctorZ(anImage3D.domain().lowerBound()),
170  invFunctorZ(anImage3D.domain().upperBound()));
171  functors::Projector<DGtal::Z2i::Space> invFunctorX; invFunctorX.initRemoveOneDim(0);
172  DGtal::Z2i::Domain domainX(invFunctorX(anImage3D.domain().lowerBound()),
173  invFunctorX(anImage3D.domain().upperBound()));
174 
175 
176 
177  typedef DGtal::ConstImageAdapter<Image3D, DGtal::Z2i::Domain, DGtal::functors::Projector< Z3i::Space>,
178  typename Image3D::Value, DGtal::functors::Identity > SliceImageAdapter;
179  DGtal::functors::Identity idV;
180  DGtal::functors::Projector<DGtal::Z3i::Space> aSliceFunctorY((int)(anImage3D.domain().lowerBound()[1]));
181 
182  aSliceFunctorY.initAddOneDim(1);
183  SliceImageAdapter sliceImageY(anImage3D, domainY, aSliceFunctorY, idV);
184 
185  viewer<< SetMode3D( sliceImageY.className(), mode );
186  viewer << DGtal::AddTextureImage2DWithFunctor<SliceImageAdapter, TFunctor,Space, KSpace> (sliceImageY, aFunctor, aTextureMode );
187 
188  viewer << DGtal::UpdateLastImagePosition<Space, KSpace>( Viewer3D<Space, KSpace>::yDirection,
189  anImage3D.domain().lowerBound()[0],
190  anImage3D.domain().lowerBound()[1]-0.5,
191  anImage3D.domain().lowerBound()[2]);
192 
193  functors::Projector<DGtal::Z3i::Space> aSliceFunctorX((int)(anImage3D.domain().lowerBound()[0]));
194  aSliceFunctorX.initAddOneDim(0);
195  SliceImageAdapter sliceImageX(anImage3D, domainX, aSliceFunctorX, idV);
196  viewer << DGtal::AddTextureImage2DWithFunctor<SliceImageAdapter, TFunctor , Space, KSpace> (sliceImageX, aFunctor, aTextureMode );
197  viewer << DGtal::UpdateLastImagePosition<Space, KSpace> ( Viewer3D<Space, KSpace>::xDirection,
198  anImage3D.domain().lowerBound()[0] -0.5,
199  anImage3D.domain().lowerBound()[1],
200  anImage3D.domain().lowerBound()[2]);
201 
202  functors::Projector<DGtal::Z3i::Space> aSliceFunctorZ((int)(anImage3D.domain().lowerBound()[2]));
203  aSliceFunctorZ.initAddOneDim(2);
204  SliceImageAdapter sliceImageZ(anImage3D, domainZ, aSliceFunctorZ, idV);
205  viewer << DGtal::AddTextureImage2DWithFunctor<SliceImageAdapter, TFunctor , Space, KSpace>(sliceImageZ, aFunctor, aTextureMode );
206  viewer << DGtal::UpdateLastImagePosition<Space, KSpace> ( Viewer3D<Space, KSpace>::zDirection,
207  anImage3D.domain().lowerBound()[0],
208  anImage3D.domain().lowerBound()[1],
209  anImage3D.domain().lowerBound()[2]-0.5);
210 
211 
212  // other symetrics faces
213  functors::Projector<DGtal::Z3i::Space> aSliceFunctorYl((int)(anImage3D.domain().upperBound()[1]));
214  aSliceFunctorYl.initAddOneDim(1);
215  SliceImageAdapter sliceImageYl(anImage3D, domainY, aSliceFunctorYl, idV);
216  viewer << DGtal::AddTextureImage2DWithFunctor<SliceImageAdapter, TFunctor , Space, KSpace>(sliceImageYl, aFunctor , aTextureMode);
217  viewer << DGtal::UpdateLastImagePosition<Space, KSpace> ( Viewer3D<Space, KSpace>::yDirection,
218  anImage3D.domain().lowerBound()[0],
219  0.5+anImage3D.domain().upperBound()[1],
220  anImage3D.domain().lowerBound()[2]);
221 
222 
223  functors::Projector<DGtal::Z3i::Space> aSliceFunctorXl((int)(anImage3D.domain().upperBound()[0]));
224  aSliceFunctorXl.initAddOneDim(0);
225  SliceImageAdapter sliceImageXl(anImage3D, domainX, aSliceFunctorXl, idV);
226  viewer << DGtal::AddTextureImage2DWithFunctor<SliceImageAdapter, TFunctor, Space, KSpace>(sliceImageXl, aFunctor, aTextureMode );
227  viewer << DGtal::UpdateLastImagePosition<Space, KSpace> ( Viewer3D<Space, KSpace>::xDirection,
228  0.5+anImage3D.domain().upperBound()[0],
229  anImage3D.domain().lowerBound()[1],
230  anImage3D.domain().lowerBound()[2] );
231 
232  functors::Projector<DGtal::Z3i::Space> aSliceFunctorZl((int)(anImage3D.domain().upperBound()[2]));
233  aSliceFunctorZl.initAddOneDim(2);
234  SliceImageAdapter sliceImageZl(anImage3D, domainZ, aSliceFunctorZl, idV);
235  viewer << DGtal::AddTextureImage2DWithFunctor<SliceImageAdapter, TFunctor, Space, KSpace>(sliceImageZl, aFunctor , aTextureMode);
236  viewer << DGtal::UpdateLastImagePosition<Space, KSpace>( Viewer3D<Space, KSpace>::zDirection,
237  anImage3D.domain().lowerBound()[0],
238  anImage3D.domain().lowerBound()[1],
239  0.5+ anImage3D.domain().upperBound()[2] );
240 }
241 
242 // ImageContainerBySTLVector (2D)
243 template <typename Space, typename KSpace>
244 template <typename TValue>
245 inline
246 void
247 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const ImageContainerBySTLVector<DGtal::Z2i::Domain, TValue> & anImage )
248 {
249  drawImage2D(viewer, anImage, functors::Cast<unsigned int> (), Viewer3D<Space,KSpace>::GrayScaleMode);
250 }
251 // ImageContainerBySTLVector (2D)
252 
253 
254 // ImageContainerBySTLMap (2D)
255 template <typename Space, typename KSpace>
256 template <typename TValue>
257 inline
258 void
259 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const ImageContainerBySTLMap<DGtal::Z2i::Domain, TValue> & anImage )
260 {
261  drawImage2D(viewer, anImage, functors::Cast<unsigned int> (), anImage.myMode);
262 }
263 // ImageContainerBySTLMap (2D)
264 
265 
266 // ImageContainerBySTLVector (3D)
267 template <typename Space, typename KSpace>
268 template <typename TValue>
269 inline
270 void
271 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const ImageContainerBySTLVector<DGtal::Z3i::Domain, TValue> & anImage3D )
272 {
273  drawImage3D(viewer, anImage3D, functors::Cast<unsigned int> (), Viewer3D<Space,KSpace>::GrayScaleMode);
274 }
275 // ImageContainerBySTLVector (3D)
276 
277 // ImageContainerBySTLMap (3D)
278 template <typename Space, typename KSpace>
279 template <typename TValue>
280 inline
281 void
282 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const ImageContainerBySTLMap<DGtal::Z3i::Domain, TValue> & anImage3D )
283 {
284  drawImage3D(viewer, anImage3D, functors::Cast<unsigned int> (), anImage3D.myMode);
285 }
286 // ImageContainerBySTLMap (3D)
287 
288 
289 // ConstImageAdapter (2D)
290 template <typename Space, typename KSpace>
291 template <typename TImageContainer, typename TFunctorD, typename TNewValue, typename TFunctorValue>
292 inline
293 void
294 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const ConstImageAdapter<TImageContainer, DGtal::Z2i::Domain, TFunctorD, TNewValue, TFunctorValue> & anImage )
295 {
296  drawImage2D(viewer, anImage, functors::Cast<unsigned int> (), Viewer3D<Space,KSpace>::GrayScaleMode );
297 }
298 // ConstImageAdapter (2D)
299 
300 // ImageAdapter (2D)
301 template <typename Space, typename KSpace>
302 template <typename TImageContainer, typename TFunctorD, typename TNewValue, typename TFunctorValue, typename TFunctorValueVm1>
303 inline
304 void
305 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const ImageAdapter<TImageContainer, DGtal::Z2i::Domain, TFunctorD, TNewValue, TFunctorValue, TFunctorValueVm1> & anImage )
306 {
307  drawImage2D(viewer, anImage, functors::Cast<unsigned int> (), anImage.myMode);
308 }
309 // ImageAdapter (2D)
310 
311 
312 // ConstImageAdapter (3D)
313 template <typename Space, typename KSpace>
314 template <typename TImageContainer, typename TFunctorD, typename TNewValue, typename TFunctorValue>
315 inline
316 void
317 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const ConstImageAdapter<TImageContainer, DGtal::Z3i::Domain, TFunctorD,
318  TNewValue, TFunctorValue> & anImage )
319 {
320  drawImage3D(viewer, anImage, functors::Cast<unsigned int> (), Viewer3D<Space,KSpace>::GrayScaleMode);
321 }
322 // ConstImageAdapter (3D)
323 
324 // ImageAdapter (3D)
325 template <typename Space, typename KSpace>
326 template <typename TImageContainer, typename TFunctorD, typename TNewValue,
327  typename TFunctorValue, typename TFunctorValueVm1>
328 inline
329 void
330 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
331  const ImageAdapter<TImageContainer, DGtal::Z3i::Domain, TFunctorD,
332  TNewValue, TFunctorValue, TFunctorValueVm1> & anImage )
333 {
334  drawImage3D(viewer, anImage, functors::Cast<unsigned int> (), anImage.myMode);
335 }
336 // ImageAdapter (3D)
337 
338 //HyperRectDomain
339 template <typename Space, typename KSpace>
340 template <typename SpaceDom>
341 inline
342 void
343 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
344  const DGtal::HyperRectDomain<SpaceDom> & aDomain )
345 {
346  std::string mode = viewer.getMode( aDomain.className() );
347  ASSERT((SpaceDom::dimension==3)|| (SpaceDom::dimension==2));
348 
349  ASSERT((SpaceDom::dimension!=3) || (mode=="" || mode=="Grid" || mode=="Paving"|| mode=="PavingPoints"|| mode=="PavingGrids" ||
350  mode=="BoundingBox")||
351  ("DGtal::Display3DFactory<Space,KSpace>::draw( Display3D<Space, KSpace> & viewer, const DGtal::HyperRectDomain<Space> & aDomain ): Unknown mode "+mode)=="");
352 
353 
354  ASSERT((SpaceDom::dimension!=2) || (mode=="" || mode=="BoundingBox" || mode=="InterGrid"|| mode=="Grid") ||
355  ("DGtal::Display3DFactory<Space,KSpace>::draw( Display3D<Space, KSpace> & viewer, const DGtal::HyperRectDomain<Space> & aDomain ): Unknown mode "+mode)=="");
356 
357  if(SpaceDom::dimension == 3){
358  if ( mode == "BoundingBox" )
359  {
360  viewer.createNewLineList(aDomain.className());
361  drawAsBoundingBox( viewer, aDomain );
362  }else if( ( mode == "" ) || (mode == "Grid"))
363  {
364  viewer.createNewLineList(aDomain.className());
365  drawAsGrid( viewer, aDomain );
366  }
367  else if ( mode == "Paving" )
368  {
369  viewer.createNewCubeList( );
370  drawAsPaving( viewer, aDomain );
371  }else if ( mode == "PavingGrids" )
372  {
373  viewer.createNewLineList(aDomain.className());
374  viewer.createNewCubeList( );
375  drawAsGrid( viewer, aDomain );
376  drawAsPaving( viewer, aDomain );
377  }
378  }else if(SpaceDom::dimension == 2)
379  {
380  if (mode=="")
381  mode="BoundingBox";
382  viewer.addImage2DDomainD3D(aDomain, mode);
383  }
384 
385 }
386 //end HyperRectDomain
387 
388 //----------------------------------------------------------------------------------------------
389 // heritage of methods
390 
391 
392 // SphericalAccumulator
393 template <typename Space, typename KSpace>
394 template <typename TVector>
395 inline
396 void
397 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::SphericalAccumulator<TVector> & accumulator,
398  const typename DGtal::Z3i::RealVector & shift,
399  const double radius)
400 {
401  DGtal::Display3DFactory<Space,KSpace>::draw ( viewer, accumulator, shift, radius);
402 }
403 // SphericalAccumulator
404 
405 // Mesh
406 template <typename Space, typename KSpace>
407 template <typename TPoint>
408 inline
409 void
410 DGtal::Viewer3DFactory<Space,KSpace>::drawAsFaces( Viewer3D<Space, KSpace> & viewer, const DGtal::Mesh<TPoint> & aMesh )
411 {
412  DGtal::Display3DFactory<Space,KSpace>::drawAsFaces( viewer, aMesh);
413 }
414 
415 template <typename Space, typename KSpace>
416 template <typename TPoint>
417 inline
418 void
419 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::Mesh<TPoint> & aMesh )
420 {
421  DGtal::Display3DFactory<Space,KSpace>::draw (viewer, aMesh);
422 }
423 // Mesh
424 
425 // StandardDSS6Computer
426 template <typename Space, typename KSpace>
427 template <typename TIterator, typename TInteger, int connectivity>
428 inline
429 DGtal::DrawableWithViewer3D *
430 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::StandardDSS6Computer<TIterator,TInteger,connectivity> & arithm )
431 {
432  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle(str, arithm);
433 }
434 
435 template <typename Space, typename KSpace>
436 template <typename TIterator, typename TInteger, int connectivity>
437 inline
438 void
439 DGtal::Viewer3DFactory<Space,KSpace>::drawAsBalls( Viewer3D<Space, KSpace> & viewer, const DGtal::StandardDSS6Computer<TIterator,TInteger,connectivity> & arithm )
440 {
441  DGtal::Display3DFactory<Space,KSpace>::drawAsBalls(viewer, arithm);
442 }
443 
444 template <typename Space, typename KSpace>
445 template <typename TIterator, typename TInteger, int connectivity>
446 inline
447 void
448 DGtal::Viewer3DFactory<Space,KSpace>::drawAsBoundingBox( Viewer3D<Space, KSpace> & viewer, const DGtal::StandardDSS6Computer<TIterator,TInteger,connectivity> & arithm )
449 {
450  DGtal::Display3DFactory<Space,KSpace>::drawAsBoundingBox(viewer, arithm);
451 }
452 
453 template <typename Space, typename KSpace>
454 template <typename TIterator, typename TInteger, int connectivity>
455 inline
456 void
457 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::StandardDSS6Computer<TIterator,TInteger,connectivity> & arithm )
458 {
459  DGtal::Display3DFactory<Space,KSpace>::draw(viewer , arithm);
460 }
461 // StandardDSS6Computer
462 
463 
464 // Naive3DDSSComputer
465 template <typename Space, typename KSpace>
466 template <typename TIterator, typename TInteger, int connectivity>
467 inline
468 DGtal::DrawableWithViewer3D *
469 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::Naive3DDSSComputer<TIterator,TInteger,connectivity> & arithm )
470 {
471  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle(str, arithm);
472 }
473 
474 template <typename Space, typename KSpace>
475 template <typename TIterator, typename TInteger, int connectivity>
476 inline
477 void
478 DGtal::Viewer3DFactory<Space,KSpace>::drawAsBalls( Viewer3D<Space, KSpace> & viewer, const DGtal::Naive3DDSSComputer<TIterator,TInteger,connectivity> & arithm )
479 {
480  DGtal::Display3DFactory<Space,KSpace>::drawAsBalls(viewer, arithm);
481 }
482 
483 template <typename Space, typename KSpace>
484 template <typename TIterator, typename TInteger, int connectivity>
485 inline
486 void
487 DGtal::Viewer3DFactory<Space,KSpace>::drawAsBoundingBox( Viewer3D<Space, KSpace> & viewer, const DGtal::Naive3DDSSComputer<TIterator,TInteger,connectivity> & arithm )
488 {
489  DGtal::Display3DFactory<Space,KSpace>::drawAsBoundingBox(viewer, arithm);
490 }
491 
492 template <typename Space, typename KSpace>
493 template <typename TIterator, typename TInteger, int connectivity>
494 inline
495 void
496 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::Naive3DDSSComputer<TIterator,TInteger,connectivity> & arithm )
497 {
498  DGtal::Display3DFactory<Space,KSpace>::draw(viewer , arithm);
499 }
500 // Naive3DDSSComputer
501 
502 // DigitalSetBySTLSet
503 template <typename Space, typename KSpace>
504 template<typename Domain, typename Compare>
505 inline
506 DGtal::DrawableWithViewer3D *
507 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::DigitalSetBySTLSet<Domain, Compare> & aSet )
508 {
509  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle(str, aSet);
510 }
511 
512 template <typename Space, typename KSpace>
513 template<typename Domain, typename Compare>
514 inline
515 void
516 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPavingTransparent( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLSet<Domain, Compare> & aSet )
517 {
518  DGtal::Display3DFactory<Space,KSpace>::drawAsPavingTransparent(viewer, aSet);
519 }
520 
521 template <typename Space, typename KSpace>
522 template<typename Domain, typename Compare>
523 inline
524 void
525 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPaving( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLSet<Domain, Compare> & aSet )
526 {
527  DGtal::Display3DFactory<Space,KSpace>::drawAsPaving( viewer, aSet);
528 }
529 
530 template <typename Space, typename KSpace>
531 template<typename Domain, typename Compare>
532 inline
533 void
534 DGtal::Viewer3DFactory<Space,KSpace>::drawAsGrid( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLSet<Domain, Compare> & aSet )
535 {
536  DGtal::Display3DFactory<Space,KSpace>::drawAsGrid(viewer, aSet);
537 }
538 
539 template <typename Space, typename KSpace>
540 template<typename Domain, typename Compare>
541 inline
542 void
543 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLSet<Domain, Compare> & aSet )
544 {
545  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aSet);
546 }
547 // DigitalSetBySTLSet
548 
549 
550 // DigitalSetByAssociativeContainer
551 template <typename Space, typename KSpace>
552 template<typename Domain, typename Container>
553 inline
554 DGtal::DrawableWithViewer3D *
555 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & aSet )
556 {
557  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle(str, aSet);
558 }
559 
560 template <typename Space, typename KSpace>
561 template<typename Domain, typename Container>
562 inline
563 void
564 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPavingTransparent( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & aSet )
565 {
566  DGtal::Display3DFactory<Space,KSpace>::drawAsPavingTransparent(viewer, aSet);
567 }
568 
569 template <typename Space, typename KSpace>
570 template<typename Domain, typename Container>
571 inline
572 void
573 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPaving( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & aSet )
574 {
575  DGtal::Display3DFactory<Space,KSpace>::drawAsPaving( viewer, aSet);
576 }
577 
578 template <typename Space, typename KSpace>
579 template<typename Domain, typename Container>
580 inline
581 void
582 DGtal::Viewer3DFactory<Space,KSpace>::drawAsGrid( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & aSet )
583 {
584  DGtal::Display3DFactory<Space,KSpace>::drawAsGrid(viewer, aSet);
585 }
586 
587 template <typename Space, typename KSpace>
588 template<typename Domain, typename Container>
589 inline
590 void
591 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & aSet )
592 {
593  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aSet);
594 }
595 // DigitalSetByAssociativeContainer
596 
597 // DigitalSetBySTLVector
598 template <typename Space, typename KSpace>
599 template<typename Domain>
600 inline
601 DGtal::DrawableWithViewer3D *
602 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::DigitalSetBySTLVector<Domain> & aSet )
603 {
604  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle(str, aSet);
605 }
606 
607 template <typename Space, typename KSpace>
608 template<typename Domain>
609 inline
610 void
611 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPavingTransparent( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLVector<Domain> & aSet )
612 {
613  DGtal::Display3DFactory<Space,KSpace>::drawAsPavingTransparent( viewer, aSet);
614 }
615 
616 template <typename Space, typename KSpace>
617 template<typename Domain>
618 inline
619 void
620 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPaving( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLVector<Domain> & aSet )
621 {
622  DGtal::Display3DFactory<Space,KSpace>::drawAsPaving( viewer, aSet);
623 }
624 
625 template <typename Space, typename KSpace>
626 template<typename Domain>
627 inline
628 void
629 DGtal::Viewer3DFactory<Space,KSpace>::drawAsGrid( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLVector<Domain> & aSet )
630 {
631  DGtal::Display3DFactory<Space,KSpace>::drawAsGrid(viewer, aSet);
632 }
633 
634 template <typename Space, typename KSpace>
635 template<typename Domain>
636 inline
637 void
638 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::DigitalSetBySTLVector<Domain> & aSet )
639 {
640  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aSet);
641 }
642 // DigitalSetBySTLVector
643 
644 
645 // HyperRectDomain
646 template <typename Space, typename KSpace>
647 template <typename SpaceDom>
648 inline
649 DGtal::DrawableWithViewer3D *
650 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::HyperRectDomain<SpaceDom> & aDomain )
651 {
652  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle( str, aDomain);
653 }
654 
655 template <typename Space, typename KSpace>
656 template <typename SpaceDom>
657 inline
658 void
659 DGtal::Viewer3DFactory<Space,KSpace>::drawAsBoundingBox( Viewer3D<Space, KSpace> & viewer, const DGtal::HyperRectDomain<SpaceDom> & aDomain )
660 {
661  DGtal::Display3DFactory<Space,KSpace>::drawAsBoundingBox( viewer, aDomain);
662 }
663 
664 template <typename Space, typename KSpace>
665 template <typename SpaceDom>
666 inline
667 void
668 DGtal::Viewer3DFactory<Space,KSpace>::drawAsGrid( Viewer3D<Space, KSpace> & viewer, const DGtal::HyperRectDomain<SpaceDom> & aDomain )
669 {
670  DGtal::Display3DFactory<Space,KSpace>::drawAsGrid( viewer, aDomain);
671 }
672 
673 template <typename Space, typename KSpace>
674 template <typename SpaceDom>
675 inline
676 void
677 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPavingBalls( Viewer3D<Space, KSpace> & viewer, const DGtal::HyperRectDomain<SpaceDom> & aDomain )
678 {
679  DGtal::Display3DFactory<Space,KSpace>::drawAsPavingBalls( viewer, aDomain);
680 }
681 
682 template <typename Space, typename KSpace>
683 template <typename SpaceDom>
684 inline
685 void
686 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPaving( Viewer3D<Space, KSpace> & viewer, const DGtal::HyperRectDomain<SpaceDom> & aDomain )
687 {
688  DGtal::Display3DFactory<Space,KSpace>::drawAsPaving( viewer, aDomain);
689 }
690 
691 
692 // HyperRectDomain
693 
694 
695 // KhalimskyCell
696 template <typename Space, typename KSpace>
697 inline
698 DGtal::DrawableWithViewer3D *
699 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const typename KSpace::Cell & aCell )
700 {
701  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle(str, aCell);
702 }
703 
704 template <typename Space, typename KSpace>
705 inline
706 void
707 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const typename KSpace::Cell & aCell )
708 {
709  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aCell);
710 }
711 // KhalimskyCell
712 
713 
714 // Object
715 template <typename Space, typename KSpace>
716 template <typename TDigitalTopology, typename TDigitalSet>
717 inline
718 DGtal::DrawableWithViewer3D *
719 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::Object<TDigitalTopology, TDigitalSet> & anObject )
720 {
721  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle( str, anObject);
722 }
723 
724 template <typename Space, typename KSpace>
725 template <typename TDigitalTopology, typename TDigitalSet>
726 inline
727 void
728 DGtal::Viewer3DFactory<Space,KSpace>::drawWithAdjacencies( Viewer3D<Space, KSpace> & viewer, const DGtal::Object<TDigitalTopology, TDigitalSet> & anObject )
729 {
730  DGtal::Display3DFactory<Space,KSpace>::drawWithAdjacencies( viewer, anObject);
731 }
732 
733 template <typename Space, typename KSpace>
734 template <typename TDigitalTopology, typename TDigitalSet>
735 inline
736 void
737 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::Object<TDigitalTopology, TDigitalSet> & anObject )
738 {
739  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, anObject);
740 }
741 // Object
742 
743 
744 // PointVector
745 template <typename Space, typename KSpace>
746 template< DGtal::Dimension dim, typename TComponent, typename TContainer>
747 inline
748 DGtal::DrawableWithViewer3D *
749 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const DGtal::PointVector<dim, TComponent, TContainer> & aPoint )
750 {
751  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle( str, aPoint);
752 }
753 
754 template <typename Space, typename KSpace>
755 template< DGtal::Dimension dim, typename TComponent, typename TContainer>
756 inline
757 void
758 DGtal::Viewer3DFactory<Space,KSpace>::drawAsGrid( Viewer3D<Space, KSpace> & viewer, const DGtal::PointVector<dim, TComponent, TContainer> & aPoint )
759 {
760  DGtal::Display3DFactory<Space,KSpace>::drawAsGrid( viewer, aPoint);
761 }
762 
763 template <typename Space, typename KSpace>
764 template< DGtal::Dimension dim, typename TComponent, typename TContainer>
765 inline
766 void
767 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPaving( Viewer3D<Space, KSpace> & viewer, const DGtal::PointVector<dim, TComponent, TContainer> & aPoint )
768 {
769  DGtal::Display3DFactory<Space,KSpace>::drawAsPaving( viewer, aPoint);
770 }
771 
772 template <typename Space, typename KSpace>
773 template< DGtal::Dimension dim, typename TComponent, typename TContainer>
774 inline
775 void
776 DGtal::Viewer3DFactory<Space,KSpace>::drawAsPavingWired( Viewer3D<Space, KSpace> & viewer, const DGtal::PointVector<dim, TComponent, TContainer> & aPoint )
777 {
778  DGtal::Display3DFactory<Space,KSpace>::drawAsPavingWired( viewer, aPoint);
779 }
780 
781 template <typename Space, typename KSpace>
782 template< DGtal::Dimension dim, typename TComponent, typename TContainer>
783 inline
784 void
785 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::PointVector<dim, TComponent, TContainer> & aPoint )
786 {
787  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aPoint);
788 }
789 
790 template <typename Space, typename KSpace>
791 template< DGtal::Dimension dim, typename TComponent1, typename TComponent2, typename TContainer1, typename TContainer2>
792 inline
793 void
794 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::PointVector<dim, TComponent1, TContainer1> & aPoint, const DGtal::PointVector<dim, TComponent2, TContainer2> & aPoint2 )
795 {
796  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aPoint, aPoint2);
797 }
798 // PointVector
799 
800 
801 // SignedKhalimskyCell
802 template <typename Space, typename KSpace>
803 inline
804 DGtal::DrawableWithViewer3D *
805 DGtal::Viewer3DFactory<Space,KSpace>::defaultStyle( std::string str, const typename KSpace::SCell & aSCell )
806 {
807  return DGtal::Display3DFactory<Space,KSpace>::defaultStyle( str, aSCell);
808 }
809 
810 template <typename Space, typename KSpace>
811 inline
812 void
813 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const typename KSpace::SCell & aSCell )
814 {
815  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aSCell);
816 }
817 // SignedKhalimskyCell
818 
819 // GridCurve
820 template <typename Space, typename KSpace>
821 inline
822 void
823 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::GridCurve<KSpace> & aGrid )
824 {
825  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aGrid);
826 }
827 // GridCurve
828 
829 // SCellsRange
830 template <typename Space, typename KSpace>
831 template < typename TIterator, typename TSCell>
832 inline
833 void
834 DGtal::Viewer3DFactory<Space,KSpace>::draw( DGtal::Viewer3D<Space, KSpace> & viewer,
835  const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::Identity, TSCell> & aRangeAdapter )
836 {
837  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aRangeAdapter);
838 }
839 // SCellsRange
840 
841 // PointsRange
842 template <typename Space, typename KSpace>
843 template <typename TIterator>
844 inline
845 void
846 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
847  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToPoint<KSpace>, typename KSpace::Point> & aRangeAdapter )
848 {
849  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aRangeAdapter);
850 }
851 // PointsRange
852 
853 // MidPointsRange
854 template <typename Space, typename KSpace>
855 template <typename TIterator>
856 inline
857 void
858 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
859  const DGtal::ConstRangeAdapter<TIterator, CanonicSCellEmbedder<KSpace>, typename KSpace::Space::RealPoint> & aRangeAdapter )
860 {
861  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aRangeAdapter);
862 }
863 // MidPointsRange
864 
865 // ArrowsRange
866 template <typename Space, typename KSpace>
867 template <typename TIterator>
868 inline
869 void
870 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
871  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToArrow<KSpace>, std::pair<typename KSpace::Point, typename KSpace::Vector > > & aRangeAdapter )
872 {
873  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aRangeAdapter);
874 }
875 // ArrowsRange
876 
877 // InnerPointsRange
878 template <typename Space, typename KSpace>
879 template <typename TIterator>
880 inline
881 void
882 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
883  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToInnerPoint<KSpace>, typename KSpace::Point> & aRangeAdapter )
884 {
885  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aRangeAdapter);
886 }
887 // InnerPointsRange
888 
889 // OuterPointsRange
890 template <typename Space, typename KSpace>
891 template <typename TIterator>
892 inline
893 void
894 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
895  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToOuterPoint<KSpace>, typename KSpace::Point> & aRangeAdapter )
896 {
897  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aRangeAdapter);
898 }
899 // OuterPointsRange
900 
901 // IncidentPointsRange
902 template <typename Space, typename KSpace>
903 template <typename TIterator>
904 inline
905 void
906 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer,
907  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToIncidentPoints<KSpace>,std::pair<typename KSpace::Point, typename KSpace::Point > > & aRangeAdapter )
908 {
909  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aRangeAdapter);
910 }
911 // IncidentPointsRange
912 
913 
914 
915 template <typename Space, typename KSpace>
916 template < typename TImageType2D, typename TFunctor>
917 inline
918 void
919 DGtal::Viewer3DFactory<Space,KSpace>::drawImage2D( Viewer3D<Space, KSpace> & viewer, const TImageType2D & anImage, const TFunctor & aFunctor,
920  typename Viewer3D<Space, KSpace>::TextureMode aTextureMode )
921 {
922  std::string mode = viewer.getMode( anImage.className() );
923  ASSERT( (mode=="BoundingBox" || mode=="InterGrid" || mode=="Grid"|| mode=="") ||
924  ("DGtal::Display3DFactory<Space,KSpace>::draw( Display3D<Space, KSpace> & viewer,const TImageType2D & anImage ): Unknown mode "+mode)=="");
925 
926  if(mode=="")
927  {
928  typename Viewer3D<Space, KSpace>::TextureImage aGSImage(anImage, aFunctor,Viewer3D<Space, KSpace>::zDirection, 0,0,0, aTextureMode);
929  viewer.addTextureImage(aGSImage);
930  }else if(mode=="BoundingBox" || mode == "InterGrid" || mode == "Grid")
931  {
932  typename Viewer3D<Space, KSpace>::TextureImage aGSImage(anImage, aFunctor, Viewer3D<Space, KSpace>::zDirection, 0,0,0, aTextureMode);
933  aGSImage.myDrawDomain = true;
934  viewer << SetMode3D( anImage.domain().className(), mode );
935  viewer << anImage.domain();
936  aGSImage.myIndexDomain = viewer.getCurrentDomainNumber()-1;
937  viewer.addTextureImage(aGSImage);
938  }
939 }
940 
941 template <typename Space, typename KSpace>
942 inline
943 void
944 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::SetMode3D & aMode)
945 {
946  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aMode);
947 }
948 
949 template <typename Space, typename KSpace>
950 inline
951 void
952 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::CustomStyle3D & aStyle)
953 {
954  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aStyle);
955 }
956 
957 template <typename Space, typename KSpace>
958 inline
959 void
960 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::CustomColors3D & aColor)
961 {
962  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aColor);
963 }
964 
965 template <typename Space, typename KSpace>
966 inline
967 void
968 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::ClippingPlane & aClipping)
969 {
970  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aClipping);
971 }
972 
973 
974 template <typename Space, typename KSpace>
975 inline
976 void
977 DGtal::Viewer3DFactory<Space,KSpace>::draw( Viewer3D<Space, KSpace> & viewer, const DGtal::TransformedPrism & aTransformedPrism)
978 {
979  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aTransformedPrism);
980 }
981 
982 //-----------------------------------------------------------------------------
983 template <typename Space, typename KSpace>
984 inline
985 void
986 DGtal::Viewer3DFactory<Space,KSpace>::
987 draw( Viewer3D<Space,KSpace> & viewer, const DGtal::SetName3D& aName3d )
988 {
989  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aName3d );
990 }
991 //-----------------------------------------------------------------------------
992 template <typename Space, typename KSpace>
993 inline
994 void
995 DGtal::Viewer3DFactory<Space,KSpace>::
996 draw( Viewer3D<Space,KSpace> & viewer, const DGtal::SetSelectCallback3D& aFct )
997 {
998  DGtal::Display3DFactory<Space,KSpace>::draw( viewer, aFct );
999 }
1000 //-----------------------------------------------------------------------------
1001 
1002 
1003 // end heritage
1004 //----------------------------------------------------------------------------------------------
1005 
1006 
1007 //
1008 ///////////////////////////////////////////////////////////////////////////////