This is G o o g l e's cache of http://www.flashsandy.org/forum/index.php?showtopic=505&mode=threaded&pid=3028 as retrieved on 7 Aug 2007 06:27:17 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:6DN7DVwTTPUJ:www.flashsandy.org/forum/index.php%3Fshowtopic%3D505%26mode%3Dthreaded%26pid%3D3028+site:www.flashsandy.org+showtopic&hl=en&ct=clnk&cd=67


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: showtopic

Welcome Guest ( Log In | Register )

> Face.createNormale() in 1.1, normal is created with inverse y direction
cyanescent
post May 5 2007, 12:17 PM
Post #1


Newbie
*

Group: Members
Posts: 6
Joined: 5-May 07
Member No.: 1,130



I am playing around with transitions and face normals, and noticed that the normals created with QuadFace3D.createnormale() (and TriFace3D) are pointing in the inverse y direction:

CODE


  // obj3D contains sorted vertex coordinates
  var ref:QuadFace3D = new QuadFace3D( new Object3D(), obj3D.aPoints[0], obj3D.aPoints[2], obj3D.aPoints[3], obj3D.aPoints[1] );

  // created vector needs to have an inverse y co-ordinate to be moved in the correct direction  
  var refv:Vector = new Vector( ref.createNormale().x, -ref.createNormale().y, ref.createNormale().z );
  var refsv:Vector = VectorMath.scale(refv,12);

  var extrude:Transform3D = new Transform3D();
  extrude.translate(refsv.x, refsv.y, refsv.z);

  // transformGroup code omitted for brevity



I don't know if this is still the case with later versions, I had some compile problems using mtasc on the 1.2 branch...

Everything else I tried is great! thank you very much for the excellent code under a liberal license, and also petit labs for the comprehensive tutorials.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
kiroukou
post May 5 2007, 08:05 PM
Post #2


Administrator
***

Group: Root Admin
Posts: 903
Joined: 12-June 06
Member No.: 1



Hi,
Where are the object vertices come from? a primitive? Because that's the important thing (IMG:style_emoticons/default/smile.gif)

Otherwise, as Petit said, the version Id has been increased to show that it is not fully compatible. So you have to update your code (which is really simple BTW).
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
cyanescent
post May 6 2007, 07:35 AM
Post #3


Newbie
*

Group: Members
Posts: 6
Joined: 5-May 07
Member No.: 1,130



Hi kiroukou, Hi petit,

In the flashsandy1.1 example I am extending the sphere primitive, and attempting (successfully at the moment) to split the faces into objects and then apply transforms according to the normals of the faces. In doing so I notices some malformed normals in the flipped y direction, though if this is fixed in later release, then forget I ever mentioned. :-j

In the second example using flashsandy1.2 I am compiling a very minimal class containing only some imports and a static main function... the world object is not instantiated, it's just a test to see if mtasc is happy with the library (IMG:style_emoticons/default/tongue.gif)

If Clipscreen does not exist in the 1.2 branch maybe it should be removed from the download ?

This post has been edited by cyanescent: May 6 2007, 07:37 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Petit
post May 6 2007, 12:03 PM
Post #4


Advanced Member
***

Group: Moderator
Posts: 576
Joined: 21-June 06
From: Borgholm, Sweden
Member No.: 38



QUOTE(cyanescent @ May 6 2007, 07:35 AM) *

If Clipscreen does not exist in the 1.2 branch maybe it should be removed from the download ?

You may be right there (IMG:style_emoticons/default/wink.gif)
Leaving obsolete classes behind in a distribution is confusing.
The 1.2 version is beta and still under development, which means that features and stability increases slowly.
The latest sub version can be found in the SVN repository - read Bruce's FAQ for info.

If the MTASC still refuses to compile your minimal Sandy 1.2 class, could you show it here?


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
cyanescent
post May 6 2007, 02:48 PM
Post #5


Newbie
*

Group: Members
Posts: 6
Joined: 5-May 07
Member No.: 1,130



QUOTE(Petit @ May 6 2007, 02:03 PM) *

If the MTASC still refuses to compile your minimal Sandy 1.2 class, could you show it here?


I've made a mistake, I checked again and I had actually instantiated ClipScreen to get that error.. now mtasc does not complain anymore. sorry for the bug-spam.

As you are here, can you explain how you calculated midX and midY in your last tutorial of petit labs http://www.petitpub.com/labs/media/flash/s...eractions.shtml ?

The problem I have is finding the flattened X and Y coordinates of a sandy 3D object, so I can interact more with mouse coordinates, or is there a better way of doing that with the 1.2 branch ?

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Petit
post May 6 2007, 03:53 PM
Post #6


Advanced Member
***

Group: Moderator
Posts: 576
Joined: 21-June 06
From: Borgholm, Sweden
Member No.: 38



QUOTE(cyanescent @ May 6 2007, 02:48 PM) *

can you explain how you calculated midX and midY in your last tutorial of petit labs http://www.petitpub.com/labs/media/flash/s...eractions.shtml ?
The problem I have is finding the flattened X and Y coordinates of a sandy 3D object, so I can interact more with mouse coordinates, or is there a better way of doing that with the 1.2 branch ?

The midX, midY is simply the center of the Stage.
Here this is also position of the world origin on the stage.
CODE
var midX:Number = Stage.width/2;
var midY:Number = Stage.height/2;

( You can find this out by downloading the code for the tutorial of course (IMG:style_emoticons/default/wink.gif) )

I can use this to get symmetrical changes to the axis of rotation and sometimes the velocity of rotation.
This works well only if you let the object you rotate stay in the middle of the stage ( screen ).

So, I'm sorry - no fancy stuff here. I don't get the values from the object and "flatten" them.

Bounce:
What exactly do you mean by "the flattened X and Y coordinates" of an object?
Do you want to know the coordinates on the drawing area of the object position ( the projection ) ?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 7th August 2007 - 06:06 AM
phpMyVisites