Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## igeo.gui
Class IView

    java.lang.Object
      igeo.gui.IView

    public class IView

extends java.lang.Object

Class to define view by location, direction, axonometric/perspective mode and perspective angle. An instance of IView is associated with an instance of IPane.

Version:
  0.7.1.0;
Author:
  Satoru Sugihara

Field Summary
`boolean` | `axonometric` axonometric or perspective
`double` | `axonRatio` scale to window size
`java.awt.Color[][]` | `bgColor` background color: one color(1x1matrix), two color(1x2matrix) or four colors(2x2 matrix)
`static java.awt.Color` | `defaultBGColor1`
`static java.awt.Color` | `defaultBGColor2`
`static java.awt.Color` | `defaultBGColor3`
`static java.awt.Color` | `defaultBGColor4`
`static float[]` | `defaultGLAmbientLight`
`static float[]` | `defaultGLDiffuseLight`
`static float[]` | `defaultGLLightPosition`
`static float[]` | `defaultGLSpecularLight`
`static boolean` | `defaultGLTwoSidedLighting`
`double` | `distToTarget`
`double` | `far`
`boolean` | `hide`
`IGraphicMode` | `mode`
`double` | `near`
`IPane` | `pane`
`double` | `persRatio` perspective ratio = tan(angle of view)
`double` | `pitch` yaw-pitch-roll ZXY conversion yaw=0 pitch=0 equals x-axis yaw is rotation around z, pitch is around y, roll is around x, in right hand rule
`IVec` | `pos` eye location
`double` | `roll` yaw-pitch-roll ZXY conversion yaw=0 pitch=0 equals x-axis yaw is rotation around z, pitch is around y, roll is around x, in right hand rule
`boolean` | `rotateAroundTarget`
`int` | `screenHeight` screen width & height
`int` | `screenWidth` screen width & height
`int` | `screenX` screen location
`int` | `screenY` screen location
`IVec` | `target` view target location
`double[]` | `transformArray`
`IMatrix4` | `transformMatrix`
`boolean` | `useGL`
`double` | `yaw` yaw-pitch-roll ZXY conversion yaw=0 pitch=0 equals x-axis yaw is rotation around z, pitch is around y, roll is around x, in right hand rule

Constructor Summary
`IView(double x, double y, double z, double yaw, double pitch)`
`IView(double x, double y, double z, double yaw, double pitch, double roll)`
`IView(double x, double y, double z, double yaw, double pitch, double roll, int screenX, int screenY, int screenWidth, int screenHeight)`
`IView(double x, double y, double z, double yaw, double pitch, double roll, int screenX, int screenY, int screenWidth, int screenHeight, boolean axonometric)`

