Class SplitDepthGenerator

java.lang.Object
camera3D.generators.Generator
camera3D.generators.SplitDepthGenerator

public class SplitDepthGenerator extends Generator
Split depth generator, similar to split depth GIFs. Examples: https://www.reddit.com/r/SplitDepthGIFS/ The occlusion plane tricks your brain into thinking objects can be in front of or behind it.
  • Constructor Details

    • SplitDepthGenerator

      public SplitDepthGenerator(int width, int height)
  • Method Details

    • setOcclusionPlaneColor

      public SplitDepthGenerator setOcclusionPlaneColor(int color)
    • setOcclusionPlaneMask

      public SplitDepthGenerator setOcclusionPlaneMask(processing.core.PImage mask)
    • setOcclusionZfactor

      public SplitDepthGenerator setOcclusionZfactor(float occlusionZfactor)
    • setOcclusionZdistance

      public SplitDepthGenerator setOcclusionZdistance(float occlusionZdistance)
    • recalculateCameraSettings

      protected void recalculateCameraSettings()
      Description copied from class: Generator
      Perform renderer recalculations due to camera config change.
      Specified by:
      recalculateCameraSettings in class Generator
    • 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:
    • 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
    • generateCompositeFrame

      public void generateCompositeFrame(int[] pixelDest, int[][] pixelStorage)
      Description copied from class: Generator
      Combine the component frames into one composite frame.
      Specified by:
      generateCompositeFrame in class Generator