#Select a 3DPoint w/ IPAS
3 messages in this thread
I'm currently studying how to use IPAS3. I can't find anywhere how to select a
point in space. For example: I want to create a PXP that will take a location
in space (selected by the user with the mouse, in World Coordinates) and use
it to generate an object. The object will be centered at the point that the
user selected.
I've seen routines to define a region or another that returns the mouse
coordinates in device, but that's it.
Help!
Alfonso
Hi Alfonso,
<< can't find anywhere how to select a point in space. For example: I want to
create a PXP that will take a location in space (selected by the user with the
mouse, in World Coordinates) and use it to generate an object. The object
will be centered at the point that the user selected.
I've seen routines to define a region or another that returns the mouse
coordinates in device, but that's it. >>
You could create a viewport, that displayed a pointer object in world
coordinates in your scene, and took positional data from mouse moves. You could
have the dialog control the axis of direction, so that your 2d mouse moves
could be translated into the 3d scene. This would be implemented using a custom
feel function (viewport/mouse interaction) and probably a custom see function
(viewport updating).
Have you analyzed orbit.c yet? Note the display of the orbit in an interactive
viewport. This piece of code gives you a partial solution to your question.
So, you can try your mouse (2d-3d)translation code on this example and try to
draw that orbit using a mouse.
I hope that helped..
jonas[adesk]
I haven't looked at orbit yet. Thanks for the feedback.
Alfonso