Class StereoscopicGenerator

java.lang.Object
camera3D.generators.Generator
camera3D.generators.StereoscopicGenerator
All Implemented Interfaces:
processing.core.PConstants
Direct Known Subclasses:
AnaglyphGenerator, BarrelDistortionGenerator, SplitFrameGenerator, StereoscopicFrameSaver

public abstract class StereoscopicGenerator extends Generator implements processing.core.PConstants
  • Nested Class Summary

    Nested classes/interfaces inherited from class camera3D.generators.Generator

    Generator.PixelCopyTask
  • Field Summary

    Fields inherited from class camera3D.generators.Generator

    config

    Fields inherited from interface processing.core.PConstants

    ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOS, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleanup(processing.core.PApplet parent)
    This is called after the last call to the user's draw method and before the user's postDraw method.
    void
    completedDraw(int frameNum, processing.core.PApplet parent)
    This is called once after each call to the user's draw method.
    int
    The number of components in the composite image, ie, the number of times to call the draw method.
    getComponentFrameName(int frameNum)
    Give each component a name, such as "left" and "right" for anaglyph images.
    void
    prepareForDraw(int frameNum, processing.core.PApplet parent)
    This is called once before each call to the user's draw method.
    protected void
    Perform renderer recalculations due to camera config change.
    setAdjustTargetFactor(float adjustTargetFactor)
     
    setDivergence(float divergence)
     
    swapLeftRight(boolean swap)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StereoscopicGenerator

      public StereoscopicGenerator()
  • Method Details

    • getComponentCount

      public int getComponentCount()
      Description copied from class: Generator
      The number of components in the composite image, ie, the number of times to call the draw method.
      Specified by:
      getComponentCount in class Generator
      Returns:
      int
    • getComponentFrameName

      public String getComponentFrameName(int frameNum)
      Description copied from class: Generator
      Give each component a name, such as "left" and "right" for anaglyph images.
      Specified by:
      getComponentFrameName in class Generator
      Returns:
    • setDivergence

      public StereoscopicGenerator setDivergence(float divergence)
    • swapLeftRight

      public StereoscopicGenerator swapLeftRight(boolean swap)
    • useSymmetricFrustum

      public StereoscopicGenerator useSymmetricFrustum()
    • setAdjustTargetFactor

      public StereoscopicGenerator setAdjustTargetFactor(float adjustTargetFactor)
    • recalculateCameraSettings

      protected void recalculateCameraSettings()
      Description copied from class: Generator
      Perform renderer recalculations due to camera config change.
      Specified by:
      recalculateCameraSettings in class Generator
    • prepareForDraw

      public void prepareForDraw(int frameNum, processing.core.PApplet parent)
      Description copied from class: Generator
      This is called once before each call to the user's draw method. Typically the generators need to move the camera around or change some settings.
      Specified by:
      prepareForDraw in class Generator
    • completedDraw

      public void completedDraw(int frameNum, processing.core.PApplet parent)
      Description copied from class: Generator
      This is called once after each call to the user's draw method. Typically this is not needed.
      Specified by:
      completedDraw in class Generator
    • cleanup

      public void cleanup(processing.core.PApplet parent)
      Description copied from class: Generator
      This is called after the last call to the user's draw method and before the user's postDraw method. This should put the camera back so other libraries like ControlP5 can function correctly.
      Specified by:
      cleanup in class Generator