[Papervision3D] Getting information about a sphere in a scene

Javier España | javierespana.com info at javierespana.com
Tue Jul 14 04:16:51 PDT 2009


Take a look at this, it helped me a lot:

http://pv3d.org/2009/06/13/how-to-click-on-stuff-in-papervision3d-viewport-viewportlayers-interactivescene3devent-mouse3d-and-moviematerial-buttons/

#4 is the one you need to look at :D

On Tue, Jul 14, 2009 at 7:08 AM, Aaron Meyers <
aaron at universaloscillation.com> wrote:

> Hello PV3D'ers,
> I was wondering if anyone had any advice about how to best figure out some
> information about a scene based around a 3D globe. The first thing I was
> hoping to figure out was how I might calculate the bounding box of a sphere
> in screen space. I thought that if I checked the width and height of the
> container sprite that the globe layer is rendering to, I might get close,
> but it seems to fluctuate unpredictably. Are there any tricks for
> calculating the screen space width/radius of a sphere object?
>
> The other thing I was wondering about is how to deduce whether an object,
> plotted on the globe, has gone over the visible horizon of the edge of the
> globe. I initially thought that I might be able to find this by checking to
> see if the objects distance from the camera is greater than the center of
> the globe's distance from the camera, but this is not even close to an
> accurate method because of the way the perspective projection distorts the
> screen. Anyone have any tips on how this might be accomplished? Thanks for
> the help!
>
> -Aaron
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090714/764dc1a5/attachment.html>


More information about the Papervision3D mailing list