Public Member Functions | Public Attributes | Protected Attributes

ObjObject Class Reference

ObjObject class is created in order to represent any environment object in the scene: cloth, static object, animation. More...

#include <ObjObject.h>

List of all members.

Public Member Functions

 ObjObject (float clothSize, int _massesNum, float _damping, float _springDamping, float _timeStep, float _gravity, float _stiffeness, float _criticalDistance, float _friction, float _bumpiness, ngl::TransformStack *_transform)
 the constractor of the ObjObject class. set-up the default parameters to the object [in] clothSize the size of the cloth [in] _massesNum amount of masses to be used to generate the cloth [in] _damping the damping of the cloth, this parameter effects masses of the cloth [in] _springDamping damping of the cloth, this parameter effects springs of the cloth [in] _timeStep time step for integration [in] _gravity gravity force acting on each mass of the cloth [in] _stiffeness stiffness of the cloth [in] _criticalDistance the distance which should be maintained between the cloth and other objects of the scene [in] _friction fricition of the cloth [in] _bumpiness bumpiness of the cloth [in] _transform transformation stack
 ObjObject (ngl::TransformStack *_transform)
 the constractor of the ObjObject class. [in] _transform transformation stack
 ~ObjObject ()
 Destructor.
void loadModel (std::string _fileName)
 loads a model from the file [in] _fileName the name of the file to load
void loadAnimation (QStringList _listOfFiles)
 methods loads the animation from the sequence of files [in] _listOfFiles the sequence of files to create an animation from them
void drawObject (int regime)
 sets the object drawing regime [in] regime sets the rigime in which the object will be drawn: 1-shaded model, 0 - mass-spring model
void calculateNormalsFront (int _currentVAONum)
 method calculates the normals for the front face of the cloth [in] _currentVAONum the number of VAO for which the normals will be calculated
void calculateNormalsBack (int _currentVAONum)
 method calculates the normals for the back face of the cloth [in] _currentVAONum the number of VAO for which the normals will be calculated
void updateVerts (int _currentVAONum)
 updates all the verteces of the VAO object [in] _currentVAONum number of VAO to update its vertices
void setObjectVelocity (ngl::Vector _velocity)
 sets the velocity for an object [in] _velocity the value to be set
void setObjectName (std::string _objectName)
 sets the name of the object [in] _objectName the name to be set
ngl::Vector getObjectVelocity ()
 gets the velocity of the object [out] the object velocity
std::string getObjectName ()
 gets the name of the object [out] the object name

Public Attributes

ngl::Vector oldControlVertexPosition
 the position of the ControlVertex at the previous moment in time
std::vector< ngl::Vector > normalsBack
 list of back normals
ngl::VertexArrayObject * m_vaoMeshBack
 list of VAO objects
std::vector< VAODataVAOsList
 list of objects
bool m_isCloth
 defines if cthe object is a cloth
bool m_isAnimation
 defines if cthe object is animation
Clothm_cloth
 reference to a cloth
VAODatacurrentVAO
 reference to a current VAO object
int currentVAONum
 number of the current VAO object
std::string m_objectName
 name of the object
std::string m_FilePath
 fileNAame from which the object was loaded in

Protected Attributes

ngl::TransformStack * m_transform
 a pointer to the global transform stack

Detailed Description

ObjObject class is created in order to represent any environment object in the scene: cloth, static object, animation.


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