DGtal  1.5.beta
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 1070 of file Viewer3D.h.

Member Function Documentation

◆ operator()()

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

1075  {
1076  double dist1 =
1077  sqrt( ( posCam.x - s1.center[ 0 ] ) * ( posCam.x - s1.center[ 0 ] ) +
1078  ( posCam.y - s1.center[ 1 ] ) * ( posCam.y - s1.center[ 1 ] ) +
1079  ( posCam.z - s1.center[ 2 ] ) * ( posCam.z - s1.center[ 2 ] ) );
1080  double dist2 =
1081  sqrt( ( posCam.x - s2.center[ 0 ] ) * ( posCam.x - s2.center[ 0 ] ) +
1082  ( posCam.y - s2.center[ 1 ] ) * ( posCam.y - s2.center[ 1 ] ) +
1083  ( posCam.z - s2.center[ 2 ] ) * ( posCam.z - s2.center[ 2 ] ) );
1084  return dist1 > dist2;
1085  }

References DGtal::Viewer3D< TSpace, TKSpace >::CompFarthestVoxelFromCamera::posCam.

Field Documentation

◆ posCam

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

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