Public Member Functions | Protected Member Functions | Protected Attributes
NDTVizGlut Class Reference

An OpenGL class to draw 3D stuff. More...

#include <NDTVizGlut.hh>

List of all members.

Public Member Functions

void addObject (NDTVizGlutObject *object)
 Add an object to draw.
void clearScene ()
virtual void draw_origin ()
unsigned char getPushedKey ()
bool isOpen () const
bool keyHit () const
 NDTVizGlut ()
 Constructor.
virtual void process_events ()
 Process events.
void repaint ()
 Set the drawing style.
int save (const std::string &fileName)
 Save an image (screenshot) of current view.
void set_save_inc_flag (bool flag)
 Start/stop saving incrementally (to create movies).
void setCameraPointingToPoint (double x, double y, double z)
void setCameraPosition (double x, double y, double z)
virtual void start_main_loop ()
virtual void start_main_loop_own_thread ()
void update_cam ()
virtual void win_close ()
 Close windo callback.
virtual void win_idle ()
 Idle callback.
virtual void win_key (unsigned char key, int x, int y)
 Key callback function.
virtual void win_motion (int x, int y)
 Mouse callback.
virtual void win_mouse (int button, int state, int x, int y)
 Mouse callback.
virtual void win_redraw ()
 Redraw the window.
virtual void win_reshape (int width, int height)
 Reshape events.
virtual int win_run (int *argc, char **argv)
 Run the GUI.
virtual ~NDTVizGlut ()
 Destructor.

Protected Member Functions

void cam_rotate ()
virtual void draw ()
 Put the code to draw here.
int save_inc ()
 Saves a set of images.

Protected Attributes

float cam_azim
Eigen::Vector3f cam_dir
Eigen::Vector3f cam_pos
float cam_radius
bool cam_sweep
float cam_sweep_ang
float cam_sweep_speed
NDTVizGlutXYOrbitCamera camera
bool do_save_inc
pthread_t glut_event_processing_thread
int gui_pause
std::vector< NDTVizGlutObject * > objects
bool open
std::deque< unsigned char > pressed_keys
int save_inc_counter
int show_grid
int show_samples
double start_time

Detailed Description

An OpenGL class to draw 3D stuff.

Based on the glut library. NOTE, this requires freeglut, not the ordinary GLUT, since it requires glutMainLoopEvent() function.

Definition at line 483 of file NDTVizGlut.hh.


Constructor & Destructor Documentation

Constructor.

Definition at line 83 of file NDTVizGlut.cc.

NDTVizGlut::~NDTVizGlut ( ) [virtual]

Destructor.

Definition at line 111 of file NDTVizGlut.cc.


Member Function Documentation

void NDTVizGlut::addObject ( NDTVizGlutObject object) [inline]

Add an object to draw.

Definition at line 531 of file NDTVizGlut.hh.

void NDTVizGlut::cam_rotate ( ) [protected]

Definition at line 395 of file NDTVizGlut.cc.

void NDTVizGlut::draw ( ) [protected, virtual]

Put the code to draw here.

This is called from the win_redraw function, which's also draws the origin (0,0) of the 2D space.

Definition at line 201 of file NDTVizGlut.cc.

void NDTVizGlut::draw_origin ( ) [virtual]

Definition at line 328 of file NDTVizGlut.cc.

unsigned char NDTVizGlut::getPushedKey ( )

Definition at line 250 of file NDTVizGlut.cc.

bool NDTVizGlut::isOpen ( ) const

Definition at line 240 of file NDTVizGlut.cc.

bool NDTVizGlut::keyHit ( ) const

Definition at line 245 of file NDTVizGlut.cc.

void NDTVizGlut::process_events ( ) [virtual]

Process events.

Definition at line 267 of file NDTVizGlut.cc.

Set the drawing style.

Definition at line 389 of file NDTVizGlut.cc.

int NDTVizGlut::save ( const std::string &  fileName)

Save an image (screenshot) of current view.

Definition at line 352 of file NDTVizGlut.cc.

int NDTVizGlut::save_inc ( ) [protected]

Saves a set of images.

Definition at line 344 of file NDTVizGlut.cc.

