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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? camera.java

?? 基于java的3d開發(fā)庫。對坐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.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区在线| 国产日本一区二区| 色偷偷88欧美精品久久久| 国产精品自拍三区| 国产成人在线色| 成人黄动漫网站免费app| 国产91高潮流白浆在线麻豆| 国产jizzjizz一区二区| 国产成人综合精品三级| 粉嫩欧美一区二区三区高清影视| 高清beeg欧美| 一本色道久久综合精品竹菊| 91国产精品成人| 日韩一卡二卡三卡国产欧美| 欧美精品一区二区三区蜜桃视频| 久久久精品综合| 自拍av一区二区三区| 亚洲在线中文字幕| 九九视频精品免费| 国产91精品精华液一区二区三区 | 经典三级视频一区| 国产成人精品影视| 欧美中文字幕不卡| 精品国产91乱码一区二区三区| 国产精品麻豆视频| 亚洲成人动漫一区| 国产成人综合网| 欧美情侣在线播放| 久久久综合九色合综国产精品| 亚洲欧美一区二区三区孕妇| 蜜臀av性久久久久蜜臀aⅴ流畅 | 一区二区三区在线免费播放| 日本一不卡视频| 不卡的av电影| 91精品国产欧美一区二区18| 国产精品免费观看视频| 日本不卡免费在线视频| 成人午夜在线免费| 日韩视频免费观看高清完整版 | 777精品伊人久久久久大香线蕉| 精品动漫一区二区三区在线观看| 中文字幕一区二区三区在线不卡| 日韩一区精品字幕| 97se亚洲国产综合在线| 欧美白人最猛性xxxxx69交| 亚洲毛片av在线| 激情偷乱视频一区二区三区| 欧美婷婷六月丁香综合色| 国产午夜久久久久| 青青草原综合久久大伊人精品优势| 成人教育av在线| 欧美mv日韩mv国产网站| 亚洲国产成人tv| 色综合久久久久综合体桃花网| 亚洲精品一区二区三区精华液| 亚洲丰满少妇videoshd| 99久久婷婷国产综合精品电影 | 国产精品萝li| 国产精品香蕉一区二区三区| 777奇米成人网| 性欧美疯狂xxxxbbbb| 在线精品视频一区二区| 亚洲免费观看在线观看| 99国内精品久久| 亚洲午夜免费福利视频| 懂色av中文一区二区三区 | 国产精品欧美一级免费| 国产成人自拍高清视频在线免费播放| 日韩视频免费观看高清完整版在线观看 | 欧美日韩成人综合在线一区二区 | 日韩免费一区二区| 午夜视频久久久久久| 在线观看中文字幕不卡| 亚洲一区在线免费观看| 欧美专区日韩专区| 亚洲mv在线观看| 欧美军同video69gay| 日韩av中文在线观看| 91麻豆精品国产91久久久使用方法| 一区二区三区丝袜| 欧美精品在线一区二区三区| 天天操天天干天天综合网| 69成人精品免费视频| 老司机精品视频导航| 精品va天堂亚洲国产| av一区二区三区| 亚洲国产日日夜夜| 制服.丝袜.亚洲.另类.中文| 久久99久久99精品免视看婷婷| 精品日韩在线一区| 福利一区在线观看| 亚洲精品日日夜夜| 欧美日韩视频在线第一区 | 亚洲国产一区二区视频| 欧美日韩国产高清一区二区三区| 日韩精品亚洲专区| 日韩精品一区二区三区老鸭窝| 国内精品嫩模私拍在线| 国产精品女人毛片| 欧美日韩三级视频| 理论电影国产精品| 国产精品久久夜| 欧美日韩国产综合视频在线观看| 九一九一国产精品| 亚洲女同一区二区| 精品久久久久久亚洲综合网| 9i看片成人免费高清| 日韩avvvv在线播放| 国产精品欧美一区喷水| 91.com视频| 91美女片黄在线| 九九热在线视频观看这里只有精品| 国产精品久久久久久久蜜臀| 欧美日产国产精品| 成人教育av在线| 麻豆中文一区二区| 悠悠色在线精品| 日本一区二区三区国色天香 | 国产真实乱子伦精品视频| 中文字幕在线不卡一区二区三区| 欧美精品高清视频| 成人动漫视频在线| 精品一区二区三区免费观看 | 国产午夜亚洲精品不卡| 欧美日韩精品一区二区| 成人99免费视频| 国内外成人在线| 日韩在线卡一卡二| 亚洲午夜久久久久| 亚洲同性同志一二三专区| 久久久影视传媒| 欧美哺乳videos| 7777精品伊人久久久大香线蕉经典版下载| 国产盗摄女厕一区二区三区| 久久精品二区亚洲w码| 午夜激情久久久| 亚洲一区二区在线免费观看视频| 日本一区二区三区国色天香 | 欧美电影一区二区三区| 欧美午夜精品一区二区蜜桃| 成a人片亚洲日本久久| 国产成人免费高清| 国产精品456露脸| 国产美女娇喘av呻吟久久| 伦理电影国产精品| 麻豆视频一区二区| 日本人妖一区二区| 美女免费视频一区| 麻豆中文一区二区| 精品无码三级在线观看视频| 激情小说亚洲一区| 国产伦精品一区二区三区在线观看| 免费日韩伦理电影| 久久er99热精品一区二区| 免费人成在线不卡| 国产在线精品一区二区三区不卡| 黄页网站大全一区二区| 国产综合色在线| 国产精品91xxx| 99视频有精品| 在线免费视频一区二区| 欧美精品18+| 日韩欧美久久久| 欧美激情一区二区三区四区| 亚洲欧美中日韩| 亚洲大片免费看| 麻豆精品视频在线观看视频| 韩国在线一区二区| 欧美精品1区2区| 精品福利视频一区二区三区| 国产精品久久久久久久久图文区 | 亚洲成av人综合在线观看| 日本在线不卡一区| 狠狠v欧美v日韩v亚洲ⅴ| 粉嫩一区二区三区在线看| 91亚洲永久精品| 欧美美女一区二区在线观看| 久久午夜国产精品| 中文字幕日韩一区| 日本不卡在线视频| 国产91精品一区二区麻豆亚洲| 在线一区二区三区| 久久婷婷国产综合精品青草| 中文字幕在线播放不卡一区| 日本亚洲免费观看| www.亚洲色图.com| 欧美一区二区免费| 中文字幕在线免费不卡| 日韩中文字幕亚洲一区二区va在线| 国产麻豆精品视频| 欧美日韩高清一区二区不卡| 久久精品男人天堂av| 亚洲午夜视频在线| 成人免费黄色在线| 日韩视频在线永久播放| 亚洲六月丁香色婷婷综合久久| 国产在线精品免费av| 欧美老肥妇做.爰bbww视频| 中文乱码免费一区二区| 九九**精品视频免费播放|