DGtal  0.9.4beta
Public Member Functions | Data Fields
DGtal::Viewer3D< TSpace, TKSpace >::CompFarthestVoxelFromCamera Struct Reference

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

Public Member Functions

bool operator() (typename Viewer3D< Space, KSpace >::CubeD3D s1, typename Viewer3D< Space, KSpace >::CubeD3D s2)
 

Data Fields

qglviewer::Vec posCam
 

Detailed Description

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

Used to sort pixel from camera

Definition at line 1046 of file Viewer3D.h.

Member Function Documentation

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
bool DGtal::Viewer3D< TSpace, TKSpace >::CompFarthestVoxelFromCamera::operator() ( typename Viewer3D< Space, KSpace >::CubeD3D  s1,
typename Viewer3D< Space, KSpace >::CubeD3D  s2 
)
inline

Definition at line 1049 of file Viewer3D.h.

1051  {
1052  double dist1 =
1053  sqrt( ( posCam.x - s1.center[ 0 ] ) * ( posCam.x - s1.center[ 0 ] ) +
1054  ( posCam.y - s1.center[ 1 ] ) * ( posCam.y - s1.center[ 1 ] ) +
1055  ( posCam.z - s1.center[ 2 ] ) * ( posCam.z - s1.center[ 2 ] ) );
1056  double dist2 =
1057  sqrt( ( posCam.x - s2.center[ 0 ] ) * ( posCam.x - s2.center[ 0 ] ) +
1058  ( posCam.y - s2.center[ 1 ] ) * ( posCam.y - s2.center[ 1 ] ) +
1059  ( posCam.z - s2.center[ 2 ] ) * ( posCam.z - s2.center[ 2 ] ) );
1060  return dist1 > dist2;
1061  }

Field Documentation

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

Definition at line 1048 of file Viewer3D.h.


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