HyperGraphElementAction* CacheCameraDrawAction::operator()(HyperGraph::HyperGraphElement* element, HyperGraphElementAction::Parameters* params){ if (typeid(*element).name()!=_typeName) return 0; CacheCamera* that = static_cast<CacheCamera*>(element); refreshPropertyPtrs(params); if (! _previousParams) return this; if (_show && !_show->value()) return this; glPushMatrix(); glMultMatrixd(that->camParams()->offsetMatrix().data()); if (_cameraZ && _cameraSide) drawMyPyramid(_cameraZ->value(), _cameraSide->value()); glPopMatrix(); return this; }
HyperGraphElementAction* CacheCameraDrawAction::operator()(HyperGraph::HyperGraphElement* element, HyperGraphElementAction::Parameters* params){ if (typeid(*element).name()!=_typeName) return 0; CacheCamera* that = static_cast<CacheCamera*>(element); refreshPropertyPtrs(params); if (! _previousParams) return this; if (_show && !_show->value()) return this; glPushAttrib(GL_COLOR); glColor3f(POSE_PARAMETER_COLOR); glPushMatrix(); glMultMatrixd(that->camParams()->offset().data()); glRotatef(180.0f, 0.0f, 1.0f, 0.0f); opengl::drawPyramid(_cameraSide->value(), _cameraZ->value()); glPopMatrix(); glPopAttrib(); return this; }