KenzieMac130 / ogre-procedural

Automatically exported from code.google.com/p/ogre-procedural
0 stars 0 forks source link

planegenerator #121

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. construct a plane
2. size 1024 X 768
3.

What is the expected output? What do you see instead?
the width and height are inverted

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by kyles.st...@gmail.com on 24 Aug 2012 at 12:43

GoogleCodeExporter commented 8 years ago
Hi,
What do you mean by "the width and height are inverted"?
The PlaneGenerator doesn't reference any width or height, just sizeX and sizeY 
(where X and Y are local axis perpendicular to the plane's normal)

Original comment by michael.broutin@gmail.com on 24 Aug 2012 at 4:01

GoogleCodeExporter commented 8 years ago
Hi, an example in my case would be to set a camera at pos (0,0,200),
then create a plane with planegenerator, ex

Procedural::PlaneGenerator().setSizeX( 1024 ).setSizeY( 768 ).setNumSegX( 5
).setNumSegY( 5 ).setUTile(1.0).setVTile(1.0).realizeMesh(name);

I then attach it to a scene node, I rotate the scene node 90 on x.
I then see the plane but with the width and height inverted ( 1024 unit
along Y, and 768 unit along X ), as I want(1024 unit along X, and 768 unit
along Y )
, maybe I'm doing something wrong ?
thx again for your tool.
steph

Hi,
What do you mean by "the width and height are inverted"?
The PlaneGenerator doesn't reference any width or height, just sizeX and  
sizeY (where X and Y are local axis perpendicular to the plane's normal)

Original comment by kyles.st...@gmail.com on 29 Aug 2012 at 10:07

GoogleCodeExporter commented 8 years ago
Hmm, the doc is probably a bit misleading...

X and Y are local axis.

local X = normal.perpendicular()
        = normal x global X (or normal x global Y if normal and X are colinear)
local Y = normal x local X

So, with normal = default value (=UNIT_Y)
local X = global -Z
local Y = global X

That explains why you don't see expected results... the easy solution is 
setting X=768 and Y=1024

Original comment by michael.broutin@gmail.com on 29 Aug 2012 at 12:38

GoogleCodeExporter commented 8 years ago
Hi, thx again I will try this, I understand now it was in local axes.
best,
stephane

Original comment by kyles.st...@gmail.com on 29 Aug 2012 at 2:02

GoogleCodeExporter commented 8 years ago
Ok, I'm just keeping that issue open to remember the doc needs some fixing.

Original comment by michael.broutin@gmail.com on 29 Aug 2012 at 2:06

GoogleCodeExporter commented 8 years ago

Original comment by michael.broutin@gmail.com on 21 Sep 2012 at 5:16