com.jme3.scene
Enum VertexBuffer.Format

java.lang.Object
  extended by java.lang.Enum<VertexBuffer.Format>
      extended by com.jme3.scene.VertexBuffer.Format
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<VertexBuffer.Format>
Enclosing class:
VertexBuffer

public static enum VertexBuffer.Format
extends java.lang.Enum<VertexBuffer.Format>

Specifies format of the data stored in the buffer. This should directly correspond to the buffer's class, for example, an UnsignedShort formatted buffer should use the class ShortBuffer (e.g. the closest resembling type). For the Half type, ByteBuffers should be used.


Enum Constant Summary
Byte
          1 byte integer, signed.
Double
          Double precision floating point.
Float
          Single precision floating point.
Half
          Half precision floating point.
Int
          4 byte integer, signed.
Short
          2 byte integer, signed.
UnsignedByte
          1 byte integer, unsigned.
UnsignedInt
          4 byte integer, unsigned.
UnsignedShort
          2 byte integer, unsigned.
 
Method Summary
 int getComponentSize()
          Returns the size in bytes of this data type.
static VertexBuffer.Format valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static VertexBuffer.Format[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Half

public static final VertexBuffer.Format Half
Half precision floating point. 2 bytes, signed.


Float

public static final VertexBuffer.Format Float
Single precision floating point. 4 bytes, signed


Double

public static final VertexBuffer.Format Double
Double precision floating point. 8 bytes, signed. May not be supported by all GPUs.


Byte

public static final VertexBuffer.Format Byte
1 byte integer, signed.


UnsignedByte

public static final VertexBuffer.Format UnsignedByte
1 byte integer, unsigned.


Short

public static final VertexBuffer.Format Short
2 byte integer, signed.


UnsignedShort

public static final VertexBuffer.Format UnsignedShort
2 byte integer, unsigned.


Int

public static final VertexBuffer.Format Int
4 byte integer, signed.


UnsignedInt

public static final VertexBuffer.Format UnsignedInt
4 byte integer, unsigned.

Method Detail

values

public static VertexBuffer.Format[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (VertexBuffer.Format c : VertexBuffer.Format.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static VertexBuffer.Format valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getComponentSize

public int getComponentSize()
Returns the size in bytes of this data type.

Returns:
Size in bytes of this data type.