Resize plane

Started by rodplamo, June 17, 2011, 10:11:54 AM

Previous topic - Next topic

rodplamo

Hi everyone,

I'm still developing my AR browser, and now i have a new doubt. I need display different size images, and i use a plane with this image like texture. But, if image isn't square, image resizes it and it adapts to plane size... How can i convert an square plane to a rectangle?

Thanks!!

EgonOlsen

You can use an IVertexController to manipulate the mesh of an existing Object3D to deform it. Or you can write your own method that creates rectangles of any size. That's pretty easy...all you need is to create an Object3D and add two polygons of the given size.
Another option is to tweak the rotation matrix by hand to add non-uniform scaling...that might work (you should be able to find some references in the forum), but it has some drawbacks when you are using lighting or jPCT's own scaling on such an object.

rodplamo

I want to do most simple solution but I don't know how add polygons to Object3D...


rodplamo

Ok, i think understand it, but after, when i add two triangles, this will be only one object? I say this because i want to put one only texture in the rectangle created...

Thank you very much EgonOlsen

EgonOlsen

I don't get your last question... ???