ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::visualization::gl_util Namespace Reference

Typedefs

typedef Eigen::Matrix< float, 3, 1, Eigen::ColMajor > GLVector3f
 
typedef Eigen::Matrix< float, 4, 1, Eigen::ColMajor > GLVector4f
 
typedef Eigen::Matrix< float, 4, 4, Eigen::ColMajor > GLMatrix4f
 

Functions

const std::unordered_map< int, unsigned int > & GetTextureFormatMap ()
 
const std::unordered_map< int, unsigned int > & GetTextureTypeMap ()
 
GLMatrix4f LookAt (const Eigen::Vector3d &eye, const Eigen::Vector3d &lookat, const Eigen::Vector3d &up)
 
GLMatrix4f Perspective (double field_of_view_, double aspect, double z_near, double z_far)
 
GLMatrix4f Ortho (double left, double right, double bottom, double top, double z_near, double z_far)
 
Eigen::Vector3d Project (const Eigen::Vector3d &point, const GLMatrix4f &mvp_matrix, const int width, const int height)
 
Eigen::Vector3d Unproject (const Eigen::Vector3d &screen_point, const GLMatrix4f &mvp_matrix, const int width, const int height)
 
int ColorCodeToPickIndex (const Eigen::Vector4i &color)
 

Variables

static const std::unordered_map< int, unsigned int > texture_format_map_
 
static const std::unordered_map< int, unsigned int > texture_type_map_
 

Typedef Documentation

◆ GLMatrix4f

typedef Eigen::Matrix<float, 4, 4, Eigen::ColMajor> cloudViewer::visualization::gl_util::GLMatrix4f

Definition at line 35 of file GLHelper.h.

◆ GLVector3f

typedef Eigen::Matrix<float, 3, 1, Eigen::ColMajor> cloudViewer::visualization::gl_util::GLVector3f

Definition at line 33 of file GLHelper.h.

◆ GLVector4f

typedef Eigen::Matrix<float, 4, 1, Eigen::ColMajor> cloudViewer::visualization::gl_util::GLVector4f

Definition at line 34 of file GLHelper.h.

Function Documentation

◆ ColorCodeToPickIndex()

int cloudViewer::visualization::gl_util::ColorCodeToPickIndex ( const Eigen::Vector4i &  color)

◆ GetTextureFormatMap()

const std::unordered_map< int, unsigned int > & cloudViewer::visualization::gl_util::GetTextureFormatMap ( )

Definition at line 23 of file GLHelper.cpp.

References texture_format_map_.

◆ GetTextureTypeMap()

const std::unordered_map< int, unsigned int > & cloudViewer::visualization::gl_util::GetTextureTypeMap ( )

Definition at line 27 of file GLHelper.cpp.

References texture_type_map_.

◆ LookAt()

GLMatrix4f cloudViewer::visualization::gl_util::LookAt ( const Eigen::Vector3d &  eye,
const Eigen::Vector3d &  lookat,
const Eigen::Vector3d &  up 
)

◆ Ortho()

GLMatrix4f cloudViewer::visualization::gl_util::Ortho ( double  left,
double  right,
double  bottom,
double  top,
double  z_near,
double  z_far 
)

◆ Perspective()

GLMatrix4f cloudViewer::visualization::gl_util::Perspective ( double  field_of_view_,
double  aspect,
double  z_near,
double  z_far 
)

◆ Project()

Eigen::Vector3d cloudViewer::visualization::gl_util::Project ( const Eigen::Vector3d &  point,
const GLMatrix4f mvp_matrix,
const int  width,
const int  height 
)

Definition at line 82 of file GLHelper.cpp.

References height, and width.

◆ Unproject()

Eigen::Vector3d cloudViewer::visualization::gl_util::Unproject ( const Eigen::Vector3d &  screen_point,
const GLMatrix4f mvp_matrix,
const int  width,
const int  height 
)

Variable Documentation

◆ texture_format_map_

const std::unordered_map<int, unsigned int> cloudViewer::visualization::gl_util::texture_format_map_
static
Initial value:
= {
{1, GL_RED}, {3, GL_RGB}, {4, GL_RGBA}}

Definition at line 17 of file GLHelper.cpp.

Referenced by GetTextureFormatMap().

◆ texture_type_map_

const std::unordered_map<int, unsigned int> cloudViewer::visualization::gl_util::texture_type_map_
static
Initial value:
= {
{1, GL_UNSIGNED_BYTE}, {2, GL_UNSIGNED_SHORT}, {4, GL_FLOAT}}

Definition at line 20 of file GLHelper.cpp.

Referenced by GetTextureTypeMap().