docoder / iphonewavefrontloader

Automatically exported from code.google.com/p/iphonewavefrontloader
0 stars 0 forks source link

scale feature #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
unless I missed it. I realised I could not set scale a model loaded through
the library.

following the current implementation I added a new property in the
OpenGLWaveFrontObject.h file

Vertex3D currentScale;
@property Vertex3D currentScale;

and added this line in the OpenGLWaveFrontObject.m file

glScalef(currentScale.x, currentScale.y, currentScale.z);

just after these lines

// Rotate to the current rotation
    glRotatef(currentRotation.x, 1.0, 0.0, 0.0);
    glRotatef(currentRotation.y, 0.0, 1.0, 0.0);
    glRotatef(currentPosition.z, 0.0, 0.0, 1.0);

I can now scale the loaded model through the currentScale property

might be wort adding this feature for a reelease?

Seb

Original issue reported on code.google.com by sebastie...@gmail.com on 27 Jan 2010 at 1:22