void CSketchOp::glCommands(bool select, bool marked, bool no_color) { CDepthOp::glCommands(select, marked, no_color); if (select || marked) { // allow sketch operations to be selected HeeksObj* sketch = heeksCAD->GetIDObject(SketchType, m_sketch); if (sketch)sketch->glCommands(select, marked, no_color); } }
void CSelectMode::OnRender() { for(std::list<HeeksObj*>::iterator It = m_highlighted_objects.begin(); It != m_highlighted_objects.end(); It++) { HeeksObj* object = *It; wxGetApp().m_highlight_color.glColor(); glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); glEnable(GL_COLOR_MATERIAL); object->glCommands(false, true, true); glDisable(GL_COLOR_MATERIAL); } }
void Drawing::OnRender(){ if(!DragDoneWithXOR() && GetDrawStep()){ std::list<HeeksObj*>::const_iterator It; const std::list<HeeksObj*>& drawing_objects = GetObjectsMade(); HeeksObj *owner = GetOwnerForDrawingObjects(); CSketch *sketch = dynamic_cast<CSketch*>(owner); glPushMatrix(); if(sketch && sketch->m_coordinate_system) { sketch->m_coordinate_system->ApplyMatrix(); } for(It = drawing_objects.begin(); It != drawing_objects.end(); It++){ HeeksObj *object = *It; object->glCommands(false, false, false); } glPopMatrix(); } }