net.jbeans.j3d.data
Class AttributeArray

java.lang.Object
  extended bynet.jbeans.j3d.data.AttributeArray
Direct Known Subclasses:
LookupTable

public abstract class AttributeArray
extends java.lang.Object

AttributeArray is an abstract class that defines various methods to handle n-dimensional attribute data such as scalars, vectors, tensors, etc.

Version:
$Revision: 1.3 $
Author:
Masahiro Takatsuka (masa@jbeans.net)

Field Summary
protected  DataArray data
           
 
Constructor Summary
AttributeArray()
           
AttributeArray(AttributeArray aa)
           
AttributeArray(int dataType)
          Construct object with an initial data array of type dataType.
 
Method Summary
 boolean allocate(int numOfAtt)
          Allocates the specified number (numOfAtt) of attributes.
 void copy(AttributeArray aa)
           
 DataArray getData()
           
 int getDataType()
           
 int getDimension()
           
 void initialize()
           
abstract  AttributeArray makeObject()
          Virtual constructor creates object of same type as this object.
 void reset()
          Make object look empty but do not delete memory.
 void setData(DataArray data)
          Set the data for this object.
 void setDataType(int dataType)
          Specify the underlying data type of the object.
 void setDataTypeToBit()
           
 void setDataTypeToChar()
           
 void setDataTypeToDouble()
           
 void setDataTypeToFloat()
           
 void setDataTypeToInt()
           
 void setDataTypeToLong()
           
 void setDataTypeToShort()
           
 void setDataTypeToString()
           
 void squeeze()
          Compact the data array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected DataArray data
Constructor Detail

AttributeArray

public AttributeArray(int dataType)
Construct object with an initial data array of type dataType. The default dataType is DataType.FLOAT.


AttributeArray

public AttributeArray()

AttributeArray

public AttributeArray(AttributeArray aa)
Method Detail

copy

public void copy(AttributeArray aa)

makeObject

public abstract AttributeArray makeObject()
Virtual constructor creates object of same type as this object.


allocate

public boolean allocate(int numOfAtt)
Allocates the specified number (numOfAtt) of attributes.


initialize

public void initialize()

getDimension

public int getDimension()

getDataType

public int getDataType()

setDataType

public void setDataType(int dataType)
Specify the underlying data type of the object.


setData

public void setData(DataArray data)
Set the data for this object. The tuple dimension must be consistent with the object.


getData

public DataArray getData()

setDataTypeToBit

public void setDataTypeToBit()

setDataTypeToChar

public void setDataTypeToChar()

setDataTypeToShort

public void setDataTypeToShort()

setDataTypeToInt

public void setDataTypeToInt()

setDataTypeToLong

public void setDataTypeToLong()

setDataTypeToFloat

public void setDataTypeToFloat()

setDataTypeToDouble

public void setDataTypeToDouble()

setDataTypeToString

public void setDataTypeToString()

squeeze

public void squeeze()
Compact the data array. (Reclaim any extra memory.)


reset

public void reset()
Make object look empty but do not delete memory.



Copyright © 1995-2004 net.jbeans. All Rights Reserved.