LiangliangNan / Easy3D

A lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data
GNU General Public License v3.0
1.35k stars 243 forks source link

I have a picture control in c++ mfc, how i show the view to my picture? #181

Closed xinsuinizhuan closed 5 months ago

xinsuinizhuan commented 5 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

LiangliangNan commented 5 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

What is the issue or requested feature? I cannot understand anything since you simply copied the template for requeting a new feature. So please elaborate on those briefed in the template.

xinsuinizhuan commented 5 months ago

I want to show the 3d view to my self control widget, like i put a image to a picture control。In c++ mfc,i create a frame, and put a picture control to my frame, then i want show the 3d view to my picture control. 图片

LiangliangNan commented 5 months ago

I still don't get it. Do you mean you want to use Easy3D to visualize your image? (Not sure what you mean by "3d view", since you don't have a 3D model, but just 2D images)

xinsuinizhuan commented 5 months ago

like pcl: m_viewer.reset(new pcl::visualization::PCLVisualizer("viewer", false)); m_viewer->setBackgroundColor(0, 0, 0); m_viewer->initCameraParameters(); m_win = m_viewer->getRenderWindow(); m_iren = vtkRenderWindowInteractor::New(); m_viewer->resetCamera(); CRect rect; m_std3DCloudShow.GetClientRect(&rect); m_win->SetSize(rect.right - rect.left, rect.bottom - rect.top); m_win->SetParentId(m_std3DCloudShow.m_hWnd); m_iren->SetRenderWindow(m_win); m_viewer->createInteractor(); m_win->Render();

this: m_win->SetParentId(m_std3DCloudShow.m_hWnd); to specified window to draw and then m_win->SetSize(rectshow3d.right - rectshow3d.left, rectshow3d.bottom - rectshow3d.top); to remove fit the frame

xinsuinizhuan commented 5 months ago

I still don't get it. Do you mean you want to use Easy3D to visualize your image? (Not sure what you mean by "3d view", since you don't have a 3D model, but just 2D images)

no, i want to show the 3d to my self widget, not console pop frame.

LiangliangNan commented 5 months ago

"show the 3d to my self widget": sounds like you want to visualize your widget in 3D using Easy3D. This doesn't make sense. Sorry. I still don't understand what that means.

LiangliangNan commented 5 months ago

I have to close this issue because I don't believe any other users could benefit from it given the current vague description of it. Please feel free to elaborate on it, and I will follow up.

xinsuinizhuan commented 5 months ago

"show the 3d to my self widget": sounds like you want to visualize your widget in 3D using Easy3D. This doesn't make sense. Sorry. I still don't understand what that means.

like pcl: m_viewer.reset(new pcl::visualization::PCLVisualizer("viewer", false)); m_viewer->setBackgroundColor(0, 0, 0); m_viewer->initCameraParameters(); m_win = m_viewer->getRenderWindow(); m_iren = vtkRenderWindowInteractor::New(); m_viewer->resetCamera(); CRect rect; m_std3DCloudShow.GetClientRect(&rect); m_win->SetSize(rect.right - rect.left, rect.bottom - rect.top); m_win->SetParentId(m_std3DCloudShow.m_hWnd); m_iren->SetRenderWindow(m_win); m_viewer->createInteractor(); m_win->Render();

this: m_win->SetParentId(m_std3DCloudShow.m_hWnd); to specified window to draw and then m_win->SetSize(rectshow3d.right - rectshow3d.left, rectshow3d.bottom - rectshow3d.top); to remove fit the frame

to show the cloud to my my self m_std3DCloudShow (picture control widget), only specified the widget hwnd to it.