| |

VerySource

 Forgot password?
 Register
Search
View: 739|Reply: 2

opengl box selection function

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-26 18:40:01
| Show all posts |Read mode
Now you need to implement a box selection function in the scene editor, similar to 3dmax. Just drag a rectangle out with the mouse, and all the objects contained in the rectangle and those that intersect the rectangle are selected and highlighted. If you have done or have any ideas, please discuss. I haven't done it. No concept, no idea how to start.
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-3 21:45:01
| Show all posts
method one
Another type of application for frustum cropping, the drawn rectangular frame is actually a frustum.

Method Two
Project objects to the screen with 3D changes, even if their positions are inside the wireframe

Simplified methods can use the center point of the object to represent the detected object, or the object's bounding box to represent the object
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Unknown

 Author| Post time: 2020-3-17 11:30:01
| Show all posts
Thank you happy_888 for your suggestion. The selection of the rectangular frame can be achieved by referring to the method of cutting the frustum, but the selection of 3dmax frame has many types of regions, such as circles, irregular polygons, etc. Personally, I should still convert the object to a two-dimensional plane, and then use some image processing method to obtain a list of selected objects. But I don't know how to do it. Please also give more guidance. You can use the 3dmax area selection function, what I want to achieve is that kind of function.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list