Changing Registration Point Dynamically

5 messages Options
Embed this post
Permalink
Lars Schwarz

Changing Registration Point Dynamically

Reply Threaded More More options
Print post
Permalink
hi all,

i was wondering if there's a way to dynamically change an 3D object's
registration point.
 in my case i want to rotate a plane on the Y axis. i'm using two
different planes (landscape
and portrait) where only one of them is visible once (like a double
sided plane with different
dimensions).

the portrait plane is centered, the landscape plane is "right
aligned". now i want to rotate
the portrait one on the "regular" center but the landscape one on the
"center-difference"
between those 2 planes... let's say the portrait registration point
for rotation is 0, but the
landscape registration point for rotation should be something like -300...

i don't want/can't use a wrapper container here, so i'm really looking
for a way to change
the "internal" registration point...

thanks: lars

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
JohnBrookes

Re: Changing Registration Point Dynamically

Reply Threaded More More options
Print post
Permalink
Move all the vertices one direction and the do3d an equal amount in the other. So it stays in the same position.
Or
Use rotationMatrixWithReference()

2009/11/2 Lars Schwarz <[hidden email]>
hi all,

i was wondering if there's a way to dynamically change an 3D object's
registration point.
 in my case i want to rotate a plane on the Y axis. i'm using two
different planes (landscape
and portrait) where only one of them is visible once (like a double
sided plane with different
dimensions).

the portrait plane is centered, the landscape plane is "right
aligned". now i want to rotate
the portrait one on the "regular" center but the landscape one on the
"center-difference"
between those 2 planes... let's say the portrait registration point
for rotation is 0, but the
landscape registration point for rotation should be something like -300...

i don't want/can't use a wrapper container here, so i'm really looking
for a way to change
the "internal" registration point...

thanks: lars

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
BorisM

Re: Changing Registration Point Dynamically

Reply Threaded More More options
Print post
Permalink
In reply to this post by Lars Schwarz
something like that:

public function changeRegistration(obj:Plane,
xoffset:Number,yoffset:Number,zoffset:Number):void
  {
   for each (var v:Vertex3D in obj.geometry.vertices)
   {
    v.x += xoffset;
    v.y += yoffset;
    v.z += zoffset;
   }

   obj.x -= xoffset;
   obj.y -= yoffset;
   obj.z -= zoffset;

  }

?


----- Original Message -----
From: "Lars Schwarz" <[hidden email]>
To: <[hidden email]>
Sent: Monday, November 02, 2009 2:56 PM
Subject: [Papervision3D] Changing Registration Point Dynamically


> hi all,
>
> i was wondering if there's a way to dynamically change an 3D object's
> registration point.
> in my case i want to rotate a plane on the Y axis. i'm using two
> different planes (landscape
> and portrait) where only one of them is visible once (like a double
> sided plane with different
> dimensions).
>
> the portrait plane is centered, the landscape plane is "right
> aligned". now i want to rotate
> the portrait one on the "regular" center but the landscape one on the
> "center-difference"
> between those 2 planes... let's say the portrait registration point
> for rotation is 0, but the
> landscape registration point for rotation should be something like -300...
>
> i don't want/can't use a wrapper container here, so i'm really looking
> for a way to change
> the "internal" registration point...
>
> thanks: lars
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Lars Schwarz

Re: Changing Registration Point Dynamically

Reply Threaded More More options
Print post
Permalink
that will do, thanks!

On Mon, Nov 2, 2009 at 3:12 PM, Boris Munser <[hidden email]> wrote:

