Package snap.gfx3d

Class CameraView

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable

public class CameraView extends ParentView
A View subclass to render.
  • Field Details

  • Constructor Details

    • CameraView

      public CameraView()
      Constructor.
  • Method Details

    • getCamera

      public Camera getCamera()
      Returns the camera as a vector.
    • getScene

      public Scene3D getScene()
      Returns the Scene3D.
    • getYaw

      public double getYaw()
      Returns the rotation about the Y axis in degrees.
    • setYaw

      public void setYaw(double aValue)
      Sets the rotation about the Y axis in degrees.
    • getPitch

      public double getPitch()
      Returns the rotation about the X axis in degrees.
    • setPitch

      public void setPitch(double aValue)
      Sets the rotation about the X axis in degrees.
    • getRoll

      public double getRoll()
      Returns the rotation about the Z axis in degrees.
    • setRoll

      public void setRoll(double aValue)
      Sets the rotation about the Z axis in degrees.
    • isShowCubeView

      public boolean isShowCubeView()
      Returns whether to show CubeView.
    • setShowCubeView

      public void setShowCubeView(boolean aValue)
      Sets whether to show CubeView.
    • getCubeView

      public CubeView getCubeView()
      Returns the control cube.
    • paintFront

      protected void paintFront(Painter aPntr)
      Paints Camera.
      Overrides:
      paintFront in class View
    • processEvent

      public void processEvent(ViewEvent anEvent)
      Viewer method.
      Overrides:
      processEvent in class View
    • setWidth

      public void setWidth(double aValue)
      Override to forward to camera.
      Overrides:
      setWidth in class View
    • setHeight

      public void setHeight(double aValue)
      Override to forward to camera.
      Overrides:
      setHeight in class View
    • repaint

      public void repaint()
      Override to account for Scene3D bounds.
      Overrides:
      repaint in class View
    • getBoundsMarked

      public Rect getBoundsMarked()
      Override to account for Scene3D bounds.
    • cameraDidPropChange

      protected void cameraDidPropChange(PropChange aPC)
      Called when camera does prop change.
    • sceneDidPropChange

      protected void sceneDidPropChange(PropChange aPC)
      Called when Scene does prop change.
    • getPropValue

      public Object getPropValue(String aPropName)
      Returns the value for given key.
      Overrides:
      getPropValue in class ParentView
    • setPropValue

      public void setPropValue(String aPropName, Object aValue)
      Sets the value for given key.
      Overrides:
      setPropValue in class ParentView