00001 #include "robot.h" 00002 00007 GlutRobot::GlutRobot(GltShapePtr &shape,GlutWindow &window,const GlutWindow::MenuCallbacks value) 00008 : _shape(shape), _window(window), _value(value) 00009 { 00010 } 00011 00012 GlutRobot::~GlutRobot() 00013 { 00014 } 00015 00016 void 00017 GlutRobot::draw() const 00018 { 00019 if (_shape->expired()) 00020 { 00021 _window.OnMenu(_value); 00022 ((GlutRobot *) this)->expired() = true; 00023 } 00024 }