> something like that:
>
> public function changeRegistration(obj:Plane,
> xoffset:Number,yoffset:Number,zoffset:Number):void
>  {
>  for each (var v:Vertex3D in obj.geometry.vertices)
>  {
>   v.x += xoffset;
>   v.y += yoffset;
>   v.z += zoffset;
>  }
>
>  obj.x -= xoffset;
>  obj.y -= yoffset;
>  obj.z -= zoffset;
>
>  }
>
> ?
>
>
> ----- Original Message ----- From: "Lars Schwarz" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, November 02, 2009 2:56 PM
> Subject: [Papervision3D] Changing Registration Point Dynamically
>
>
>> hi all,
>>
>> i was wondering if there's a way to dynamically change an 3D object's
>> registration point.
>> in my case i want to rotate a plane on the Y axis. i'm using two
>> different planes (landscape
>> and portrait) where only one of them is visible once (like a double
>> sided plane with different
>> dimensions).
>>
>> the portrait plane is centered, the landscape plane is "right
>> aligned". now i want to rotate
>> the portrait one on the "regular" center but the landscape one on the
>> "center-difference"
>> between those 2 planes... let's say the portrait registration point
>> for rotation is 0, but the
>> landscape registration point for rotation should be something like -300...
>>
>> i don't want/can't use a wrapper container here, so i'm really looking
>> for a way to change
>> the "internal" registration point...
>>
>> thanks: lars
>>
>> _______________________________________________
>> Papervision3D mailing list
>> [hidden email]
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>



--
Lars Schwarz
Heiligengeist Höfe 2
26121 Oldenburg
T +49(0)441 36110338
M +49(0)151 1727 8127
W www.bitrocker.com
TWTTR: www.twitter.com/bitrocker

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Lars Schwarz

Re: Changing Registration Point Dynamically

Reply Threaded More More options
Print post
Permalink
eh... will this automatically affect the texture/material?

On Mon, Nov 2, 2009 at 3:13 PM, Lars Schwarz <[hidden email]> wrote:

> that will do, thanks!
>
> On Mon, Nov 2, 2009 at 3:12 PM, Boris Munser <[hidden email]> wrote:
>> something like that:
>>
>> public function changeRegistration(obj:Plane,
>> xoffset:Number,yoffset:Number,zoffset:Number):void
>>  {
>>  for each (var v:Vertex3D in obj.geometry.vertices)
>>  {
>>   v.x += xoffset;
>>   v.y += yoffset;
>>   v.z += zoffset;
>>  }
>>
>>  obj.x -= xoffset;
>>  obj.y -= yoffset;
>>  obj.z -= zoffset;
>>
>>  }
>>
>> ?
>>
>>
>> ----- Original Message ----- From: "Lars Schwarz" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Monday, November 02, 2009 2:56 PM
>> Subject: [Papervision3D] Changing Registration Point Dynamically
>>
>>
>>> hi all,
>>>
>>> i was wondering if there's a way to dynamically change an 3D object's
>>> registration point.
>>> in my case i want to rotate a plane on the Y axis. i'm using two
>>> different planes (landscape
>>> and portrait) where only one of them is visible once (like a double
>>> sided plane with different
>>> dimensions).
>>>
>>> the portrait plane is centered, the landscape plane is "right
>>> aligned". now i want to rotate
>>> the portrait one on the "regular" center but the landscape one on the
>>> "center-difference"
>>> between those 2 planes... let's say the portrait registration point
>>> for rotation is 0, but the
>>> landscape registration point for rotation should be something like -300...
>>>
>>> i don't want/can't use a wrapper container here, so i'm really looking
>>> for a way to change
>>> the "internal" registration point...
>>>
>>> thanks: lars
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> [hidden email]
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> [hidden email]
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>
>
>
> --
> Lars Schwarz
> Heiligengeist Höfe 2
> 26121 Oldenburg
> T +49(0)441 36110338
> M +49(0)151 1727 8127
> W www.bitrocker.com
> TWTTR: www.twitter.com/bitrocker
>



--
Lars Schwarz
Heiligengeist Höfe 2
26121 Oldenburg
T +49(0)441 36110338
M +49(0)151 1727 8127
W www.bitrocker.com
TWTTR: www.twitter.com/bitrocker

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org