Method Summary
`void` | `axonometric()`
`java.awt.Color[][]` | `bgColor()`
`void` | `bgColor(java.awt.Color c)`
`void` | `bgColor(java.awt.Color[][] c)`
`void` | `bgColor(java.awt.Color c1, java.awt.Color c2)`
`void` | `bgColor(java.awt.Color c1, java.awt.Color c2, java.awt.Color c3, java.awt.Color c4)`
`IVec` | `convert(IVecI orig)` converts 3d coordinates to 2d.
`boolean` | `convert(IVecI orig, IVec dest)` converts 3d coordinates to 2d.
`boolean` | `convert(IVecI orig, IVec2 dest)` converts 3d coordinates to 2d coordinates of screen whose unit is pixels and whose origin is top left corner and positive Y is downward
`boolean` | `convert(IVecI orig, IVec2f dest)` converts 3d coordinates to 2d coordinates of screen whose unit is pixels and whose origin is top left corner and positive Y is downward
`void` | `disableGL()`
`void` | `disableRotationAroundTarget()`
`double` | `distanceToTarget()`
`void` | `enableGL()`
`void` | `enableRotationAroundTarget()`
`void` | `focus(IBounds bb)`
`IVec` | `frontDirection()`
`IVec` | `getAngles()`
`double` | `getAxonometricRatio()`
`static IView` | `getBackView(int screenX, int screenY, int screenWidth, int screenHeight)`
`static IView` | `getBottomView(int screenX, int screenY, int screenWidth, int screenHeight)`
`static IView` | `getDefaultAxonometricView(int screenX, int screenY, int screenWidth, int screenHeight)`
`static IView` | `getDefaultPerspectiveView(int screenX, int screenY, int screenWidth, int screenHeight)`
`static IView` | `getFrontView(int screenX, int screenY, int screenWidth, int screenHeight)`
`static IView` | `getLeftView(int screenX, int screenY, int screenWidth, int screenHeight)`
`IVec` | `getLocation()`
`double` | `getPerspectiveRatio()`
`double` | `getPitch()`
`static IView` | `getRightView(int screenX, int screenY, int screenWidth, int screenHeight)`
`double` | `getRoll()`
`static IView` | `getTopView(int screenX, int screenY, int screenWidth, int screenHeight)`
`double` | `getYaw()`
`void` | `hide()`
`boolean` | `isAxonometric()`
`boolean` | `isHidden()`
`IVec` | `location()`
`IGraphicMode` | `mode()`
`void` | `moveForward(double dist)`
`void` | `perspective()`
`IVec` | `rightDirection()`
`void` | `set(double x, double y, double z)`
`void` | `set(double x, double y, double z, double yaw, double pitch)`
`void` | `set(double x, double y, double z, double yaw, double pitch, double roll)`
`void` | `set(IVec location)`
`void` | `set(IVec location, double yaw, double pitch)`
`void` | `set(IVec location, double yaw, double pitch, double roll)`
`void` | `setAngle(double yaw, double pitch)`
`void` | `setAngle(double yaw, double pitch, boolean updateTarget)`
`void` | `setAngle(double yaw, double pitch, double roll)`
`void` | `setAngle(double yaw, double pitch, double roll, boolean updateTarget)`
`void` | `setAxonometric()`
`void` | `setAxonometric(double x, double y, double z)`
`void` | `setAxonometric(double x, double y, double z, double axonometricRatio)`
`void` | `setAxonometric(double x, double y, double z, double yaw, double pitch)`
`void` | `setAxonometric(double x, double y, double z, double yaw, double pitch, double axonometricRatio)`
`void` | `setAxonometricRatio(double r)`
`void` | `setBack()`
`void` | `setBack(double x, double z)`
`void` | `setBack(double x, double y, double z)`
`void` | `setBack(double x, double y, double z, double axonometricRatio)`
`void` | `setBottom()`
`void` | `setBottom(double x, double y)`
`void` | `setBottom(double x, double y, double z)`
`void` | `setBottom(double x, double y, double z, double axonometricRatio)`
`void` | `setFront()`
`void` | `setFront(double x, double z)`
`void` | `setFront(double x, double y, double z)`
`void` | `setFront(double x, double y, double z, double axonometricRatio)`
`void` | `setLeft()`
`void` | `setLeft(double y, double z)`
`void` | `setLeft(double x, double y, double z)`
`void` | `setLeft(double x, double y, double z, double axonometricRatio)`
`void` | `setLocation(double x, double y, double z)`
`void` | `setLocation(IVecI pt)`
`void` | `setMode(IGraphicMode m)`
`void` | `setPane(IPane p)`
`void` | `setPerspective()`
`void` | `setPerspective(double perspectiveAngle)`
`void` | `setPerspective(double x, double y, double z)`
`void` | `setPerspective(double x, double y, double z, double perspectiveAngle)`
`void` | `setPerspective(double x, double y, double z, double yaw, double pitch)`
`void` | `setPerspective(double x, double y, double z, double yaw, double pitch, double perspectiveAngle)`
`void` | `setPerspectiveAngle(double angle)`
`void` | `setPerspectiveRatio(double r)`
`void` | `setRight()`
`void` | `setRight(double y, double z)`
`void` | `setRight(double x, double y, double z)`
`void` | `setRight(double x, double y, double z, double axonometricRatio)`
`void` | `setScreen(int x, int y, int w, int h)`
`void` | `setScreenPosition(int x, int y)`
`void` | `setScreenSize(int w, int h)`
`void` | `setTarget(double x, double y, double z)`
`void` | `setTarget(IVecI t)`
`void` | `setTop()`
`void` | `setTop(double x, double y)`
`void` | `setTop(double x, double y, double z)`
`void` | `setTop(double x, double y, double z, double axonometricRatio)`
`void` | `show()`
`IVec` | `target()`
`void` | `update()`
`IVec` | `upDirection()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### defaultGLLightPosition

    public static float[] defaultGLLightPosition

### defaultGLAmbientLight

    public static float[] defaultGLAmbientLight

### defaultGLDiffuseLight

    public static float[] defaultGLDiffuseLight

### defaultGLSpecularLight

    public static float[] defaultGLSpecularLight

### defaultGLTwoSidedLighting

    public static boolean defaultGLTwoSidedLighting

### defaultBGColor1

    public static java.awt.Color defaultBGColor1

### defaultBGColor2

    public static java.awt.Color defaultBGColor2

### defaultBGColor3

    public static java.awt.Color defaultBGColor3

### defaultBGColor4

    public static java.awt.Color defaultBGColor4

### pos

    public IVec pos

  eye location

### yaw

    public double yaw

  yaw-pitch-roll ZXY conversion yaw=0 pitch=0 equals x-axis yaw is rotation around z, pitch is around y, roll is around x, in right hand rule

### pitch

    public double pitch

  yaw-pitch-roll ZXY conversion yaw=0 pitch=0 equals x-axis yaw is rotation around z, pitch is around y, roll is around x, in right hand rule

### roll

    public double roll

  yaw-pitch-roll ZXY conversion yaw=0 pitch=0 equals x-axis yaw is rotation around z, pitch is around y, roll is around x, in right hand rule

### axonometric

    public boolean axonometric

  axonometric or perspective

### screenX

    public int screenX

  screen location

### screenY

    public int screenY

  screen location

### screenWidth

    public int screenWidth

  screen width & height

### screenHeight

    public int screenHeight

  screen width & height

### persRatio

    public double persRatio

  perspective ratio = tan(angle of view)

### axonRatio

    public double axonRatio

  scale to window size

### near

    public double near

### far

    public double far

### target

    public IVec target

  view target location

### rotateAroundTarget

    public boolean rotateAroundTarget

### distToTarget

    public double distToTarget

### transformMatrix

    public IMatrix4 transformMatrix

### transformArray

    public double[] transformArray

### useGL

    public boolean useGL

### hide

    public boolean hide

### pane

    public IPane pane

### mode

    public IGraphicMode mode

### bgColor

    public java.awt.Color[][] bgColor

  background color: one color(1x1matrix), two color(1x2matrix) or four colors(2x2 matrix)

Constructor Detail

### IView

    public IView(double x,
                 double y,
                 double z,
                 double yaw,
                 double pitch,
                 double roll,
                 int screenX,
                 int screenY,
                 int screenWidth,
                 int screenHeight,
                 boolean axonometric)

### IView

    public IView(double x,
                 double y,
                 double z,
                 double yaw,
                 double pitch,
                 double roll,
                 int screenX,
                 int screenY,
                 int screenWidth,
                 int screenHeight)

### IView

    public IView(double x,
                 double y,
                 double z,
                 double yaw,
                 double pitch,
                 double roll)

### IView

    public IView(double x,
                 double y,
                 double z,
                 double yaw,
                 double pitch)

Method Detail

### enableGL

    public void enableGL()

### disableGL

    public void disableGL()

### setMode

    public void setMode(IGraphicMode m)

### mode

    public IGraphicMode mode()

### isHidden

    public boolean isHidden()

### hide

    public void hide()

### show

    public void show()

### bgColor

    public void bgColor(java.awt.Color c)

### bgColor

    public void bgColor(java.awt.Color c1,
                        java.awt.Color c2)

### bgColor

    public void bgColor(java.awt.Color c1,
                        java.awt.Color c2,
                        java.awt.Color c3,
                        java.awt.Color c4)

### bgColor

    public void bgColor(java.awt.Color[][] c)

### bgColor

    public java.awt.Color[][] bgColor()

### setPane

    public void setPane(IPane p)

### setScreen

    public void setScreen(int x,
                          int y,
                          int w,
                          int h)

### setScreenSize

    public void setScreenSize(int w,
                              int h)

### setScreenPosition

    public void setScreenPosition(int x,
                                  int y)

### getAxonometricRatio

    public double getAxonometricRatio()

### getPerspectiveRatio

    public double getPerspectiveRatio()

### setAxonometricRatio

    public void setAxonometricRatio(double r)

### setPerspectiveRatio

    public void setPerspectiveRatio(double r)

### setPerspectiveAngle

    public void setPerspectiveAngle(double angle)

### perspective

    public void perspective()

### axonometric

    public void axonometric()

### isAxonometric

    public boolean isAxonometric()

### setTarget

    public void setTarget(double x,
                          double y,
                          double z)

### setTarget

    public void setTarget(IVecI t)

### enableRotationAroundTarget

    public void enableRotationAroundTarget()

### disableRotationAroundTarget

    public void disableRotationAroundTarget()

### distanceToTarget

    public double distanceToTarget()

### set

    public void set(double x,
                    double y,
                    double z)

### set

    public void set(IVec location)

### set

    public void set(double x,
                    double y,
                    double z,
                    double yaw,
                    double pitch)

### set

    public void set(IVec location,
                    double yaw,
                    double pitch)

### set

    public void set(double x,
                    double y,
                    double z,
                    double yaw,
                    double pitch,
                    double roll)

### set

    public void set(IVec location,
                    double yaw,
                    double pitch,
                    double roll)

### getLocation

    public IVec getLocation()

### setLocation

    public void setLocation(double x,
                            double y,
                            double z)

### setLocation

    public void setLocation(IVecI pt)

### setAngle

    public void setAngle(double yaw,
                         double pitch,
                         double roll)

### setAngle

    public void setAngle(double yaw,
                         double pitch,
                         double roll,
                         boolean updateTarget)

### setAngle

    public void setAngle(double yaw,
                         double pitch)

### setAngle

    public void setAngle(double yaw,
                         double pitch,
                         boolean updateTarget)

### moveForward

    public void moveForward(double dist)

### location

    public IVec location()

### target

    public IVec target()

### getYaw

    public double getYaw()

### getPitch

    public double getPitch()

### getRoll

    public double getRoll()

### getAngles

    public IVec getAngles()

### frontDirection

    public IVec frontDirection()

### rightDirection

    public IVec rightDirection()

### upDirection

    public IVec upDirection()

### focus

    public void focus(IBounds bb)

### convert

    public boolean convert(IVecI orig,
                           IVec2 dest)

  converts 3d coordinates to 2d coordinates of screen whose unit is pixels and whose origin is top left corner and positive Y is downward

  Returns:
    returns if result is inside screen

### convert

    public boolean convert(IVecI orig,
                           IVec2f dest)

  converts 3d coordinates to 2d coordinates of screen whose unit is pixels and whose origin is top left corner and positive Y is downward

  Returns:
    returns if result is inside screen

### convert

    public boolean convert(IVecI orig,
                           IVec dest)

  converts 3d coordinates to 2d. Putting depth in z component of the second argument

  Returns:
    returns if result is inside screen

### convert

    public IVec convert(IVecI orig)

  converts 3d coordinates to 2d. Putting depth in z component of the return vector. no check if it's inside screen

  Returns:
    3d vector whose x and y are 2d coordinates in screen and z is depth

### update

    public void update()

### setTop

    public void setTop()

### setTop

    public void setTop(double x,
                       double y)

### setTop

    public void setTop(double x,
                       double y,
                       double z)

### setTop

    public void setTop(double x,
                       double y,
                       double z,
                       double axonometricRatio)

### setBottom

    public void setBottom()

### setBottom

    public void setBottom(double x,
                          double y)

### setBottom

    public void setBottom(double x,
                          double y,
                          double z)

### setBottom

    public void setBottom(double x,
                          double y,
                          double z,
                          double axonometricRatio)

### setLeft

    public void setLeft()

### setLeft

    public void setLeft(double y,
                        double z)

### setLeft

    public void setLeft(double x,
                        double y,
                        double z)

### setLeft

    public void setLeft(double x,
                        double y,
                        double z,
                        double axonometricRatio)

### setRight

    public void setRight()

### setRight

    public void setRight(double y,
                         double z)

### setRight

    public void setRight(double x,
                         double y,
                         double z)

### setRight

    public void setRight(double x,
                         double y,
                         double z,
                         double axonometricRatio)

### setFront

    public void setFront()

### setFront

    public void setFront(double x,
                         double z)

### setFront

    public void setFront(double x,
                         double y,
                         double z)

### setFront

    public void setFront(double x,
                         double y,
                         double z,
                         double axonometricRatio)

### setBack

    public void setBack()

### setBack

    public void setBack(double x,
                        double z)

### setBack

    public void setBack(double x,
                        double y,
                        double z)

### setBack

    public void setBack(double x,
                        double y,
                        double z,
                        double axonometricRatio)

### setPerspective

    public void setPerspective()

### setPerspective

    public void setPerspective(double x,
                               double y,
                               double z)

### setPerspective

    public void setPerspective(double x,
                               double y,
                               double z,
                               double yaw,
                               double pitch)

### setPerspective

    public void setPerspective(double perspectiveAngle)

### setPerspective

    public void setPerspective(double x,
                               double y,
                               double z,
                               double perspectiveAngle)

### setPerspective

    public void setPerspective(double x,
                               double y,
                               double z,
                               double yaw,
                               double pitch,
                               double perspectiveAngle)

### setAxonometric

    public void setAxonometric()

### setAxonometric

    public void setAxonometric(double x,
                               double y,
                               double z)

### setAxonometric

    public void setAxonometric(double x,
                               double y,
                               double z,
                               double axonometricRatio)

### setAxonometric

    public void setAxonometric(double x,
                               double y,
                               double z,
                               double yaw,
                               double pitch)

### setAxonometric

    public void setAxonometric(double x,
                               double y,
                               double z,
                               double yaw,
                               double pitch,
                               double axonometricRatio)

### getTopView

    public static IView getTopView(int screenX,
                                   int screenY,
                                   int screenWidth,
                                   int screenHeight)

### getBottomView

    public static IView getBottomView(int screenX,
                                      int screenY,
                                      int screenWidth,
                                      int screenHeight)

### getLeftView

    public static IView getLeftView(int screenX,
                                    int screenY,
                                    int screenWidth,
                                    int screenHeight)

### getRightView

    public static IView getRightView(int screenX,
                                     int screenY,
                                     int screenWidth,
                                     int screenHeight)

### getFrontView

    public static IView getFrontView(int screenX,
                                     int screenY,
                                     int screenWidth,
                                     int screenHeight)

### getBackView

    public static IView getBackView(int screenX,
                                    int screenY,
                                    int screenWidth,
                                    int screenHeight)

### getDefaultAxonometricView

    public static IView getDefaultAxonometricView(int screenX,
                                                  int screenY,
                                                  int screenWidth,
                                                  int screenHeight)

### getDefaultPerspectiveView

    public static IView getDefaultPerspectiveView(int screenX,
                                                  int screenY,
                                                  int screenWidth,
                                                  int screenHeight)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD