mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	SLA slices preview - wip 5
This commit is contained in:
		
							parent
							
								
									e4da00c195
								
							
						
					
					
						commit
						0a47bc1c5c
					
				
					 2 changed files with 4 additions and 8 deletions
				
			
		|  | @ -3764,12 +3764,6 @@ void GLCanvas3D::render() | |||
| 
 | ||||
|     _camera_tranform(); | ||||
| 
 | ||||
|     if (m_use_clipping_planes) | ||||
|     { | ||||
|         ::glClipPlane(GL_CLIP_PLANE0, (GLdouble*)m_clipping_planes[0].get_data()); | ||||
|         ::glClipPlane(GL_CLIP_PLANE1, (GLdouble*)m_clipping_planes[1].get_data()); | ||||
|     } | ||||
| 
 | ||||
|     GLfloat position_cam[4] = { 1.0f, 0.0f, 1.0f, 0.0f }; | ||||
|     ::glLightfv(GL_LIGHT1, GL_POSITION, position_cam); | ||||
|     GLfloat position_top[4] = { -0.5f, -0.5f, 1.0f, 0.0f }; | ||||
|  | @ -5725,7 +5719,9 @@ void GLCanvas3D::_render_objects() const | |||
|     { | ||||
|         if (m_use_clipping_planes) | ||||
|         { | ||||
|             ::glClipPlane(GL_CLIP_PLANE0, (GLdouble*)m_clipping_planes[0].get_data()); | ||||
|             ::glEnable(GL_CLIP_PLANE0); | ||||
|             ::glClipPlane(GL_CLIP_PLANE1, (GLdouble*)m_clipping_planes[1].get_data()); | ||||
|             ::glEnable(GL_CLIP_PLANE1); | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
|  | @ -670,8 +670,8 @@ void Preview::on_sliders_scroll_changed(wxEvent& event) | |||
|         } | ||||
|         else if (tech == ptSLA) | ||||
|         { | ||||
|             m_canvas->set_clipping_plane(0, GLCanvas3D::ClippingPlane(Vec3d(0.0, 0.0, 1.0), m_slider->GetLowerValueD() - 1e-6)); | ||||
|             m_canvas->set_clipping_plane(1, GLCanvas3D::ClippingPlane(Vec3d(0.0, 0.0, -1.0), m_slider->GetHigherValueD() + 1e-6)); | ||||
|             m_canvas->set_clipping_plane(0, GLCanvas3D::ClippingPlane(Vec3d::UnitZ(), -(m_slider->GetLowerValueD() - 1e-6))); | ||||
|             m_canvas->set_clipping_plane(1, GLCanvas3D::ClippingPlane(-Vec3d::UnitZ(), m_slider->GetHigherValueD() + 1e-6)); | ||||
|             m_canvas->set_use_clipping_planes(m_slider->GetHigherValue() != 0); | ||||
|             m_canvas_widget->Refresh(); | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri