Developer Documentation
ACG::GLTrackball Class Reference

Public Member Functions

 GLTrackball (GLState &_state)
 
void set_center (const Vec3f &_center)
 
void mouse_press (int button, int x, int y)
 
void mouse_move (int x, int y)
 
void mouse_release (int button, int x, int y)
 

Private Types

enum  { ROTATION , TRANSLATION , ZOOM }
 

Private Member Functions

void rotation (int x, int y)
 
void translation (int x, int y)
 
void zoom (int x, int y)
 
bool map_to_sphere (const Vec2i &_point, Vec3f &_result)
 

Private Attributes

GLStateglstate_
 
ACG::Vec3d center_
 
Vec2i last_point_2D_
 
Vec3f last_point_3D_
 
bool last_point_ok_
 
enum ACG::GLTrackball:: { ... }  action_
 
bool button_down_ [10]
 

Detailed Description

Definition at line 71 of file GLTrackball.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Definition at line 101 of file GLTrackball.hh.

Constructor & Destructor Documentation

◆ GLTrackball()

ACG::GLTrackball::GLTrackball ( GLState _state)
explicit

Definition at line 65 of file GLTrackball.cc.

◆ ~GLTrackball()

ACG::GLTrackball::~GLTrackball ( )
inline

Definition at line 76 of file GLTrackball.hh.

Member Function Documentation

◆ map_to_sphere()

bool ACG::GLTrackball::map_to_sphere ( const Vec2i _point,
Vec3f _result 
)
private

Definition at line 213 of file GLTrackball.cc.

◆ mouse_move()

void ACG::GLTrackball::mouse_move ( int  x,
int  y 
)

Definition at line 111 of file GLTrackball.cc.

◆ mouse_press()

void ACG::GLTrackball::mouse_press ( int  button,
int  x,
int  y 
)

Definition at line 81 of file GLTrackball.cc.

◆ mouse_release()

void ACG::GLTrackball::mouse_release ( int  button,
int  x,
int  y 
)

Definition at line 94 of file GLTrackball.cc.

◆ rotation()

void ACG::GLTrackball::rotation ( int  x,
int  y 
)
private

Definition at line 136 of file GLTrackball.cc.

◆ set_center()

void ACG::GLTrackball::set_center ( const Vec3f _center)
inline

Definition at line 78 of file GLTrackball.hh.

◆ translation()

void ACG::GLTrackball::translation ( int  x,
int  y 
)
private

Definition at line 170 of file GLTrackball.cc.

◆ zoom()

void ACG::GLTrackball::zoom ( int  x,
int  y 
)
private

Definition at line 196 of file GLTrackball.cc.

Member Data Documentation

◆ button_down_

bool ACG::GLTrackball::button_down_[10]
private

Definition at line 102 of file GLTrackball.hh.

◆ center_

ACG::Vec3d ACG::GLTrackball::center_
private

Definition at line 95 of file GLTrackball.hh.

◆ glstate_

GLState& ACG::GLTrackball::glstate_
private

Definition at line 94 of file GLTrackball.hh.

◆ last_point_2D_

Vec2i ACG::GLTrackball::last_point_2D_
private

Definition at line 97 of file GLTrackball.hh.

◆ last_point_3D_

Vec3f ACG::GLTrackball::last_point_3D_
private

Definition at line 98 of file GLTrackball.hh.

◆ last_point_ok_

bool ACG::GLTrackball::last_point_ok_
private

Definition at line 99 of file GLTrackball.hh.


The documentation for this class was generated from the following files: