APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.scenario.effect

public Class FloatMap

extends Object
Class Inheritance
Imports
java.nio.FloatBuffer, java.util.HashMap, .Map, com.sun.scenario.effect.impl.Renderer

A buffer that contains floating point data, intended for use as a parameter to effects such as DisplacementMap.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final FloatBuffer
private Map<FilterContext, FloatMap.Entry>
private boolean
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
FloatMap(int
the width of the map, in pixels
width
,
int
the height of the map, in pixels
height
)

Constructs a new FloatMap of the given width and height.

Method Summary

Modifier and TypeMethod and Description
public LockableResource
public FloatBuffer
public float[]
public int

Returns:

the height of the map, in pixels
getHeight
()

Returns the height of the map, in pixels.

public float

Returns:

the sample of the specified band at the specified location
getSample
(int
the x location
x
,
int
the y location
y
,
int
the band to get (must be 1, 2, 3, or 4)
band
)

Gets the sample for a specific band from the given (x,y) location.

public int

Returns:

the width of the map, in pixels
getWidth
()

Returns the width of the map, in pixels.

public void
put(float[] floatBuf)

public void
setSample(int
the x location
x
,
int
the y location
y
,
int
the band to set (must be 1, 2, 3, or 4)
band
,
float
the sample value to set
sample
)

Sets the sample for a specific band at the given (x,y) location.

public void
setSamples(int
the x location
x
,
int
the y location
y
,
float
the sample value to set for the first band
s0
)

Sets the sample for the first band at the given (x,y) location.

public void
setSamples(int
the x location
x
,
int
the y location
y
,
float
the sample value to set for the first band
s0
,
float
the sample value to set for the second band
s1
)

Sets the sample for the first two bands at the given (x,y) location.

public void
setSamples(int
the x location
x
,
int
the y location
y
,
float
the sample value to set for the first band
s0
,
float
the sample value to set for the second band
s1
,
float
the sample value to set for the third band
s2
)

Sets the sample for the first three bands at the given (x,y) location.

public void
setSamples(int
the x location
x
,
int
the y location
y
,
float
the sample value to set for the first band
s0
,
float
the sample value to set for the second band
s1
,
float
the sample value to set for the third band
s2
,
float
the sample value to set for the fourth band
s3
)

Sets the sample for each of the four bands at the given (x,y) location.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufback to summary
private final FloatBuffer buf
cacheback to summary
private Map<FilterContext, FloatMap.Entry> cache
cacheValidback to summary
private boolean cacheValid
heightback to summary
private final int height
widthback to summary
private final int width

Constructor Detail

FloatMapback to summary
public FloatMap(int width, int height)

Constructs a new FloatMap of the given width and height.

Parameters
width:int

the width of the map, in pixels

height:int

the height of the map, in pixels

Exceptions
IllegalArgumentException:
if either width or height is outside the range [1, 4096]

Method Detail

getAccelDataback to summary
public LockableResource getAccelData(FilterContext fctx)
getBufferback to summary
public FloatBuffer getBuffer()
getDataback to summary
public float[] getData()
getHeightback to summary
public int getHeight()

Returns the height of the map, in pixels.

Returns:int

the height of the map, in pixels

getSampleback to summary
public float getSample(int x, int y, int band)

Gets the sample for a specific band from the given (x,y) location.

Parameters
x:int

the x location

y:int

the y location

band:int

the band to get (must be 1, 2, 3, or 4)

Returns:float

the sample of the specified band at the specified location

getWidthback to summary
public int getWidth()

Returns the width of the map, in pixels.

Returns:int

the width of the map, in pixels

putback to summary
public void put(float[] floatBuf)
setSampleback to summary
public void setSample(int x, int y, int band, float sample)

Sets the sample for a specific band at the given (x,y) location.

Parameters
x:int

the x location

y:int

the y location

band:int

the band to set (must be 1, 2, 3, or 4)

sample:float

the sample value to set

setSamplesback to summary
public void setSamples(int x, int y, float s0)

Sets the sample for the first band at the given (x,y) location.

Parameters
x:int

the x location

y:int

the y location

s0:float

the sample value to set for the first band

setSamplesback to summary
public void setSamples(int x, int y, float s0, float s1)

Sets the sample for the first two bands at the given (x,y) location.

Parameters
x:int

the x location

y:int

the y location

s0:float

the sample value to set for the first band

s1:float

the sample value to set for the second band

setSamplesback to summary
public void setSamples(int x, int y, float s0, float s1, float s2)

Sets the sample for the first three bands at the given (x,y) location.

Parameters
x:int

the x location

y:int

the y location

s0:float

the sample value to set for the first band

s1:float

the sample value to set for the second band

s2:float

the sample value to set for the third band

setSamplesback to summary
public void setSamples(int x, int y, float s0, float s1, float s2, float s3)

Sets the sample for each of the four bands at the given (x,y) location.

Parameters
x:int

the x location

y:int

the y location

s0:float

the sample value to set for the first band

s1:float

the sample value to set for the second band

s2:float

the sample value to set for the third band

s3:float

the sample value to set for the fourth band

com.sun.scenario.effect back to summary

private Class FloatMap.Entry

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv LockableResource
pack-priv boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

textureback to summary
pack-priv LockableResource texture
validback to summary
pack-priv boolean valid

Constructor Detail

Entryback to summary
pack-priv Entry(LockableResource texture)