DGtal  0.9.3beta
Public Member Functions | Data Fields
DGtal::Viewer3D< Space, KSpace >::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 Space = SpaceND<3>, typename KSpace = KhalimskySpaceND<3>>
struct DGtal::Viewer3D< Space, KSpace >::CompFarthestVoxelFromCamera

Used to sort pixel from camera

Definition at line 883 of file Viewer3D.h.

Member Function Documentation

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

Definition at line 886 of file Viewer3D.h.

References DGtal::Display3D< Space, KSpace >::CubeD3D::center.

888  {
889  double dist1= sqrt ( ( posCam.x-s1.center[0] ) * ( posCam.x-s1.center[0] ) + ( posCam.y-s1.center[1] ) * ( posCam.y-s1.center[1] ) + ( posCam.z-s1.center[2] ) * ( posCam.z-s1.center[2] ) );
890  double dist2= sqrt ( ( posCam.x-s2.center[0] ) * ( posCam.x-s2.center[0] ) + ( posCam.y-s2.center[1] ) * ( posCam.y-s2.center[1] ) + ( posCam.z-s2.center[2] ) * ( posCam.z-s2.center[2] ) );
891  return dist1>dist2;
892  }

Field Documentation

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

Definition at line 885 of file Viewer3D.h.


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