Public Slots | Public Member Functions | Public Attributes | Protected Member Functions

GLWindow Class Reference

our main glwindow widget for NGL applications all drawing elements are put in this file More...

#include <GLWindow.h>

List of all members.

Public Slots

void setTimerDuration (int _v)
 set the timer duration value
void IntegrationMethodChanged (QString _integrationMethod)
 set the methof for integration for the current cloth [in] _integrationMethod the name of the integration method
void setDamping (int _damping)
 set the DAMPING value
void setSpringDamping (int _damping)
 set the DAMPING value to the spring
void setIsEuler (bool _isEuler)
 sets if the integration method is Euler
void setConstraint1Active (bool _isActive)
 sets if the constraint1 is active
void setConstraint4Active (bool _isActive)
 sets if the constraint4 is active
void setConstraint3Active (bool _isActive)
 sets if the constraint3 is active
void setConstraint2Active (bool _isActive)
 sets if the constraint5 is active
void setIsVerlet (bool _isVerlet)
 sets if the integration method is Euler
void setTimeStep (int _timeStep)
 set the TimeStep value
void setCriticalDistanse (int _criticalDistanse)
 set the CRITICAL_DISTANCE value
void setFriction (int _friction)
 set the FRICTION value
void setBumpiness (int _bumpiness)
 set the BUMPINESS value
void setStiffeness (int _stiffeness)
 set the STIFFENESS value
void setGravity (int _gravity)
 set the GRAVITY value
void tableExists (bool flag)
 this is when we want to activate/disactivate table
void windExists (bool activated)
 this is when we want to activate/disactivate wind
void floorExists (bool flag)
 this is when we want to activate/disactivate floor
void movingBallExists (bool flag)
 this is when we want to activate/disactivate movingBall
void saveAnimation ()
void stopRecording ()

Public Member Functions

 GLWindow (int _timer, QWidget *_parent)
 Constructor for GLWindow.
 ~GLWindow ()
 dtor
void CreateLights ()
void resetPos ()
 reset the position value for model
void startSimTimer ()
 start the simulation timer
void stopSimTimer ()
 stop the simulation timer
std::string resetScene (float _size, int _massesNum, float _damping, float _sprinDamping, float _timeStep, float _gravity, float _stiffeness, float _criticalDistance, float _friction, float _bumpiness)
 create new cloth
void createCube (GLfloat _scale)
 create a cube and stuff it into a VBO on the GPU
void loadTexture ()
std::string loadFile ()
 loads the obj file
std::string loadAnimation ()
 loads the obj file
void clearAll ()

Public Attributes

ngl::Light m_LightList [3]
 Vector containing the lights in the scene.
Environmentm_environment
FilesManagerm_fileManager
bool activeMassIsSet

Protected Member Functions

void initializeGL ()
 The following methods must be implimented in the sub class this is called when the window is created.
void resizeGL (const int _w, const int _h)
 this is called whenever the window is re-sized
void paintGL ()
 this is the main gl drawing routine which is called whenever the window needs to be re-drawn

Detailed Description

our main glwindow widget for NGL applications all drawing elements are put in this file


Constructor & Destructor Documentation

GLWindow::GLWindow ( int  _timer,
QWidget *  _parent 
)

Constructor for GLWindow.

Parameters:
[in] _timer the time value for simulation updates
[in] _parent the parent window to create the GL context in

Member Function Documentation

void GLWindow::createCube ( GLfloat  _scale  ) 

create a cube and stuff it into a VBO on the GPU

Parameters:
[in] _scale a scale factor for the unit vertices
void GLWindow::floorExists ( bool  flag  )  [inline, slot]

this is when we want to activate/disactivate floor

Parameters:
[in] flag indicates if floor exists in teh scene
void GLWindow::movingBallExists ( bool  flag  )  [inline, slot]

this is when we want to activate/disactivate movingBall

Parameters:
[in] flag indicates if movingBall exists in teh scene
std::string GLWindow::resetScene ( float  _size,
int  _massesNum,
float  _damping,
float  _sprinDamping,
float  _timeStep,
float  _gravity,
float  _stiffeness,
float  _criticalDistance,
float  _friction,
float  _bumpiness 
)

create new cloth

Parameters:
[in] _size the size of the cloth
[in] _massesNum the number of masses in a line
void GLWindow::resizeGL ( const int  _w,
const int  _h 
) [protected]

this is called whenever the window is re-sized

Parameters:
[in] _w the width of the resized window
[in] _h the height of the resized window
void GLWindow::setBumpiness ( int  _bumpiness  )  [slot]

set the BUMPINESS value

Parameters:
[in] _bumpiness the value to set
void GLWindow::setConstraint1Active ( bool  _isActive  )  [slot]

sets if the constraint1 is active

Parameters:
[in] _isActive the value to set
void GLWindow::setConstraint2Active ( bool  _isActive  )  [slot]

sets if the constraint5 is active

Parameters:
[in] _isActive the value to set
void GLWindow::setConstraint3Active ( bool  _isActive  )  [slot]

sets if the constraint3 is active

Parameters:
[in] _isActive the value to set
void GLWindow::setConstraint4Active ( bool  _isActive  )  [slot]

sets if the constraint4 is active

Parameters:
[in] _isActive the value to set
void GLWindow::setCriticalDistanse ( int  _criticalDistanse  )  [slot]

set the CRITICAL_DISTANCE value

Parameters:
[in] _criticalDistanse the value to set
void GLWindow::setDamping ( int  _damping  )  [slot]

set the DAMPING value

Parameters:
[in] _damping the value to set
void GLWindow::setFriction ( int  _friction  )  [slot]

set the FRICTION value

Parameters:
[in] _fricition the value to set
void GLWindow::setGravity ( int  _gravity  )  [slot]

set the GRAVITY value

Parameters:
[in] _gravity the value to set
void GLWindow::setIsEuler ( bool  _isEuler  )  [slot]

sets if the integration method is Euler

Parameters:
[in] _isEuler the value to set
void GLWindow::setIsVerlet ( bool  _isVerlet  )  [slot]

sets if the integration method is Euler

Parameters:
[in] _isEuler the value to set
void GLWindow::setSpringDamping ( int  _damping  )  [slot]

set the DAMPING value to the spring

Parameters:
[in] _damping the value to set
void GLWindow::setStiffeness ( int  _stiffeness  )  [slot]

set the STIFFENESS value

Parameters:
[in] _stiffeness the value to set
void GLWindow::setTimerDuration ( int  _v  )  [inline, slot]

set the timer duration value

Parameters:
[in] _v the timer value in ms
void GLWindow::setTimeStep ( int  _timeStep  )  [slot]

set the TimeStep value

Parameters:
[in] _timeStep the value to set
void GLWindow::tableExists ( bool  flag  )  [inline, slot]

this is when we want to activate/disactivate table

Parameters:
[in] flag indicates if table exists in the scene
void GLWindow::windExists ( bool  activated  )  [slot]

this is when we want to activate/disactivate wind

Parameters:
[in] activated indicates if wind exists in the scene

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables