summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/base/plain_picture.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/base/plain_picture.asy')
-rw-r--r--Build/source/utils/asymptote/base/plain_picture.asy22
1 files changed, 15 insertions, 7 deletions
diff --git a/Build/source/utils/asymptote/base/plain_picture.asy b/Build/source/utils/asymptote/base/plain_picture.asy
index 4d894dc6dea..b3836d7ef51 100644
--- a/Build/source/utils/asymptote/base/plain_picture.asy
+++ b/Build/source/utils/asymptote/base/plain_picture.asy
@@ -408,16 +408,18 @@ struct projection {
bool infinity;
bool oblique;
bool absolute=false;
- triple camera;
- triple up;
- triple target;
+ triple camera; // Position of camera.
+ triple up; // A vector that should be projected to direction (0,1).
+ triple target; // Point where camera is looking at.
+ pair viewportshift; // Fractional viewport shift.
+ real zoom=1; // Zoom factor.
+ real angle; // Lens angle (for perspective projection).
bool showtarget=true; // Expand bounding volume to include target?
typedef transformation projector(triple camera, triple up, triple target);
projector projector;
bool autoadjust=true; // Adjust camera to lie outside bounding volume?
- bool center=false; // Center target within bounding volume?
- real angle; // Lens angle (currently only used by PRC viewpoint).
- int ninterpolate; // Used for projecting nurbs to 2D Bezier curves.
+ bool center=false; // Center target within bounding volume?
+ int ninterpolate; // Used for projecting nurbs to 2D Bezier curves.
void calculate() {
transformation T=projector(camera,up,target);
@@ -438,11 +440,15 @@ struct projection {
}
void operator init(triple camera, triple up=(0,0,1), triple target=(0,0,0),
+ real zoom=1, real angle=0, pair viewportshift=0,
bool showtarget=true, bool autoadjust=true,
bool center=false, projector projector) {
this.camera=camera;
this.up=up;
this.target=target;
+ this.zoom=zoom;
+ this.angle=angle;
+ this.viewportshift=viewportshift;
this.showtarget=showtarget;
this.autoadjust=autoadjust;
this.center=center;
@@ -459,11 +465,13 @@ struct projection {
P.camera=camera;
P.up=up;
P.target=target;
+ P.zoom=zoom;
+ P.angle=angle;
+ P.viewportshift=viewportshift;
P.showtarget=showtarget;
P.autoadjust=autoadjust;
P.center=center;
P.projector=projector;
- P.angle=angle;
P.ninterpolate=ninterpolate;
return P;
}