scenic
Class ScenePrimitives.Attribute

java.lang.Object
  extended by scenic.ScenePrimitives.Attribute
Enclosing class:
ScenePrimitives

public static class ScenePrimitives.Attribute
extends java.lang.Object

This class contains attribute information. The size of the attribute is not the size of the array, but the number of elements that are used for one vertex. So a RGBA color attribute would have size 4 and texture coordinate or vertex position size 2. The array data must be either a byte array or a float array. Currently color attribute accepts only byte arrays and position and texture coordinate attributes accept only float arrays. This will propably change in the future to allow a more flexible scheme.


Constructor Summary
ScenePrimitives.Attribute(int size, java.lang.Object data)
          Creates an attribute with the given size and array data.
 
Method Summary
 java.lang.Object getData()
          Gets the data of the attribute.
 int getSize()
          Gets the size of the attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScenePrimitives.Attribute

public ScenePrimitives.Attribute(int size,
                                 java.lang.Object data)
Creates an attribute with the given size and array data.

Parameters:
size - the size of the attribute.
data - the array data.
Method Detail

getSize

public int getSize()
Gets the size of the attribute.


getData

public java.lang.Object getData()
Gets the data of the attribute.