org.stellarium.projector
Class CustomProjector

java.lang.Object
  extended by org.stellarium.projector.DefaultProjector
      extended by org.stellarium.projector.CustomProjector
All Implemented Interfaces:
Projector
Direct Known Subclasses:
CylinderProjector, FisheyeProjector, SphericMirrorProjector, StereographicProjector

public class CustomProjector
extends DefaultProjector

Class which handle projection modes and projection matrix Overide some function usually handled by glu

See C++ version of this file.

Version:
0.8.2
Author:
Fred Simon

Nested Class Summary
 
Nested classes/interfaces inherited from class org.stellarium.projector.DefaultProjector
DefaultProjector.AutoZoom, DefaultProjector.ProjectEarthEqu, DefaultProjector.ProjectJ2000, DefaultProjector.ProjectLocal, DefaultProjector.PROJECTOR_MASK_TYPE
 
Nested classes/interfaces inherited from interface org.stellarium.projector.Projector
Projector.ProjFunc, Projector.TYPE
 
Field Summary
 
Fields inherited from class org.stellarium.projector.DefaultProjector
center, flagAutoZoom, flip_horz, flip_vert, fov, gravityLabels, invMatEarthEquToEye, invMatHelioToEye, invMatJ2000ToEye, invMatLocalToEye, maskType, matEarthEquToEye, matHelioToEye, matJ2000ToEye, matLocalToEye, matProjection, maxFov, minFov, projectEarthEquFunc, projectJ2000Func, projectLocalFunc, vecViewport, view_scaling_factor, zFar, zNear, zoomMove
 
Constructor Summary
protected CustomProjector(Rectangle4i viewport)
           
protected CustomProjector(Rectangle4i viewport, double fov)
           
 
Method Summary
protected  void initProjectMatrix()
          Init the viewing matrix, setting the field of view, the clipping planes, and screen ratio The function is a reimplementation of glOrtho
 void sCylinder(double radius, double height, int slices, int stacks, javax.vecmath.Matrix4d mat, boolean orientInside)
          Reimplementation of gluCylinder : glu is overrided for non standard projection
 void sSphere(double radius, double one_minus_oblateness, int slices, int stacks, javax.vecmath.Matrix4d mat, boolean orient_inside)
          Reimplementation of gluSphere : glu is overrided for non standard projection
 void sVertex3(double x, double y, double z, javax.vecmath.Matrix4d mat)
          Override glVertex3f Here is the Main trick for texturing in fisheye mode : The trick is to compute the new coordinate in orthographic projection which will simulate the fisheye projection.
 
Methods inherited from class org.stellarium.projector.DefaultProjector
applyViewport, changeFov, checkInViewport, create, drawViewportShape, getAimFov, getClippingPlanes, getFlagGravityLabels, getFlipHorz, getFlipVert, getFov, getMaskType, getMaxFov, getProjectEarthEquFunc, getProjectJ2000Func, getProjectLocalFunc, getRadPerPixel, getType, getViewport, getViewportHeight, getViewportPosX, getViewportPosY, getViewportWidth, maskTypeToString, needGlFrontFaceCW, printGravity180, printGravity180, projectCustom, projectCustomCheck, projectCustomLineCheck, projectEarthEqu, projectEarthEquCheck, projectEarthEquLineCheck, projectHelio, projectHelioCheck, projectHelioLineCheck, projectJ2000, projectJ2000Check, projectJ2000LineCheck, projectLocal, projectLocalCheck, resetPerspectiveProjection, sDisk, setClippingPlanes, setFlagGravityLabels, setFlipHorz, setFlipVert, setFov, setMaskType, setMaxFov, setModelviewMatrices, setOrthographicProjection, setViewport, setViewport, setViewportHeight, setViewportPosX, setViewportPosY, setViewportWidth, sHalfSphere, sRing, sSphere, sSphereMap, sSphereMapTexCoordFast, stringToMaskType, stringToType, typeToString, unproject, unprojectEarthEqu, unprojectHelio, unprojectJ2000, unprojectLocal, updateAutoZoom, zoomTo, zoomTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomProjector

protected CustomProjector(Rectangle4i viewport)

CustomProjector

protected CustomProjector(Rectangle4i viewport,
                          double fov)
Method Detail

initProjectMatrix

protected void initProjectMatrix()
Init the viewing matrix, setting the field of view, the clipping planes, and screen ratio The function is a reimplementation of glOrtho

Overrides:
initProjectMatrix in class DefaultProjector

sVertex3

public void sVertex3(double x,
                     double y,
                     double z,
                     javax.vecmath.Matrix4d mat)
Override glVertex3f Here is the Main trick for texturing in fisheye mode : The trick is to compute the new coordinate in orthographic projection which will simulate the fisheye projection.

Specified by:
sVertex3 in interface Projector
Overrides:
sVertex3 in class DefaultProjector

sSphere

public void sSphere(double radius,
                    double one_minus_oblateness,
                    int slices,
                    int stacks,
                    javax.vecmath.Matrix4d mat,
                    boolean orient_inside)
Description copied from class: DefaultProjector
Reimplementation of gluSphere : glu is overrided for non standard projection

Specified by:
sSphere in interface Projector
Overrides:
sSphere in class DefaultProjector

sCylinder

public void sCylinder(double radius,
                      double height,
                      int slices,
                      int stacks,
                      javax.vecmath.Matrix4d mat,
                      boolean orientInside)
Description copied from class: DefaultProjector
Reimplementation of gluCylinder : glu is overrided for non standard projection

Overrides:
sCylinder in class DefaultProjector