Files Classes Functions Hierarchy
#include <gobjbase.h>
Public Member Functions | |
| gobjContainerSwitch (boolc cleanup_) | |
| On death the switches are deleted but what is inside them is deleted on the clients cleanup policy. | |
| void | draw () |
| Draw the scene. | |
| void | nuke () |
| Delete the switches which contain the memory policy of what they are pointing to. | |
| ~gobjContainerSwitch () | |
| Clean up memory, at the least the switches. | |
| gobjSwitch * | push (gobj *g) |
| g is wrapped in a gobjSwitch and pushed to gcontainer. | |
Public Attributes | |
| gobjContainer | gcontainer |
| The graphics being displayed. | |
| vector< gobjSwitch<> * > | gswitch |
| Turn on and off individual graphics. | |
Useful for a scene where there are multiple objects that may or may not be visible. By default all objects are visible.
Use in a similar way to gobjContainer.
Definition at line 283 of file gobjbase.h.
| gobjContainerSwitch::gobjContainerSwitch | ( | boolc | cleanup_ | ) |
On death the switches are deleted but what is inside them is deleted on the clients cleanup policy.
Definition at line 155 of file gobjbase.cpp.
00156 : gcontainer(cleanup_) 00157 { 00158 }
| gobjContainerSwitch::~gobjContainerSwitch | ( | ) |
Clean up memory, at the least the switches.
Definition at line 187 of file gobjbase.cpp.
References nuke().
00188 { 00189 nuke(); 00190 }
| void gobjContainerSwitch::draw | ( | ) | [inline, virtual] |
Draw the scene.
Implements gobj.
Definition at line 297 of file gobjbase.h.
References gobjContainer::draw(), gcontainer, and GOBJDEBUGCODE.
Referenced by d3tessdraw::draw(), and d3tessdraw::meshupdate().
00298 { GOBJDEBUGCODE gcontainer.draw(); }
| void gobjContainerSwitch::nuke | ( | ) |
Delete the switches which contain the memory policy of what they are pointing to.
Definition at line 178 of file gobjbase.cpp.
References gcontainer, gswitch, and gobjContainer::vg.
Referenced by ~gobjContainerSwitch().
00179 { 00180 uint sz=gswitch.size(); 00181 for (uint i=0; i<sz; ++i) 00182 delete gswitch[i]; 00183 gswitch.clear(); 00184 gcontainer.vg.clear(); 00185 }
| gobjSwitch * gobjContainerSwitch::push | ( | gobj * | g | ) |
g is wrapped in a gobjSwitch and pushed to gcontainer.
Definition at line 160 of file gobjbase.cpp.
References gobjContainer::cleanup, gcontainer, gswitch, and gobjContainer::vg.
Referenced by d3tessdraw::d3tessdraw().
00161 { 00162 assert(g!=0); 00163 gobjSwitch<> * gs = new gobjSwitch<>(g,true,gcontainer.cleanup); 00164 assert(gs!=0); 00165 gswitch.push_back(gs); 00166 gcontainer.vg.push_back(gs); 00167 00168 assert(gcontainer.vg.size()==gswitch.size()); 00169 00170 return gs; 00171 }
| vector< gobjSwitch<>* > gobjContainerSwitch::gswitch |
Turn on and off individual graphics.
Definition at line 290 of file gobjbase.h.
Referenced by displaymenu(), main(), nuke(), and push().
1.5.8