#include <glc_collection.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_Collection () | |
| Default constructor. | |
| virtual | ~GLC_Collection () |
| Destructor. | |
Get Functions | |
| bool | isEmpty () const |
| Return true if the collection is empty. | |
| int | getNumber (void) const |
| Return the number of Node in the collection. | |
| GLC_Instance * | getInstanceHandle (GLC_uint Key) |
| Return a GLC_Instance from collection. | |
| GLC_BoundingBox | getBoundingBox (void) |
| Return the collection Bounding Box. | |
| int | getNumberOfSelectedNode (void) const |
| Return the number of Node in the selection Hash. | |
| SelectedNodeHash * | getSelections () |
| Get the Hash table of Selected Nodes. | |
| bool | isInCollection (GLC_uint key) const |
| Return true if the Node is in the collection. | |
| bool | isSelected (GLC_uint key) const |
| Return true if the element is selected. | |
Set Functions | |
| bool | add (GLC_Instance &node) |
| Add a GLC_Instance in the collection. | |
| bool | remove (GLC_uint Key) |
| Remove a GLC_Geometry from the collection and delete it. | |
| void | clear (void) |
| Remove and delete all GLC_Geometry from the collection. | |
| bool | select (GLC_uint) |
| Select a Instance. | |
| bool | unselect (GLC_uint) |
| unselect a Instance | |
| void | unselectAll () |
| unselect all Instance | |
| void | setPolygonModeForAll (GLenum, GLenum) |
| Set the polygon mode for all Instance. | |
| void | setVisibility (const GLC_uint, const bool) |
| Set Instance visibility. | |
| void | showAll () |
| Make visible all instance of the collection. | |
OpenGL Functions | |
| void | glExecute (void) |
| Display the collection. | |
| void | createMemberLists (void) |
| Create member's OpenGL display list. | |
Private Member Functions | |
| bool | createList (void) |
| Create Collection's OpenGL display list. | |
OpenGL Functions | |
| void | glDraw (void) |
| Display collection's member. | |
Private Attributes | |
| CNodeMap | m_NodeMap |
| GLC_Instance Hash Table. | |
| GLuint | m_ListID |
| Collection's OpenGL list ID. | |
| bool | m_ListIsValid |
| Validity of collection's OpenGL list. | |
| GLC_BoundingBox * | m_pBoundingBox |
| BoundingBox of the collection. | |
| SelectedNodeHash | m_SelectedNodes |
| Selected Node Hash Table. | |
An GLC_Collection contain :
Definition at line 50 of file glc_collection.h.
| GLC_Collection::GLC_Collection | ( | ) |
| GLC_Collection::~GLC_Collection | ( | ) | [virtual] |
Destructor.
Delete all Node in the Hash Table and clear the Hash Table
Definition at line 44 of file glc_collection.cpp.
References clear().
| bool GLC_Collection::isEmpty | ( | void | ) | const [inline] |
Return true if the collection is empty.
Definition at line 74 of file glc_collection.h.
References m_NodeMap.
Referenced by GLC_World::isEmpty().
| int GLC_Collection::getNumber | ( | void | ) | const [inline] |
Return the number of Node in the collection.
Definition at line 77 of file glc_collection.h.
References m_NodeMap.
Referenced by getBoundingBox(), and glExecute().
| GLC_Instance * GLC_Collection::getInstanceHandle | ( | GLC_uint | Key | ) |
Return a GLC_Instance from collection.
If the element is not found in collection a empty node is return
Definition at line 223 of file glc_collection.cpp.
References m_NodeMap.
Referenced by GLC_Part::clone(), GLC_Part::getNumberOfFaces(), GLC_Part::getNumberOfVertex(), GLC_Part::move(), GLC_Part::reverseMeshNormal(), and GLC_Part::updateAbsoluteMatrix().
| GLC_BoundingBox GLC_Collection::getBoundingBox | ( | void | ) |
Return the collection Bounding Box.
return the collection Bounding Box
Definition at line 229 of file glc_collection.cpp.
References GLC_BoundingBox::combine(), getNumber(), GLC_BoundingBox::isEmpty(), m_ListIsValid, m_NodeMap, and m_pBoundingBox.
| int GLC_Collection::getNumberOfSelectedNode | ( | void | ) | const [inline] |
Return the number of Node in the selection Hash.
Definition at line 87 of file glc_collection.h.
References m_SelectedNodes.
Referenced by remove().
| SelectedNodeHash* GLC_Collection::getSelections | ( | ) | [inline] |
Get the Hash table of Selected Nodes.
Definition at line 90 of file glc_collection.h.
References m_SelectedNodes.
| bool GLC_Collection::isInCollection | ( | GLC_uint | key | ) | const [inline] |
Return true if the Node is in the collection.
Definition at line 93 of file glc_collection.h.
References m_NodeMap.
| bool GLC_Collection::isSelected | ( | GLC_uint | key | ) | const [inline] |
Return true if the element is selected.
Definition at line 96 of file glc_collection.h.
References m_SelectedNodes.
| bool GLC_Collection::add | ( | GLC_Instance & | node | ) |
Add a GLC_Instance in the collection.
return true if success false otherwise
Definition at line 53 of file glc_collection.cpp.
References GLC_Object::getID(), m_ListIsValid, and m_NodeMap.
Referenced by GLC_Part::GLC_Part().
| bool GLC_Collection::remove | ( | GLC_uint | Key | ) |
Remove a GLC_Geometry from the collection and delete it.
Definition at line 61 of file glc_collection.cpp.
References getNumberOfSelectedNode(), m_ListIsValid, m_NodeMap, and unselect().
Referenced by GLC_Part::~GLC_Part().
| void GLC_Collection::clear | ( | void | ) |
Remove and delete all GLC_Geometry from the collection.
Definition at line 94 of file glc_collection.cpp.
References m_ListID, m_NodeMap, m_pBoundingBox, and m_SelectedNodes.
Referenced by ~GLC_Collection().
| bool GLC_Collection::select | ( | GLC_uint | key | ) |
Select a Instance.
Definition at line 117 of file glc_collection.cpp.
References GLC_Object::getID(), m_ListIsValid, m_NodeMap, m_SelectedNodes, and GLC_Instance::select().
| bool GLC_Collection::unselect | ( | GLC_uint | key | ) |
unselect a Instance
Definition at line 144 of file glc_collection.cpp.
References m_ListIsValid, and m_SelectedNodes.
Referenced by remove().
| void GLC_Collection::unselectAll | ( | ) |
unselect all Instance
Definition at line 170 of file glc_collection.cpp.
References m_SelectedNodes.
| void GLC_Collection::setPolygonModeForAll | ( | GLenum | face, | |
| GLenum | mode | |||
| ) |
Set the polygon mode for all Instance.
Definition at line 184 of file glc_collection.cpp.
References m_NodeMap.
| void GLC_Collection::setVisibility | ( | const | GLC_uint, | |
| const | bool | |||
| ) |
Set Instance visibility.
Definition at line 198 of file glc_collection.cpp.
References m_ListIsValid, and m_NodeMap.
| void GLC_Collection::showAll | ( | ) |
Make visible all instance of the collection.
Definition at line 209 of file glc_collection.cpp.
References m_ListIsValid, and m_NodeMap.
| void GLC_Collection::glExecute | ( | void | ) |
Display the collection.
Definition at line 277 of file glc_collection.cpp.
References createList(), createMemberLists(), getNumber(), m_ListID, m_ListIsValid, and m_pBoundingBox.
Referenced by GLC_World::glExecute().
| void GLC_Collection::createMemberLists | ( | void | ) |
Create member's OpenGL display list.
Definition at line 346 of file glc_collection.cpp.
References m_NodeMap, and m_pBoundingBox.
Referenced by glExecute().
| void GLC_Collection::glDraw | ( | void | ) | [private] |
Display collection's member.
Definition at line 313 of file glc_collection.cpp.
References GLC_BoundingBox::combine(), m_NodeMap, and m_pBoundingBox.
Referenced by createList().
| bool GLC_Collection::createList | ( | void | ) | [private] |
Create Collection's OpenGL display list.
Definition at line 387 of file glc_collection.cpp.
References glDraw(), m_ListID, and m_ListIsValid.
Referenced by glExecute().
CNodeMap GLC_Collection::m_NodeMap [private] |
GLC_Instance Hash Table.
Definition at line 183 of file glc_collection.h.
Referenced by add(), clear(), createMemberLists(), getBoundingBox(), getInstanceHandle(), getNumber(), glDraw(), isEmpty(), isInCollection(), remove(), select(), setPolygonModeForAll(), setVisibility(), and showAll().
GLuint GLC_Collection::m_ListID [private] |
Collection's OpenGL list ID.
Definition at line 186 of file glc_collection.h.
Referenced by clear(), createList(), and glExecute().
bool GLC_Collection::m_ListIsValid [private] |
Validity of collection's OpenGL list.
Definition at line 189 of file glc_collection.h.
Referenced by add(), createList(), getBoundingBox(), glExecute(), remove(), select(), setVisibility(), showAll(), and unselect().
GLC_BoundingBox* GLC_Collection::m_pBoundingBox [private] |
BoundingBox of the collection.
Definition at line 192 of file glc_collection.h.
Referenced by clear(), createMemberLists(), getBoundingBox(), glDraw(), and glExecute().
Selected Node Hash Table.
Definition at line 195 of file glc_collection.h.
Referenced by clear(), getNumberOfSelectedNode(), getSelections(), isSelected(), select(), unselect(), and unselectAll().
1.4.5