void CVXS_SimGLView::Draw(int Selected, bool ViewSection, int SectionLayer) { if (!pSim->IsInitalized()) return; if (CurViewMode == RVM_NONE) return; else if (CurViewMode == RVM_VOXELS){ switch (CurViewVox){ case RVV_DISCRETE: DrawGeometry(Selected, ViewSection, SectionLayer); break; //section view only currently enabled in voxel view mode case RVV_DEFORMED: DrawVoxMesh(Selected); break; case RVV_SMOOTH: DrawSurfMesh(); break; } } else { //CurViewMode == RVT_BONDS vfloat VoxScale=0.2; if (ViewForce){ DrawForce(); DrawGeometry(Selected, ViewSection, SectionLayer, VoxScale); } else { if (CurViewVox == RVV_SMOOTH) VoxScale=0.1; DrawBonds(); DrawGeometry(Selected, ViewSection, SectionLayer, VoxScale); } DrawStaticFric(); } if (ViewAngles) DrawAngles(); if (pSim->IsFeatureEnabled(VXSFEAT_FLOOR)) DrawFloor(); //draw the floor if its in use // if (pEnv->IsFloorEnabled()) DrawFloor(); //draw the floor if its in use NeedStatsUpdate=true; }
void CVX_Sim::Draw(int Selected, bool ViewSection, int SectionLayer) { if (!Initalized) return; if (CurViewMode == RVM_NONE) return; else if (CurViewMode == RVM_VOXELS){ switch (CurViewVox){ case RVV_DISCRETE: DrawGeometry(Selected, ViewSection, SectionLayer); break; //section view only currently enabled in voxel view mode case RVV_DEFORMED: DrawVoxMesh(Selected); break; case RVV_SMOOTH: DrawSurfMesh(); break; } } else { //CurViewMode == RVT_BONDS DrawBonds(); DrawStaticFric(); } if (ViewAngles) DrawAngles(); if (ViewForce) DrawForce(); if (pEnv->IsFloorEnabled()) DrawFloor(); //draw the floor if its in use NeedStatsUpdate=true; }