/// <summary> This is an implementation of the <tt>DataBlk</tt> interface for 32 bit
/// floating point data (float).
///
/// <p>The methods in this class are declared final, so that they can be
/// inlined by inlining compilers.</p>
///
/// </summary>
/// <seealso cref="DataBlk">
///
/// </seealso>
publicclassDataBlkFloat:DataBlk
{
/// <summary> Returns the identifier of this data type, <tt>TYPE_FLOAT</tt>, as
/// defined in <tt>DataBlk</tt>.
///
/// </summary>
/// <returns> The type of data stored. Always <tt>DataBlk.TYPE_FLOAT</tt>
///
/// </returns>
/// <seealso cref="DataBlk.TYPE_FLOAT">
///
/// </seealso>
overridepublicintDataType
{
get
{
returnTYPE_FLOAT;
}
}
//UPGRADE_NOTE: Respective javadoc comments were merged. It should be changed in order to comply with .NET documentation conventions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1199'"
/// <summary> Returns the array containing the data, or null if there is no data
/// array. The returned array is a float array.
///
/// </summary>
/// <returns> The array of data (a float[]) or null if there is no data.
///
/// </returns>
/// <summary> Sets the data array to the specified one. The provided array must be a
/// float array, otherwise a ClassCastException is thrown. The size of the
/// array is not checked for consistency with the block's dimensions.
///
/// </summary>
/// <param name="arr">The data array to use. Must be a float array.
///
/// </param>
overridepublicSystem.ObjectData
{
get
{
returndata;
}
set
{
data=(float[])value;
}
}
//UPGRADE_NOTE: Respective javadoc comments were merged. It should be changed in order to comply with .NET documentation conventions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1199'"
/// <summary> Returns the array containing the data, or null if there is no data
/// array.
///
/// </summary>
/// <returns> The array of data or null if there is no data.
///
/// </returns>
/// <summary> Sets the data array to the specified one. The size of the array is not
/// checked for consistency with the block's dimensions.
///
/// </summary>
/// <param name="arr">The data array to use.
///
/// </param>
virtualpublicfloat[]DataFloat
{
get
{
returndata;
}
set
{
data=value;
}
}
/// <summary>The array where the data is stored </summary>
privatefloat[]data;
/// <summary> Creates a DataBlkFloat with 0 dimensions and no data array
/// (i.e. data is null).
///
/// </summary>
publicDataBlkFloat()
{
}
/// <summary> Creates a DataBlkFloat with the specified dimensions and position. The
/// data array is initialized to an array of size w*h.
///
/// </summary>
/// <param name="ulx">The horizontal coordinate of the upper-left corner of the
/// block
///
/// </param>
/// <param name="uly">The vertical coordinate of the upper-left corner of the
/// block
///
/// </param>
/// <param name="w">The width of the block (in pixels)
///
/// </param>
/// <param name="h">The height of the block (in pixels)
///
/// </param>
publicDataBlkFloat(intulx,intuly,intw,inth)
{
this.ulx=ulx;
this.uly=uly;
this.w=w;
this.h=h;
offset=0;
scanw=w;
data=newfloat[w*h];
}
/// <summary> Copy constructor. Creates a DataBlkFloat which is the copy of the
/// DataBlkFloat given as paramter.
///
/// </summary>
/// <param name="DataBlkFloat">the object to be copied.