Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vpgraphicobj.cpp

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 // ChangeLog
00006 // Apr 27, 2005 - Bruno de Oliveira Schneider
00007 // - Added ToggleVisibility() and IsVisible().
00008 // Dec 03, 2004 - Bruno de Oliveira Schneider
00009 // - Added bBox, recBBox and related methods.
00010 // Oct 13, 2004 - Bruno de Oliveira Schneider
00011 // - Code typing has been cleaned. DoxyGen documentation started.
00012 // - Removed "using namespace std" from header file.
00013 // - Removed "vp" prefix from every method name.
00014 // - Removed IVPATH declaration.
00015 // - VPGraphicObj is now derived from VPSceneNode. AS A RESULT, MOST METHODS AND
00016 //   ATRIBUTES WERE REMOVED.
00017 // May 04, 2004 - Bruno de Oliveira Schneider
00018 // - Commented out IVPATH declaration.
00019 // Jul 25, 2000 - Anderson Maciel
00020 // - Classes declaration.
00021 
00022 #include "vpgraphicobj.h"
00023 #include <cassert>
00024 #include <list>
00025 
00026 using namespace std;
00027 
00028 VPGraphicObj::VPGraphicObj() {
00029     show = true;
00030 }
00031 
00032 void VPGraphicObj::Show() {
00033     show = true;
00034 }
00035 
00036 void VPGraphicObj::Hide() {
00037     show = false;
00038 }
00039 
00040 void VPGraphicObj::ToggleVisibility() {
00041     show = !show;
00042 }
00043 
00044 bool VPGraphicObj::IsVisible() {
00045     return show;
00046 }
00047 
00048 void VPGraphicObj::ComputeRecursiveBoundingBox() {
00049     list<const VPSceneNode*>::const_iterator iter;
00050     const VPGraphicObj* objPtr;
00051 
00052     recBBox = bBox;
00053     for (iter = childList.begin(); iter != childList.end(); ++iter)
00054     {
00055         objPtr = dynamic_cast<const VPGraphicObj*>(*iter);
00056         if (objPtr) // objPtr != NULL
00057             recBBox.MergeWith(objPtr->GetRecursiveBoundingBox());
00058     }
00059 }

Generated on Tue Sep 6 10:00:04 2005 for VPAT by  doxygen 1.4.4