Project

General

Profile

« Previous | Next » 

Revision 209ea1c7

Added by Leszek Koltunski about 4 years ago

1. library: new API DistortedNode.setProjection()
2. cube: adjustments for Pyraminx.

View differences:

src/main/java/org/distorted/library/main/InternalOutputSurface.java
38 38
  public static final int DEPTH_NO_STENCIL    = 1;
39 39
  public static final int BOTH_DEPTH_STENCIL  = 2;
40 40

  
41
  public static final float DEFAULT_FOV = 60.0f;
42
  public static final float DEFAULT_NEAR=  0.1f;
43

  
41 44
  float mFOV, mDistance, mNear, mMipmap;
42 45
  float[] mProjectionMatrix;
43 46
  int mDepthStencilCreated, mDepthStencil;
......
74 77

  
75 78
    mProjectionMatrix = new float[16];
76 79

  
77
    mFOV = 60.0f;
78
    mNear=  0.5f;
80
    mFOV = DEFAULT_FOV;
81
    mNear= DEFAULT_NEAR;
79 82

  
80 83
    mDepthStencilCreated= (depthStencil== NO_DEPTH_NO_STENCIL ? DONT_CREATE:NOT_CREATED_YET);
81 84
    mDepthStencil = depthStencil;
......
227 230

  
228 231
        surface.createProjection();
229 232

  
230
        int maxw = surface.mWidth  > surface.mRealWidth  ? surface.mWidth  : surface.mRealWidth;
231
        int maxh = surface.mHeight > surface.mRealHeight ? surface.mHeight : surface.mRealHeight;
233
        int maxw = Math.max(surface.mWidth , surface.mRealWidth );
234
        int maxh = Math.max(surface.mHeight, surface.mRealHeight);
232 235

  
233 236
        if (maxw > surface.mRealWidth || maxh > surface.mRealHeight)
234 237
          {

Also available in: Unified diff