Package camera3D.generators
Class SplitDepthGenerator
java.lang.Object
camera3D.generators.Generator
camera3D.generators.SplitDepthGenerator
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class camera3D.generators.Generator
Generator.PixelCopyTask -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup(processing.core.PApplet parent) This is called after the last call to the user's draw method and before the user's postDraw method.voidcompletedDraw(int frameNum, processing.core.PApplet parent) This is called once after each call to the user's draw method.voidgenerateCompositeFrame(int[] pixelDest, int[][] pixelStorage) Combine the component frames into one composite frame.intThe 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.voidprepareForDraw(int frameNum, processing.core.PApplet parent) This is called once before each call to the user's draw method.protected voidPerform renderer recalculations due to camera config change.setOcclusionPlaneColor(int color) setOcclusionPlaneMask(processing.core.PImage mask) setOcclusionZdistance(float occlusionZdistance) setOcclusionZfactor(float occlusionZfactor) Methods inherited from class camera3D.generators.Generator
clip, clip, copyFrameNumber, executeTask, generateCompositeFrameAndSaveComponents, initExecutor, insertFrame, notifyCameraConfigChange
-
Constructor Details
-
SplitDepthGenerator
public SplitDepthGenerator(int width, int height)
-
-
Method Details
-
setOcclusionPlaneColor
-
setOcclusionPlaneMask
-
setOcclusionZfactor
-
setOcclusionZdistance
-
recalculateCameraSettings
protected void recalculateCameraSettings()Description copied from class:GeneratorPerform renderer recalculations due to camera config change.- Specified by:
recalculateCameraSettingsin classGenerator
-
getComponentCount
public int getComponentCount()Description copied from class:GeneratorThe number of components in the composite image, ie, the number of times to call the draw method.- Specified by:
getComponentCountin classGenerator- Returns:
- int
-
getComponentFrameName
Description copied from class:GeneratorGive each component a name, such as "left" and "right" for anaglyph images.- Specified by:
getComponentFrameNamein classGenerator- Returns:
-
prepareForDraw
public void prepareForDraw(int frameNum, processing.core.PApplet parent) Description copied from class:GeneratorThis 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:
prepareForDrawin classGenerator
-
completedDraw
public void completedDraw(int frameNum, processing.core.PApplet parent) Description copied from class:GeneratorThis is called once after each call to the user's draw method. Typically this is not needed.- Specified by:
completedDrawin classGenerator
-
cleanup
public void cleanup(processing.core.PApplet parent) Description copied from class:GeneratorThis 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. -
generateCompositeFrame
public void generateCompositeFrame(int[] pixelDest, int[][] pixelStorage) Description copied from class:GeneratorCombine the component frames into one composite frame.- Specified by:
generateCompositeFramein classGenerator
-