void EDA_3D_CANVAS::render3DComponentShape( MODULE* module, bool aIsRenderingJustNonTransparentObjects, bool aIsRenderingJustTransparentObjects ) { double zpos = GetPrm3DVisu().GetModulesZcoord3DIU( module->IsFlipped() ); glPushMatrix(); wxPoint pos = module->GetPosition(); glTranslatef( pos.x * GetPrm3DVisu().m_BiuTo3Dunits, -pos.y * GetPrm3DVisu().m_BiuTo3Dunits, zpos ); if( module->GetOrientation() ) glRotatef( (double) module->GetOrientation() / 10.0, 0.0f, 0.0f, 1.0f ); if( module->IsFlipped() ) { glRotatef( 180.0f, 0.0f, 1.0f, 0.0f ); glRotatef( 180.0f, 0.0f, 0.0f, 1.0f ); } S3D_MASTER* shape3D = module->Models(); for( ; shape3D; shape3D = shape3D->Next() ) { if( shape3D->Is3DType( S3D_MASTER::FILE3D_VRML ) ) { glPushMatrix(); shape3D->Render( aIsRenderingJustNonTransparentObjects, aIsRenderingJustTransparentObjects ); const CBBOX &shapeBBox = shape3D->getBBox(); if( isEnabled( FL_RENDER_SHOW_MODEL_BBOX ) && shapeBBox.IsInitialized() ) { // Set the alpha current color to opaque float currentColor[4]; glGetFloatv( GL_CURRENT_COLOR,currentColor ); currentColor[3] = 1.0f; glColor4fv( currentColor ); OGL_draw_bbox( shapeBBox ); } glPopMatrix(); // Debug AABBox //thisBBox = shape3D->getfastAABBox(); //thisBBox.GLdebug(); } } glPopMatrix(); }
void C_OGL_3DMODEL::Draw_bboxes() const { for( unsigned int mesh_i = 0; mesh_i < m_nr_meshes; ++mesh_i ) OGL_draw_bbox( m_meshs_bbox[mesh_i] ); }
void C_OGL_3DMODEL::Draw_bbox() const { OGL_draw_bbox( m_model_bbox ); }