1 /* 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package javafx.scene; 27 28 import com.sun.javafx.geom.PickRay; 29 import com.sun.javafx.geom.Vec3d; 30 import com.sun.javafx.geom.transform.Affine3D; 31 import com.sun.javafx.geom.transform.GeneralTransform3D; 32 33 public class CameraShim { 34 35 public static PickRay computePickRay(Camera c, 36 double x, double y, PickRay pickRay) { 37 return c.computePickRay(x, y, pickRay); 38 } 39 40 public static Vec3d computePosition(Camera c, Vec3d position) { 41 return c.computePosition(position); 42 } 43 44 public static double getFarClipInScene(Camera c) { 45 return c.getFarClipInScene(); 46 } 47 48 public static double getNearClipInScene(Camera c) { 49 return c.getNearClipInScene(); 50 } 51 52 public static GeneralTransform3D getProjViewTransform(Camera c) { 53 return c.getProjViewTransform(); 54 } 55 56 public static Affine3D getSceneToLocalTransform(Camera c) { 57 return c.getSceneToLocalTransform(); 58 } 59 60 public static double getViewHeight(Camera c) { 61 return c.getViewHeight(); 62 } 63 64 public static double getViewWidth(Camera c) { 65 return c.getViewWidth(); 66 } 67 68 69 }