亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? camera.java

?? 基于java的3d開發庫。對坐java3d的朋友有很大的幫助。
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
//===========================================================================//=-------------------------------------------------------------------------=//= Module history:                                                         =//= - August 8 2005 - Oscar Chavarro: Original base version                 =//= - August 24 2005 - David Diaz / Cesar Bustacara: Design changes to      =//=   decouple JOGL from the Camera data model, extra utilitary methods     =//=   added                                                                 =//= - August 25 2005 - Oscar Chavarro: English translation of comments      =//= - September 12 2005 - Oscar Chavarro: generateRay updated               =//= - November 15 2005 - Oscar Chavarro: generateRay updated (Bug?)         =//= - November 23 2005 - Oscar Chavarro: updated methods for direct access  =//=   of coordinate base system and access maintaining ortoghonality.       =//= - November 24 2005 - Oscar Chavarro: new generateRay algorithm, now     =//=   consistent with JOGL/OpenGL transformation interpretation.            =//= - April 7 2006 - Oscar Chavarro: calculateUPlaneAtPixel, proyectPoint   =//= - November 5 2006 - Oscar Chavarro: plane calculation methods updated   =//= - November 5 2006 - Oscar Chavarro: added Cohen-Sutherland line         =//=   clipping functionality                                                =//===========================================================================package vsdk.toolkit.environment;import vsdk.toolkit.common.VSDK;import vsdk.toolkit.common.Entity;import vsdk.toolkit.common.Vector3D;import vsdk.toolkit.common.Vector4D;import vsdk.toolkit.common.Ray;import vsdk.toolkit.common.Matrix4x4;import vsdk.toolkit.environment.geometry.Geometry;import vsdk.toolkit.environment.geometry.InfinitePlane;public class Camera extends Entity{    /// Check the general attribute description in superclass Entity.    public static final long serialVersionUID = 20060502L;    // Basic Camera Model    private Vector3D up;    private Vector3D front;    private Vector3D left;    private Vector3D eyePosition;    private double focalDistance;    private int projectionMode;    private double fov;    private double orthogonalZoom;    private double nearPlaneDistance;    private double farPlaneDistance;    /// This string should be used for specific application defined    /// functionality. Can be null.    private String name;    // Global constants    public static final int OPCODE_FAR = (0x01 << 1);    public static final int OPCODE_NEAR = (0x01 << 2);    public static final int OPCODE_RIGHT = (0x01 << 3);    public static final int OPCODE_LEFT = (0x01 << 4);    public static final int OPCODE_UP = (0x01 << 5);    public static final int OPCODE_DOWN = (0x01 << 6);    public static final int STEREO_MODE_CENTER = 1;    public static final int STEREO_MODE_LEFT_EYE = 2;    public static final int STEREO_MODE_RIGHT_EYE = 3;    public static final int PROJECTION_MODE_ORTHOGONAL = 4;    public static final int PROJECTION_MODE_PERSPECTIVE = 5;    /**    Una `Camera` debe saber de qu&eacute; tama&ntilde;o es el viewport para    el cual est&aacute; generando una proyecci&oacute;n, para poder modificar    sus par&aacute;metros internos en funci&oacute;n del &aacute;ngulo de    vision (`fov`) y de la actual proporci&oacute;n de ancho/alto del    viewport. Las variables internas `viewportXSize` y `viewportYSize`    representan el tama&nacute;o en pixels para el viewport, y son valores    que solo pueden ser cambiados por el m&eacute;todo     `Camera::updateViewportResize`. Estos dos valores son para uso interno de    la clase c&aacute;mara y no pueden ser consultados (i.e. son una copia    de la configuraci&oacute;n del viewport, que debe ser administrado por    la aplicaci&oacute;n que use `Camera`s).    */    private double viewportXSize;    /// Check `viewportXSize`'s documentation    private double viewportYSize;    // Private values which are preprocessed to speed up calculations    private Vector3D dx, dy, _dir, upWithScale, rightWithScale;    private Matrix4x4 normalizingTransformation;        public Camera()     {        eyePosition = new Vector3D(0,-5,1);                up = new Vector3D(0,0,1);        front=new Vector3D(0,1,0);        left=new Vector3D(-1,0,0);                fov = 60;        viewportXSize = 320;        viewportYSize = 320;        projectionMode = PROJECTION_MODE_PERSPECTIVE;        orthogonalZoom = 1;        nearPlaneDistance = 0.05;        farPlaneDistance = 100;        focalDistance = 10;        updateVectors();    }    public Camera(Camera b)    {        eyePosition = new Vector3D(b.eyePosition);                up = new Vector3D(b.up);        front=new Vector3D(b.front);        left=new Vector3D(b.left);                fov = b.fov;        viewportXSize = b.viewportXSize;        viewportYSize = b.viewportYSize;        projectionMode = b.projectionMode;        orthogonalZoom = b.orthogonalZoom;        nearPlaneDistance = b.nearPlaneDistance;        farPlaneDistance = b.farPlaneDistance;        focalDistance = b.focalDistance;        updateVectors();    }    public Matrix4x4 getNormalizingTransformation()    {        return normalizingTransformation;    }    public String getName()    {        return name;    }    public void setName(String n)    {        name = new String(n);    }    public double getViewportXSize()    {        return viewportXSize;    }    public double getViewportYSize()    {        return viewportYSize;    }    public Vector3D getPosition()    {        return eyePosition;    }    public void setPosition(Vector3D eyePosition)    {        this.eyePosition.clone(eyePosition);    }        public Vector3D getFocusedPosition()    {        Vector3D partial;        Vector3D result;        partial = front.multiply(focalDistance);        result = eyePosition.add(partial);        return result;    }    /**    This method changes the `front` unit vector and the `focalDistance` based     on `focusedPosition` parameter and current `eyePosition` value, WITHOUT    changing any other vector. This method does NOT change the value of `up`    of `left` vectors and can be used in advanced applications to directly    access basic camera parameters.     */    public void setFocusedPositionDirect(Vector3D focusedPosition)    {        Vector3D partial;        partial = focusedPosition.substract(eyePosition);        front.clone(partial);        focalDistance = front.length();        front.normalize();    }    /**    This method changes the `front` unit vector, the `focalDistance`, the     `left` vector and the `up` vector, based on:      - `focusedPosition` parameter      - current `eyePosition` value      - current `up` vector (taken as a hint)    This method CAN change the value of `up` and `left` vectors, to    allow the user specify a left-handed orthogonal reference frame formed by    the vectors <up, front, left>. The initial up vector is taken as a hint    to specify a new up vector, similar to the original but forming a 90    degree angle with the front direction. The left vector is always changed    to form a third orthogonal vectors to former ones. Note that the three    resulting vectors are left normalized.    \todo    This method FAILS if the initial value of `up` is parallel to the    `front` direction. Validation and exception handling are needed.     */    public void setFocusedPositionMaintainingOrthogonality(Vector3D focusedPosition)    {        Vector3D partial1;        partial1 = focusedPosition.substract(eyePosition);        front.clone(partial1);        focalDistance = front.length();        front.normalize();        left = up.crossProduct(front);        left.normalize();        up = front.crossProduct(left);        up.normalize();    }    public Vector3D getUp()    {        return up;    }    public Vector3D getFront()    {        return front;    }    public Vector3D getLeft()    {        return left;    }    /**    This method overwrites current `up` vector value, without considering the    ill-case of getting `up` and `front` vectors pointing in the same    direction.    For non-advanced programmers, it is desireable to invoke the     `setUpMaintainingOrthogonality` method instead of this one.    */    public void setUpDirect(Vector3D up)    {        this.up.clone(up);    }    /**    This method overwrites current `left` vector value, without considering the    ill-case of getting `left` and `front` (or `up` vectors pointing in the    same direction.    For non-advanced programmers, it is desireable to invoke the     `setLeftMaintainingOrthogonality` method instead of this one.    */    public void setLeftDirect(Vector3D left)    {        this.left.clone(left);    }    /**     * En este metodo no se tiene en cuenta si up y front quedan mirando        para el mismo lado     */    public void setUpMaintainingOrthogonality(Vector3D up)    {        up.normalize();        left = up.crossProduct(front);        left.normalize();         this.up=front.crossProduct(left);        this.up.normalize();    }    public double getFov()    {        return fov;    }    public void setFov(double fov)    {        this.fov = fov;    }    public double getNearPlaneDistance()    {        return nearPlaneDistance;    }    public void setNearPlaneDistance(double nearPlaneDistance)    {        this.nearPlaneDistance = nearPlaneDistance;    }    public double getFarPlaneDistance()    {        return farPlaneDistance;    }    public void setFarPlaneDistance(double farPlaneDistance)    {        this.farPlaneDistance = farPlaneDistance;    }    public int getProjectionMode()    {        return projectionMode;    }    public void setProjectionMode(int projectionMode)    {        this.projectionMode = projectionMode;    }    public void updateViewportResize(int dx, int dy)    {        viewportXSize = dx;        viewportYSize = dy;        updateVectors();    }    /**    PRE:      - focusedPosition y eyePosition tienen que ser diferentes!    POST:      - left queda normalizado      - up queda normalizado    @todo Document the way in which vectors are calculated, acording to    the projection transformation.    */        public void updateVectors()    {        up.normalize();        left.normalize();        front.normalize();        double fovFactor = viewportXSize / viewportYSize;        _dir = front.multiply(0.5);        upWithScale = up.multiply(Math.tan(Math.toRadians(fov/2)));        rightWithScale = left.multiply(-fovFactor*Math.tan(Math.toRadians(fov/2)));        //-----------------------------------------------------------------        /*        The normalizing transformation of current camera is such that transforms        points in space to make it lie in the canonical view volume space,        and it is calculated following the mechanism described on sections        [FOLE1992].6.5.1 and [FOLE1992].6.5.2.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品色噜噜| 99re8在线精品视频免费播放| 在线免费观看日本欧美| 亚洲免费毛片网站| 在线观看一区日韩| 亚洲第一成人在线| 91精品国产综合久久香蕉麻豆| 婷婷久久综合九色综合伊人色| 欧美一区二区三区四区视频| 理论电影国产精品| 中国av一区二区三区| 91蜜桃在线观看| 五月激情六月综合| 久久日韩精品一区二区五区| av亚洲精华国产精华精| 亚洲综合自拍偷拍| 日韩欧美专区在线| 成人黄色a**站在线观看| 亚洲一区在线观看视频| 日韩欧美在线观看一区二区三区| 国产乱国产乱300精品| 亚洲柠檬福利资源导航| 日韩欧美国产综合一区| 成人动漫视频在线| 日韩二区在线观看| 欧美国产精品专区| 欧美日韩视频专区在线播放| 国产一区二区成人久久免费影院| 亚洲图片你懂的| 日韩久久免费av| 91色乱码一区二区三区| 另类小说欧美激情| 亚洲黄一区二区三区| 精品国产乱码久久久久久1区2区 | 日本伊人色综合网| 久久综合丝袜日本网| 欧美在线色视频| 国产精品123| 午夜伦理一区二区| 国产精品久久久久久久久快鸭| 9191国产精品| 色综合久久久久综合| 美女在线观看视频一区二区| 亚洲精品成人悠悠色影视| 久久精品男人的天堂| 在线91免费看| 欧美日韩综合不卡| av不卡一区二区三区| 久久精品国产99| 亚洲高清视频在线| 亚洲欧洲av一区二区三区久久| 精品国产乱码久久久久久夜甘婷婷 | 91网站视频在线观看| 美女视频黄免费的久久| 亚洲v精品v日韩v欧美v专区| 国产精品欧美经典| 国产午夜精品一区二区| 2021中文字幕一区亚洲| 91精品欧美一区二区三区综合在 | 亚洲最色的网站| 日韩伦理av电影| 国产精品久久久久久久裸模| 久久久不卡网国产精品二区| 欧美大片顶级少妇| 日韩欧美国产精品| 日韩欧美一级二级三级| 欧美丰满高潮xxxx喷水动漫| 欧美视频中文字幕| 欧美私人免费视频| 在线观看欧美日本| 91麻豆精品一区二区三区| 波多野结衣中文字幕一区二区三区 | 国产精品影视天天线| 成人一区在线观看| 国产剧情一区二区| 捆绑紧缚一区二区三区视频| 麻豆成人综合网| 麻豆精品在线视频| 韩国一区二区视频| 国产精品羞羞答答xxdd| 高清不卡一二三区| 9人人澡人人爽人人精品| av在线不卡免费看| 色哟哟国产精品| 欧美视频日韩视频| 4438成人网| 欧美一级黄色录像| 精品国产区一区| 欧美激情中文字幕一区二区| 国产精品久久久久久亚洲毛片| 亚洲毛片av在线| 天天av天天翘天天综合网色鬼国产 | 亚洲国产成人91porn| 日韩高清中文字幕一区| 久久国产乱子精品免费女| 国内精品伊人久久久久影院对白| 国产一区二区三区在线观看精品 | 色偷偷久久一区二区三区| 91国内精品野花午夜精品| 欧美三级视频在线| 日韩美女主播在线视频一区二区三区| 精品国产伦一区二区三区观看体验| 国产欧美久久久精品影院| 中文字幕制服丝袜成人av| 亚洲自拍偷拍网站| 奇米一区二区三区| 国产成人精品一区二| 色香蕉成人二区免费| 日韩欧美资源站| 亚洲视频一区二区在线| 午夜日韩在线观看| 国产一区二区三区av电影| 91蜜桃免费观看视频| 337p亚洲精品色噜噜噜| 久久久国产精品午夜一区ai换脸| 一区二区三区日韩精品| 另类小说视频一区二区| 91免费看片在线观看| 日韩亚洲欧美在线观看| 日本一区二区成人| 日韩国产欧美一区二区三区| 成人在线综合网| 欧美一级精品大片| 亚洲老妇xxxxxx| 国产一区在线观看视频| 在线观看视频91| 中文字幕巨乱亚洲| 捆绑调教一区二区三区| 欧美亚日韩国产aⅴ精品中极品| 久久婷婷久久一区二区三区| 亚洲国产视频在线| 成人精品电影在线观看| 日韩欧美亚洲一区二区| 亚洲乱码中文字幕综合| 国产高清不卡一区二区| 777午夜精品视频在线播放| 国产精品成人免费| 国产成人精品免费| 日韩片之四级片| 亚洲成人精品一区| 色综合天天在线| 国产精品免费丝袜| 紧缚奴在线一区二区三区| 欧美日韩欧美一区二区| 亚洲色图在线视频| 国v精品久久久网| 欧美精品一区二区三区久久久| 日欧美一区二区| 在线观看日韩毛片| 伊人性伊人情综合网| eeuss鲁片一区二区三区在线看| 久久亚洲精精品中文字幕早川悠里 | 91麻豆精品秘密| 综合激情成人伊人| 成人免费福利片| 欧美激情中文不卡| 成人黄页在线观看| 国产精品精品国产色婷婷| 国产福利一区二区三区在线视频| 精品福利在线导航| 久久国产成人午夜av影院| 欧美一区中文字幕| 日本欧美韩国一区三区| 欧美电影在线免费观看| 午夜视频久久久久久| 欧美日韩高清一区二区不卡| 亚洲五月六月丁香激情| 欧美性受xxxx| 午夜伊人狠狠久久| 欧美精品乱码久久久久久 | 久久精品国产精品亚洲综合| 欧美人xxxx| 秋霞午夜鲁丝一区二区老狼| 在线成人午夜影院| 蜜桃av一区二区三区| 久久综合资源网| 黄页视频在线91| 国产日韩欧美a| 高清不卡在线观看av| 中文子幕无线码一区tr| 97久久久精品综合88久久| 亚洲免费视频中文字幕| 欧美日韩国产高清一区二区三区 | 久久久精品欧美丰满| 国产精品一级片| 中文字幕在线观看一区| 在线观看免费一区| 美女一区二区久久| 久久久精品国产99久久精品芒果| 岛国一区二区三区| 一区二区三区在线高清| 欧美精品久久天天躁| 国产美女一区二区| 国产精品不卡视频| 欧美日韩久久久一区| 极品销魂美女一区二区三区| 国产精品久久夜| 欧美三级在线看| 国产成人aaa| 亚洲成a人v欧美综合天堂下载 |