Revision 0e1437c1
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/main/TwistyObjectNode.java | ||
---|---|---|
31 | 31 |
public class TwistyObjectNode extends DistortedNode |
32 | 32 |
{ |
33 | 33 |
private final Static3D mScale; |
34 |
private int mWidth, mHeight, mScaleFactor;
|
|
34 |
private int mWidth, mHeight, mMin;
|
|
35 | 35 |
private float mCameraDist; |
36 | 36 |
private float mObjectScale; |
37 | 37 |
|
... | ... | |
56 | 56 |
{ |
57 | 57 |
mWidth = surfaceW; |
58 | 58 |
mHeight = surfaceH; |
59 |
mScaleFactor= (int)(Math.min(mWidth,mHeight)*mObjectScale);
|
|
59 |
mMin = Math.min(mWidth,mHeight);
|
|
60 | 60 |
|
61 | 61 |
resizeFBO(mWidth,mHeight); |
62 | 62 |
|
... | ... | |
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
74 | 74 |
|
75 |
int getScaleFactor()
|
|
75 |
float getScale()
|
|
76 | 76 |
{ |
77 |
return mScaleFactor;
|
|
77 |
return mObjectScale;
|
|
78 | 78 |
} |
79 | 79 |
|
80 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
93 | 93 |
public void setScaleFactor(float scale) |
94 | 94 |
{ |
95 | 95 |
mObjectScale = scale; |
96 |
mScaleFactor = (int)(Math.min(mWidth,mHeight)*mObjectScale); |
|
96 |
} |
|
97 |
|
|
98 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
99 |
|
|
100 |
public int getMinSize() |
|
101 |
{ |
|
102 |
return mMin; |
|
97 | 103 |
} |
98 | 104 |
|
99 | 105 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Correct the way ObejctScale works in the TwistyObjectNode.