gestalt.shape
Class AbstractDrawable

java.lang.Object
  extended by gestalt.shape.AbstractDrawable
All Implemented Interfaces:
Drawable
Direct Known Subclasses:
AbstractParticleDrawer, Bin3DFinish, Camera, Disposer, FBORandomizer, Fog, FrameFinish, FrameGrabber, FrameSetup, GPGPU2DParticlesSimulation, GPGPU2DParticlesSimulation.ParticleDrawer, GPGPU3DParticlesSimulation, GPGPU3DParticlesSimulation.DataReadBack, GPGPUCAWater, JoglAccumulationBuffer, JoglColorBufferCopy, JoglCulling, JoglFBODataReader, JoglFrameBufferCopy, JoglGLSLShadowMap, JoglGLUTBitmapFont, JoglLEDDisplay, JoglOrthoFinish, JoglPersonalPointView, JoglShadowMap, JoglSoftEdger, JoglTextureReader, Light, NativeDrawable, NativeMovieTextureProducer, Origin, PDFWriter, Picker, ShaderManager, TestDepthOfField.MyDrawable, TestSoftShadows.MyDrawable, UsingMinimalRenderer, UsingPFonts.PFontRenderer, WindowManager

public abstract class AbstractDrawable
extends java.lang.Object
implements Drawable

this class represents a simple implementation of the 'drawable' interface. it is handy in those cases in which only a few of the methods required by the 'drawable' interface are needed. the 'draw' method is intentionally left unimplemented since it is the only method with a 'real' important functionality.


Constructor Summary
AbstractDrawable()
           
 
Method Summary
 void add(Drawable theDrawable)
          this method is commonly used to store children of a drawable.
 float[] getSortData()
          returns the data upon which a sort value is calculated.
 float getSortValue()
          returns the last sort value.
 boolean isActive()
          returns whether the drawable is active.
 boolean isSortable()
          returns true if the 'drawable' should be sorted before drawing.
 void setSortValue(float theSortValue)
          caches the current sort value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gestalt.render.Drawable
draw
 

Constructor Detail

AbstractDrawable

public AbstractDrawable()
Method Detail

add

public void add(Drawable theDrawable)
Description copied from interface: Drawable
this method is commonly used to store children of a drawable.

Specified by:
add in interface Drawable
Parameters:
theDrawable - Drawable

isActive

public boolean isActive()
Description copied from interface: Drawable
returns whether the drawable is active. it is commonly implemented so that the drawables 'draw' method will be ommitted if 'isActive' return false, although this behavior can vary depending on the implementation.

Specified by:
isActive in interface Drawable
Returns:
boolean

getSortValue

public float getSortValue()
Description copied from interface: Drawable
returns the last sort value.

Specified by:
getSortValue in interface Drawable
Returns:
float

setSortValue

public void setSortValue(float theSortValue)
Description copied from interface: Drawable
caches the current sort value.

Specified by:
setSortValue in interface Drawable
Parameters:
theSortValue - float

getSortData

public float[] getSortData()
Description copied from interface: Drawable
returns the data upon which a sort value is calculated.

Specified by:
getSortData in interface Drawable
Returns:
float[]

isSortable

public boolean isSortable()
Description copied from interface: Drawable
returns true if the 'drawable' should be sorted before drawing.

Specified by:
isSortable in interface Drawable
Returns:
boolean


processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009