Processing, ortho()
用法介紹。
用法
ortho()
ortho(left, right, bottom, top)
ortho(left, right, bottom, top, near, far)
參數
left
(float)
裁剪體積的左平麵right
(float)
裁剪體積的右平麵bottom
(float)
裁剪體積的底平麵top
(float)
裁剪體積的頂平麵near
(float)
從原點到觀察者的最大距離far
(float)
從原點到觀察者的最大距離
返回
void
說明
設置正交投影並定義平行裁剪體積。具有相同尺寸的所有對象都顯示相同的大小,無論它們是靠近還是遠離相機。此函數的參數指定裁剪量,其中 left 和 right 是最小和最大 x 值,top 和 bottom 是最小和最大 y 值,near 和 far 是最小和最大 z 值。如果沒有給出參數,則使用默認值:ortho(-width/2, width/2, -height/2, height/2)
。
例子
size(400, 400, P3D);
pixelDensity(2);
noFill();
ortho(-width/2, width/2, -height/2, height/2); // Same as ortho()
translate(width/2, height/2, 0);
rotateX(-PI/6);
rotateY(PI/3);
box(180);

相關用法
- Processing FFT用法及代碼示例
- Processing SawOsc.pan()用法及代碼示例
- Processing FloatDict用法及代碼示例
- Processing FFT.stop()用法及代碼示例
- Processing join()用法及代碼示例
- Processing () (parentheses)用法及代碼示例
- Processing Pulse用法及代碼示例
- Processing PShader用法及代碼示例
- Processing PVector.set()用法及代碼示例
- Processing FloatDict.sortKeysReverse()用法及代碼示例
- Processing texture()用法及代碼示例
- Processing IntDict.add()用法及代碼示例
- Processing PShape.enableStyle()用法及代碼示例
- Processing FloatDict.sub()用法及代碼示例
- Processing String用法及代碼示例
- Processing PImage.pixels[]用法及代碼示例
- Processing vertex()用法及代碼示例
- Processing PVector.mag()用法及代碼示例
- Processing thread()用法及代碼示例
- Processing Capture.stop()用法及代碼示例
- Processing Env.play()用法及代碼示例
- Processing StringList用法及代碼示例
- Processing parseJSONArray()用法及代碼示例
- Processing JSONArray.getIntArray()用法及代碼示例
- Processing Sound.inputDevice()用法及代碼示例
注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 ortho()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。