[eq-dev] Suggested way to pull canvas/wall geometry from inside eq::Config

5 views
Skip to first unread message

cpapado

unread,
Mar 4, 2012, 12:48:03 AM3/4/12
to eq-...@equalizergraphics.com
Yes it's me again!

I came across an interesting question while trying to add some object
picking functionality to my EQ application.

What I want to facilitate is for the user on the application node to be able
to, using the mouse, pick points on an EQ window, then unproject them and
ray cast them for selecting objects.

I've figured out the ray casting aspect (I'm using VisualizationLibrary
which allows declouping of the scene graph from the rendering so I can just
keep that around in the config and run any ray queries against it).

Back in 1.2.1, there used to be getCanvas()/getChannel() methods exposed
through the API as public (but I guess for internal use) which let me do
what I wanted, but these seem to be gone in 1.3.0. I would use those to
convert the x,y coordinates of the mouse click event to viewport coordinates
for the channel then proceed to unproject using the frustum for the canvas
that the channel was rendering (that was a convention on my configuration).

What would be the best way to approach this problem at the moment?

Thanks!

--
View this message in context: http://software.1713.n2.nabble.com/Suggested-way-to-pull-canvas-wall-geometry-from-inside-eq-Config-tp7341673p7341673.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.

_______________________________________________
eq-dev mailing list
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Stefan Eilemann

unread,
Mar 5, 2012, 12:14:43 PM3/5/12
to eq-...@equalizergraphics.com
Hi,

On 4. Mar 2012, at 6:48, cpapado [via Software] wrote:

> What I want to facilitate is for the user on the application node to be able to, using the mouse, pick points on an EQ window, then unproject them and ray cast them for selecting objects.

You should do that by using the RenderContext attached to the event.

That said...

> Back in 1.2.1, there used to be getCanvas()/getChannel() methods exposed through the API as public (but I guess for internal use) which let me do what I wanted, but these seem to be gone in 1.3.0.

...Not sure which functions you were using. Anything marked with '@version x.y' is public API and should not be removed. You should still be able the get from config to all canvases, segments, layouts, views and observers. Furthermore you can get from your channel to window, pipe and view. Anything else is potentially dangerous (racy) and you'll need to present a use case for why you need this.

> I would use those to convert the x,y coordinates of the mouse click event to viewport coordinates for the channel then proceed to unproject using the frustum for the canvas that the channel was rendering (that was a convention on my configuration).

All that information should be in the render context attached to your event. If you get it through other means (except Window::getRenderContext) will give you wrong information in some cases.


HTH,

Stefan.

--
View this message in context: http://software.1713.n2.nabble.com/Suggested-way-to-pull-canvas-wall-geometry-from-inside-eq-Config-tp7341673p7345590.html

cpapado

unread,
Mar 12, 2012, 8:09:01 AM3/12/12
to eq-...@equalizergraphics.com
Thanks Stefan, I wasn't aware of the render-context functionality, it served
me perfectly for this particular problem.

By the way, I've been wondering. To what extend is Collage platform
dependent? Have you tried compiling it for iOS or Android at any point?

--
View this message in context: http://software.1713.n2.nabble.com/Suggested-way-to-pull-canvas-wall-geometry-from-inside-eq-Config-tp7341673p7365121.html

Stefan Eilemann

unread,
Mar 12, 2012, 8:38:13 AM3/12/12
to eq-...@equalizergraphics.com

On 12. Mar 2012, at 13:09, cpapado [via Software] wrote:

> By the way, I've been wondering. To what extend is Collage platform dependent? Have you tried compiling it for iOS or Android at any point?

Good question. It is working on Windows (XP/7), Linux and OS X. I guess iOS or Android shouldn't be too hard. I guess/hope ARM has support for atomic operations, though.

In the next couple of weeks we'll spin out co::base as a separate project, and fully extracting Collage should be fairly easy. To that end we started on a meta build system for all these dependent projects.

I'll happily merge any changes from your fork, in case you want to do this port.


Cheers,

Stefan.

--
View this message in context: http://software.1713.n2.nabble.com/Suggested-way-to-pull-canvas-wall-geometry-from-inside-eq-Config-tp7341673p7365174.html

Reply all
Reply to author
Forward
0 new messages