Version: 9.12.0
GLViewer_Group Class Reference

#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...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ GLViewer_Group()

GLViewer_Group::GLViewer_Group ( )

constructor

References mySelObjNum.

◆ ~GLViewer_Group()

GLViewer_Group::~GLViewer_Group ( )

destructor

Member Function Documentation

◆ addObject()

int GLViewer_Group::addObject ( GLViewer_Object theObject)

adding object to group

References contains(), count(), myList, and GLViewer_Object::setGroup().

◆ contains()

int GLViewer_Group::contains ( GLViewer_Object theObject)

Returns index of position, else -1.

Returns
the position of object if group contains it, else -1

References myList.

◆ count()

int GLViewer_Group::count ( )

Returns number ob objects.

Returns
number of elements

< TODO: conversion from size_t to int

References myList.

◆ dragingObjects()

void GLViewer_Group::dragingObjects ( float  x,
float  y,
bool  once = false 
)

Dragging operation.

Once = true, if this operation calls only one time for all object

Dragging operation

Parameters
Onceis true, if this operation calls only one time for all object
x,y- dragging position

References myList, and mySelObjNum.

◆ getObjects()

OGList GLViewer_Group::getObjects ( ) const
inline

◆ isEmpty()

bool GLViewer_Group::isEmpty ( )

detection of empty group

References myList.

◆ removeObject()

int GLViewer_Group::removeObject ( GLViewer_Object theObject)

removing object from group

References count(), isEmpty(), myList, and ~GLViewer_Group().

◆ updateZoom()

void GLViewer_Group::updateZoom ( GLViewer_Object sender,
float  zoom 
)
Warning
it is for ouv

Updates zoom of object

Parameters
sender- object to be updated
zoom- zoom coefficient

References myList, and GLViewer_Object::setZoom().

Member Data Documentation

◆ myList

OGList GLViewer_Group::myList
private

List of objects.

◆ mySelObjNum

int GLViewer_Group::mySelObjNum
private

This number needs for synchranization group with viewport drag methods.


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