[Papervision3D] Fw: Positioning 3D plane to match 2D rectangle.

Frank Weinhold Frank.Weinhold at neue-digitale.de
Wed Aug 26 04:52:24 PDT 2009


Oups!

The other way arround...

	dist_to_object = camera.focus * camera.zoom;

should do it...

Frank Weinhold   Flash Application Developer   Neue Digitale / Razorfish   P +49 30 2936388 - 24     office | earth :: think before you print


-----Ursprüngliche Nachricht-----
Von: Frank Weinhold 
Gesendet: Mittwoch, 26. August 2009 13:49
An: 'papervision3d at osflash.org'
Betreff: AW: [Papervision3D] Fw: Positioning 3D plane to match 2D rectangle.

Hi!

You'll have to use the camera parameters to calc the distance from the camera to the 3D plane. This distance should be:

dist_to_object = camera.focus / camera.zoom;
  
for example:

camera.x = 0;
camera.y = 0;
camera.z = 500;
camera.focus = 500;
camera.zoom = 1;

plane.x = 0; 
plane.y = 0; 
plane.z = 0;

should display the plane's 3d dimensions 1:1 in 2d dimensions.

Maybe that will help...

Frank Weinhold   Flash Application Developer   Neue Digitale / Razorfish   P +49 30 2936388 - 24     office | earth :: think before you print

-----Ursprüngliche Nachricht-----
Von: papervision3d-bounces at osflash.org [mailto:papervision3d-bounces at osflash.org] Im Auftrag von Strange Loop Studios
Gesendet: Mittwoch, 26. August 2009 13:12
An: papervision3d at osflash.org
Betreff: Re: [Papervision3D] Fw: Positioning 3D plane to match 2D rectangle.

Thanks Buti,

I don't seem to be able to get the results i want using this. It's nowhere 
near close! So i'm either understanding it wrong or need a few pointers 
still.

Has anyone got any other examples/code?

Cheers
Doug


----- Original Message ----- 
From: "Buti" <butilon at gmail.com>
To: <papervision3d at osflash.org>
Sent: Wednesday, August 26, 2009 9:38 AM
Subject: Re: [Papervision3D] Fw: Positioning 3D plane to match 2D rectangle.


> Maybe this is helpfull
>
> http://www.everydayflash.com/blog/index.php/2008/07/07/pixel-precision-in-papervision3d/
>
>
> Strange Loop Studios wrote:
>> Hi Everyone,
>>
>> I'm wondering how i can go about positioning and sizing a plane in 3D
>> space to match the position and size of a rectangle in 2D space.
>> Has anyone got any advice please?
>>
>> Cheers
>> Doug
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.67/2326 - Release Date: 08/25/09 
18:07:00



_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org



More information about the Papervision3D mailing list