Jazz3D API


com.sygem.visimagik
Class Visimagik

java.lang.Object
  |
  +--com.sygem.visimagik.Visimagik

public class Visimagik
extends java.lang.Object

A holder for filters. This is where the filters get executed from.

Version:
3.0a
Author:
SyGem Software
See Also:
Filter

Constructor Summary
Visimagik()
          Default constructor.
 
Method Summary
 int addFilter(Filter new_filter)
          Assigns a filter to be run on a source image.
 int[] getImage()
          Gets a copy of the final image.
 void removeFilter(int filter_number)
          Removes a filter.
 void runAllFilters()
          Calls the execute() method of all registered filters.
 void runFilter(int filter_to_run)
          Calls the execute() method of one registered filter.
 void setDimension(java.awt.Dimension d)
          Sets up any internal buffers in all the filters.
 void setImage(int[] new_image, int w, int h)
          Sets up the source image ready for processing.
 void setTextureDimension()
          Sets the internal buffers for use with Textures.
 void setTextureDimension(int x)
          Sets the internal buffers for use with Textures.
 void setTextureDimension(int x, int y)
          Sets the internal buffers for use with Textures.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Visimagik

public Visimagik()
Default constructor.
Method Detail

setDimension

public void setDimension(java.awt.Dimension d)
Sets up any internal buffers in all the filters. Must be called after all the filters are assigned.
Parameters:
d - The dimension of the canvas the source is coming from.

setTextureDimension

public void setTextureDimension()
Sets the internal buffers for use with Textures. Uses the default size of Textures (256x256).
See Also:
Texture

setTextureDimension

public void setTextureDimension(int x)
Sets the internal buffers for use with Textures. Only allows you to use square textures.
See Also:
Texture

setTextureDimension

public void setTextureDimension(int x,
                                int y)
Sets the internal buffers for use with Textures. Enables the use of non-square textures.
See Also:
Texture

addFilter

public int addFilter(Filter new_filter)
Assigns a filter to be run on a source image.
Parameters:
new_filter - The filter to add to this visimagik object

removeFilter

public void removeFilter(int filter_number)
Removes a filter. This operation cannot be undone.
Parameters:
filter_number - The filter to remove from this visimagik object

setImage

public void setImage(int[] new_image,
                     int w,
                     int h)
Sets up the source image ready for processing.
Parameters:
new_image - An array of integers representing the source image
w - The width of the image to process
h - The height of the image to process
See Also:
getImage()

getImage

public int[] getImage()
Gets a copy of the final image. Once processing is complete, this can return the image back to the calling application.
Returns:
An array of integers representing the processed image
See Also:
setImage(int[], int, int)

runFilter

public void runFilter(int filter_to_run)
Calls the execute() method of one registered filter.
Parameters:
filter_to_run - The filter to run, as returned by addFilter()
See Also:
addFilter(com.sygem.visimagik.Filter)

runAllFilters

public void runAllFilters()
Calls the execute() method of all registered filters. They are run in the order they are assigned.

©2001 SyGem Software