首页 > 文档 > ortho()邻
2017
08-07

ortho()邻

Name

ortho()

   

Examples

ortho()邻 - 第1张  | Processing编程艺术ortho()邻 - 第2张  | Processing编程艺术ortho()邻 - 第3张  | Processing编程艺术

size(100, 100, P3D);

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(45);

Description

Sets an orthographic projection and defines a parallel clipping volume. All objects with the same dimension appear the same size, regardless of whether they are near or far from the camera. The parameters to this function specify the clipping volume where left and right are the minimum and maximum x values, top and bottom are the minimum and maximum y values, and near and far are the minimum and maximum z values. If no parameters are given, the default is used: ortho(-width/2, width/2, -height/2, height/2).

设置一个正交投影并定义一个并行剪切卷。所有具有相同维度的对象都显示相同的大小, 无论它们是靠近还是远离照相机。此函数的参数指定在左、右为最小和最大值的剪切卷, 顶部和底部是最小和最大 y , 远近是最小和最大 z 值。如果没有给出参数, 则使用缺省值: (-宽度/2, width/2,-height/2, height/2)

Syntax

ortho()

ortho(left, right, bottom, top)

ortho(left, right, bottom, top, near, far)

Parameters

left

float: left plane of the clipping volume

剪切卷的左平面

right

float: right plane of the clipping volume

剪切卷的右平面

bottom

float: bottom plane of the clipping volume

剪切卷的底部平面

top

float: top plane of the clipping volume

剪切卷的顶部平面

near

float: maximum distance from the origin to the viewer

从原点到观察者的最大距离

far

float: maximum distance from the origin away from the viewer

从原点到观察者的最大距离

Returns

void



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。