Project

General

Profile

« Previous | Next » 

Revision e2d8ea1d

Added by Leszek Koltunski almost 8 years ago

Progress with Vertex3D

View differences:

src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
99 99

  
100 100
    if( width > height )
101 101
      {
102
      float factor = height/(3.0f*SIZE);
103 102
      mCube.move( new Static3D((width-height)/2,0,0) );
104
      mCube.scale(factor);
103
      mCube.scale(height/(3.0f*SIZE));
105 104
      }  
106 105
    else
107 106
      {
108
      float factor = width/(3.0f*SIZE);
109 107
      mCube.move( new Static3D(0,(height-width)/2,0) );
110
      mCube.scale(factor);
108
      mCube.scale(width/(3.0f*SIZE));
111 109
      }
112 110
     
113 111
    mCube.quaternion( mRot, new Static3D(3*SIZE/2,3*SIZE/2,0) );

Also available in: Unified diff