#include <GLViewer_Group.h>
Public Member Functions | |
GLViewer_Group () | |
~GLViewer_Group () | |
bool | isEmpty () |
int | count () |
Returns number ob objects. More... | |
int | contains (GLViewer_Object *) |
Returns index of position, else -1. More... | |
int | addObject (GLViewer_Object *) |
int | removeObject (GLViewer_Object *) |
OGList | getObjects () const |
void | dragingObjects (float x, float y, bool once=false) |
Dragging operation. More... | |
void | updateZoom (GLViewer_Object *sender, float zoom) |
Private Attributes | |
OGList | myList |
List of objects. More... | |
int | mySelObjNum |
This number needs for synchranization group with viewport drag methods. More... | |
Class GLViewer_Group Group of GLViewer_Objects for synchronized moving. If you move one or more objects from group, than all objects from group is moved If group is empty, it must be deleted
GLViewer_Group::GLViewer_Group | ( | ) |
constructor
References mySelObjNum.
GLViewer_Group::~GLViewer_Group | ( | ) |
destructor
int GLViewer_Group::addObject | ( | GLViewer_Object * | theObject | ) |
adding object to group
References contains(), count(), myList, and GLViewer_Object::setGroup().
int GLViewer_Group::contains | ( | GLViewer_Object * | theObject | ) |
References myList.
int GLViewer_Group::count | ( | ) |
References myList.
void GLViewer_Group::dragingObjects | ( | float | x, |
float | y, | ||
bool | once = false |
||
) |
Once = true, if this operation calls only one time for all object
Dragging operation
Once | is true, if this operation calls only one time for all object |
x,y | - dragging position |
References myList, and mySelObjNum.
|
inline |
bool GLViewer_Group::isEmpty | ( | ) |
detection of empty group
References myList.
int GLViewer_Group::removeObject | ( | GLViewer_Object * | theObject | ) |
removing object from group
References count(), isEmpty(), myList, and ~GLViewer_Group().
void GLViewer_Group::updateZoom | ( | GLViewer_Object * | sender, |
float | zoom | ||
) |
Updates zoom of object
sender | - object to be updated |
zoom | - zoom coefficient |
References myList, and GLViewer_Object::setZoom().
|
private |
|
private |