void NDTVizGlut::set_save_inc_flag ( bool  flag) [inline]

Start/stop saving incrementally (to create movies).

Definition at line 528 of file NDTVizGlut.hh.

void NDTVizGlut::setCameraPointingToPoint ( double  x,
double  y,
double  z 
)

Definition at line 400 of file NDTVizGlut.cc.

void NDTVizGlut::setCameraPosition ( double  x,
double  y,
double  z 
)

Definition at line 406 of file NDTVizGlut.cc.

virtual void NDTVizGlut::start_main_loop ( ) [inline, virtual]

Definition at line 508 of file NDTVizGlut.hh.

virtual void NDTVizGlut::start_main_loop_own_thread ( ) [inline, virtual]

Definition at line 512 of file NDTVizGlut.hh.

Definition at line 118 of file NDTVizGlut.cc.

void NDTVizGlut::win_close ( ) [virtual]

Close windo callback.

Definition at line 233 of file NDTVizGlut.cc.

void NDTVizGlut::win_idle ( ) [virtual]

Idle callback.

Definition at line 220 of file NDTVizGlut.cc.

void NDTVizGlut::win_key ( unsigned char  key,
int  x,
int  y 
) [virtual]

Key callback function.

Definition at line 130 of file NDTVizGlut.cc.

void NDTVizGlut::win_motion ( int  x,
int  y 
) [virtual]

Mouse callback.

Definition at line 147 of file NDTVizGlut.cc.

void NDTVizGlut::win_mouse ( int  button,
int  state,
int  x,
int  y 
) [virtual]

Mouse callback.

Definition at line 137 of file NDTVizGlut.cc.

void NDTVizGlut::win_redraw ( ) [virtual]

Redraw the window.

Definition at line 186 of file NDTVizGlut.cc.

void NDTVizGlut::win_reshape ( int  width,
int  height 
) [virtual]

Reshape events.

Definition at line 159 of file NDTVizGlut.cc.

int NDTVizGlut::win_run ( int *  argc,
char **  argv 
) [virtual]

Run the GUI.

Definition at line 276 of file NDTVizGlut.cc.


Member Data Documentation

float NDTVizGlut::cam_azim [protected]

Definition at line 585 of file NDTVizGlut.hh.

Eigen::Vector3f NDTVizGlut::cam_dir [protected]

Definition at line 581 of file NDTVizGlut.hh.

Eigen::Vector3f NDTVizGlut::cam_pos [protected]

Definition at line 580 of file NDTVizGlut.hh.

float NDTVizGlut::cam_radius [protected]

Definition at line 583 of file NDTVizGlut.hh.

bool NDTVizGlut::cam_sweep [protected]

Definition at line 589 of file NDTVizGlut.hh.

float NDTVizGlut::cam_sweep_ang [protected]

Definition at line 584 of file NDTVizGlut.hh.

float NDTVizGlut::cam_sweep_speed [protected]

Definition at line 587 of file NDTVizGlut.hh.

Definition at line 598 of file NDTVizGlut.hh.

bool NDTVizGlut::do_save_inc [protected]

Definition at line 592 of file NDTVizGlut.hh.

Definition at line 568 of file NDTVizGlut.hh.

int NDTVizGlut::gui_pause [protected]

Definition at line 572 of file NDTVizGlut.hh.

std::vector<NDTVizGlutObject*> NDTVizGlut::objects [protected]

Definition at line 597 of file NDTVizGlut.hh.

bool NDTVizGlut::open [protected]

Definition at line 594 of file NDTVizGlut.hh.

std::deque<unsigned char> NDTVizGlut::pressed_keys [protected]

Definition at line 600 of file NDTVizGlut.hh.

Definition at line 591 of file NDTVizGlut.hh.

int NDTVizGlut::show_grid [protected]

Definition at line 576 of file NDTVizGlut.hh.

int NDTVizGlut::show_samples [protected]

Definition at line 575 of file NDTVizGlut.hh.

double NDTVizGlut::start_time [protected]

Definition at line 578 of file NDTVizGlut.hh.


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


ndt_visualisation
Author(s): Todor Stoyanov, Jari Saarinen, Henrik Andreasson
autogenerated on Wed Aug 26 2015 15:24:57