Is anyway to pick a line, circle, ... in IRR?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
chromdragon
Posts: 101
Joined: Wed Feb 15, 2006 4:22 pm
Location: RO

Is anyway to pick a line, circle, ... in IRR?

Post by chromdragon »

Is anyway to pick a line, circle, ... (simple primitives) in IRR?

=======
My current solution will be:

getScreenCoordinatesFrom3DPosition (line points) -> 2d points and check against the mouse x, y! :mrgreen:
chromdragon
Posts: 101
Joined: Wed Feb 15, 2006 4:22 pm
Location: RO

Post by chromdragon »

Re Help! pls :idea:
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

you're thinking in 2d. there is no circle in 3d space, only a cone/tube thing that extends out of camera's view.
for a point on the screen, see this-
http://irrforge.org/index.php/Mouse_Inp ... _on_a_mesh
for a 2d line you would need to make two triangles and see where they intersect with the bounding boxes of your objects, or you could use the collision manager to find the collision between all triangles.
for a circle, hmm. I dunno. I'd probably project bounding box lines to 2d and do a circle/line intersection because its easy.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
chromdragon
Posts: 101
Joined: Wed Feb 15, 2006 4:22 pm
Location: RO

Post by chromdragon »

Re: you're thinking in 2d. there is no circle in 3d space 8)

line: point (x1, y1, z1) -> point (x2, y2, z2)
circle: c1 c2 ..... c1 (c - point)
Post Reply