summaryrefslogtreecommitdiffstats
path: root/src/gleem/CameraParameters.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/gleem/CameraParameters.java')
-rw-r--r--src/gleem/CameraParameters.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gleem/CameraParameters.java b/src/gleem/CameraParameters.java
index 658820d..c406cda 100644
--- a/src/gleem/CameraParameters.java
+++ b/src/gleem/CameraParameters.java
@@ -61,6 +61,8 @@ public class CameraParameters {
Vec3f forwardDirection,
Vec3f upDirection,
Rotf orientation,
+ Mat4f modelviewMatrix,
+ Mat4f projectionMatrix,
float vertFOV,
float imagePlaneAspectRatio,
int xSize,
@@ -69,6 +71,8 @@ public class CameraParameters {
setForwardDirection(forwardDirection);
setUpDirection(upDirection);
setOrientation(orientation);
+ setModelviewMatrix(modelviewMatrix);
+ setProjectionMatrix(projectionMatrix);
setVertFOV(vertFOV);
setImagePlaneAspectRatio(imagePlaneAspectRatio);
setXSize(xSize);
@@ -79,12 +83,25 @@ public class CameraParameters {
setPosition(params.getPosition());
setForwardDirection(params.getForwardDirection());
setUpDirection(params.getUpDirection());
+ setOrientation(params.getOrientation());
+ setModelviewMatrix(params.getModelviewMatrix());
+ setProjectionMatrix(params.getProjectionMatrix());
setVertFOV(params.getVertFOV());
setImagePlaneAspectRatio(params.getImagePlaneAspectRatio());
setXSize(params.getXSize());
setYSize(params.getYSize());
}
+ public Object clone() {
+ CameraParameters params = new CameraParameters();
+ params.set(this);
+ return params;
+ }
+
+ public CameraParameters copy() {
+ return (CameraParameters) clone();
+ }
+
/** Sets 3-space origin of camera */
public void setPosition(Vec3f position) { this.position.set(position); }
/** Gets 3-space origin of camera */