vrml.field
Class SFImage

java.lang.Object
  extended by vrml.Field
      extended by vrml.field.SFImage
All Implemented Interfaces:
java.lang.Cloneable

public class SFImage
extends Field

Represents a VRML SFImage field in Java.


Constructor Summary
SFImage()
          Construct a default SFImage field.
SFImage(int width, int height, int components, byte[] pixels)
          Construct a new SFImage field using the given values.
 
Method Summary
 int getComponents()
          Get the number of components in an SFImage.
 int getHeight()
          Get the height of the SFImage.
 void getPixels(byte[] pixels)
          Get a 2-dimensional array of pixels representing the SFImage.
 int getWidth()
          Get the width of the SFImage.
 void setValue(ConstSFImage image)
          Set the value of an SFImage field.
 void setValue(int width, int height, int components, byte[] pixels)
          Set the value of an SFImage field.
 void setValue(SFImage image)
          Set the value of an SFImage field.
 
Methods inherited from class vrml.Field
clone, dispose, finalize, getPeer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SFImage

public SFImage()
Construct a default SFImage field.


SFImage

public SFImage(int width,
               int height,
               int components,
               byte[] pixels)
Construct a new SFImage field using the given values.

Parameters:
width - Initial width of SFImage.
height - Initial height of SFImage.
components - Number of components in SFImage.
pixels - 2-dimensional pixel image.
Method Detail

getWidth

public int getWidth()
Get the width of the SFImage.

Returns:
Width of SFImage.

getHeight

public int getHeight()
Get the height of the SFImage.

Returns:
Height of SFImage.

getComponents

public int getComponents()
Get the number of components in an SFImage.

Returns:
Number of components in SFImage.

getPixels

public void getPixels(byte[] pixels)
Get a 2-dimensional array of pixels representing the SFImage.

Parameters:
pixels - 2-dimensional pixel array.

setValue

public void setValue(int width,
                     int height,
                     int components,
                     byte[] pixels)
Set the value of an SFImage field.

Parameters:
width - New width of SFImage.
height - New height of SFImage.
components - Number of components in SFImage.
pixels - 2-dimensional pixel image.

setValue

public void setValue(ConstSFImage image)
Set the value of an SFImage field.

Parameters:
image - Desired value for SFImage.

setValue

public void setValue(SFImage image)
Set the value of an SFImage field.

Parameters:
image - Desired value for SFImage.