DGtal  1.0.0
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 1048 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 1051 of file Viewer3D.h.

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

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: