From 6266c8a4b2485b29a7d5bcb217460d7aad3e1c4a Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 25 Aug 2019 20:58:10 -0400 Subject: [PATCH] Proto version slider. --- Camera.java | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Camera.java b/Camera.java index 27c2395..0195701 100644 --- a/Camera.java +++ b/Camera.java @@ -3,7 +3,6 @@ // Decompiler options: packimports(3) // Source File Name: Camera.java - class Camera extends Object3D { static final long serialVersionUID = 4754289789178680517L; @@ -11,7 +10,7 @@ /*static*/ float DECAL = 12; // 3; /*static*/ float SCALE = 1; // 0.5f; - float shaper_fovy = 60.0f; + float shaper_fovy = 25.0f; float shaper_zNear = 0.01f; float shaper_zFar = 1E5f; // 500.0f; @@ -21,8 +20,8 @@ //<-2.2,0.7,-2> and pointed it at <-0.61,0.3,-0.6> // location = LA.newVector(2,0.7,-2); // lookAt = new cVector(0.6,0.3,-0.6); - location = LA.newVector(2,0.7,2); - lookAt = new cVector(0.0,0.3,0); + location = LA.newVector(6,2,4); + lookAt = new cVector(0.0,0.5,0); direction = new cVector(); toParent = LA.newMatrix(); fromParent = LA.newMatrix(); @@ -53,7 +52,7 @@ perspective = true; break; case 1: // '\001' - location = LA.newVector(0, 0, 4); + location = LA.newVector(4, 0, 0); perspective = false; break; case 2: // '\002' @@ -64,7 +63,7 @@ //LA.matXRotate(fromScreen, LA.toRadians(90)); break; case 3: // '\003' - location = LA.newVector(4, 0, 0); + location = LA.newVector(0, 0, 4); //LA.matZRotate(toScreen, LA.toRadians(-90)); //LA.matXRotate(toScreen, LA.toRadians(-90)); //LA.matXRotate(fromScreen, LA.toRadians(90)); @@ -72,7 +71,7 @@ perspective = false; break; case 4: // Default light - location = LA.newVector(10, 30, 20); + location = LA.newVector(-5, 15, 10); perspective = false; break; } @@ -105,6 +104,15 @@ focalLength = 1; setAspect(4, 3); background = LA.newVector(0.8, 0.8, 0.8); + } + + void CreateMaterial(boolean multiply) + { + super.CreateMaterial(multiply); + + material.shift = 90; + material.cameralight = 0.2f; + material.shadowbias = 10; } void setAspect(int width, int height) @@ -320,7 +328,7 @@ location.set(lookAt); lookAt.set(cStatic.point1); - computeTransform(); + //computeTransform(); } //synchronized // june 2014 @@ -392,13 +400,15 @@ if (CameraPane.ROTATECAMERA) { double[][] rotate = { { 0,1,0,0 }, { -1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; - double[][] rotate_1 = { { 0,-1,0,0 }, { 1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; + //double[][] rotate_1 = { { 0,-1,0,0 }, { 1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; - LA.matConcat(rotate, fromScreen, fromScreen); - LA.matConcat(toScreen, rotate_1, toScreen); + LA.matConcat(fromScreen, rotate, fromScreen); + //LA.matConcat(toScreen, rotate_1, toScreen); } //if (this == CameraPane.lightCamera) //CameraPane.lighttouched = true; + + LA.matInvert(fromScreen, toScreen); } // void Draw(CameraPane display, Object3D /*Composite*/ root, boolean selected) -- Gitblit v1.6.2