Files Classes Functions Hierarchy
#include <gobjbase.h>
Public Member Functions | |
| void | draw () |
| Draws pre, this and post containers. | |
| gobjContainerPrePost (boolc cleanup_=false) | |
| The three containers use the same memory stategy. | |
Public Attributes | |
| gobjContainer | pre |
| The first geometry to be drawn. | |
| gobjContainer | post |
| The last geometry to be drawn. | |
The aquisition and release of resources usually follows a particular pattern. First be aquire the resouce. Then use it. Then clean up.
From a graphics perspective we can also use this class to change or update what is in the middle. For example initialize color in pre, restore color in post. And whenever the geometry gets rewritten clear and write the new geometry to the middle container.
So the client pushed and pops geometry into either of the three containers, the middle container being this classes derived container.
Definition at line 330 of file gobjbase.h.
| gobjContainerPrePost::gobjContainerPrePost | ( | boolc | cleanup_ = false |
) | [inline] |
The three containers use the same memory stategy.
Definition at line 343 of file gobjbase.h.
00344 : gobjContainer(cleanup_), pre(cleanup_), post(cleanup_) {}
| void gobjContainerPrePost::draw | ( | ) | [virtual] |
Draws pre, this and post containers.
Reimplemented from gobjContainer.
Definition at line 192 of file gobjbase.cpp.
References gobjContainer::draw(), GOBJDEBUGCODE, post, and pre.
00193 { 00194 GOBJDEBUGCODE 00195 pre.draw(); 00196 gobjContainer::draw(); 00197 post.draw(); 00198 }
The last geometry to be drawn.
Definition at line 337 of file gobjbase.h.
Referenced by draw(), and pointsurface< T, G >::pointsurface().
The first geometry to be drawn.
Definition at line 335 of file gobjbase.h.
Referenced by draw(), pointsurface< T, G >::pointsurface(), planeinttest::test01(), diskinttest::test01(), pointsurfacetest::test01(), pointsurfacetest::test02(), and pointsurfacetest::test03().
1.5.8