Enum Class VertexBuffer.Type

java.lang.Object
java.lang.Enum<VertexBuffer.Type>
com.jme3.scene.VertexBuffer.Type
All Implemented Interfaces:
Serializable, Comparable<VertexBuffer.Type>, Constable
Enclosing class:
VertexBuffer

public static enum VertexBuffer.Type extends Enum<VertexBuffer.Type>
Type of buffer. Specifies the actual attribute it defines.
  • Enum Constant Details

    • Position

      public static final VertexBuffer.Type Position
      Position of the vertex (3 floats)
    • Size

      public static final VertexBuffer.Type Size
      The size of the point when using point buffers (float).
    • Normal

      public static final VertexBuffer.Type Normal
      Normal vector, normalized (3 floats).
    • TexCoord

      public static final VertexBuffer.Type TexCoord
      Texture coordinate (2 float)
    • Color

      public static final VertexBuffer.Type Color
      Color and Alpha (4 floats)
    • Tangent

      public static final VertexBuffer.Type Tangent
      Tangent vector, normalized (4 floats) (x,y,z,w). The w component is called the binormal parity, is not normalized, and is either 1f or -1f. It's used to compute the direction on the binormal vector on the GPU at render time.
    • Binormal

      public static final VertexBuffer.Type Binormal
      Binormal vector, normalized (3 floats, optional)
    • InterleavedData

      public static final VertexBuffer.Type InterleavedData
      Specifies the source data for various vertex buffers when interleaving is used. By default, the format is byte.
    • Reserved0

      @Deprecated public static final VertexBuffer.Type Reserved0
      Deprecated.
      Do not use.
    • Index

      public static final VertexBuffer.Type Index
      Specifies the index buffer, must contain integer data (ubyte, ushort, or uint).
    • BindPosePosition

      public static final VertexBuffer.Type BindPosePosition
      Initial vertex position, used with animation. Should have the same format and size as Position. If used with software skinning, the usage should be VertexBuffer.Usage.CpuOnly, and the buffer should be allocated on the heap.
    • BindPoseNormal

      public static final VertexBuffer.Type BindPoseNormal
      Initial vertex normals, used with animation. Should have the same format and size as Normal. If used with software skinning, the usage should be VertexBuffer.Usage.CpuOnly, and the buffer should be allocated on the heap.
    • BoneWeight

      public static final VertexBuffer.Type BoneWeight
      Bone weights, used with animation (4 floats). Only used for software skinning, the usage should be VertexBuffer.Usage.CpuOnly, and the buffer should be allocated on the heap.
    • BoneIndex

      public static final VertexBuffer.Type BoneIndex
      Bone indices, used with animation (4 ubytes). Only used for software skinning, the usage should be VertexBuffer.Usage.CpuOnly, and the buffer should be allocated on the heap as a ubytes buffer.
    • TexCoord2

      public static final VertexBuffer.Type TexCoord2
      Texture coordinate #2
    • TexCoord3

      public static final VertexBuffer.Type TexCoord3
      Texture coordinate #3
    • TexCoord4

      public static final VertexBuffer.Type TexCoord4
      Texture coordinate #4
    • TexCoord5

      public static final VertexBuffer.Type TexCoord5
      Texture coordinate #5
    • TexCoord6

      public static final VertexBuffer.Type TexCoord6
      Texture coordinate #6
    • TexCoord7

      public static final VertexBuffer.Type TexCoord7
      Texture coordinate #7
    • TexCoord8

      public static final VertexBuffer.Type TexCoord8
      Texture coordinate #8
    • BindPoseTangent

      public static final VertexBuffer.Type BindPoseTangent
      Initial vertex tangents, used with animation. Should have the same format and size as Tangent. If used with software skinning, the usage should be VertexBuffer.Usage.CpuOnly, and the buffer should be allocated on the heap.
    • HWBoneWeight

      public static final VertexBuffer.Type HWBoneWeight
      Bone weights, used with animation (4 floats). for Hardware Skinning only
    • HWBoneIndex

      public static final VertexBuffer.Type HWBoneIndex
      Bone indices, used with animation (4 ubytes). for Hardware Skinning only either an int or float buffer due to shader attribute types restrictions.
    • InstanceData

      public static final VertexBuffer.Type InstanceData
      Information about this instance. Format should be VertexBuffer.Format.Float and number of components should be 16.
    • MorphTarget0

      public static final VertexBuffer.Type MorphTarget0
      Morph animations targets. Supports up tp 14 morph target buffers at the same time Limited due to the limited number of attributes you can bind to a vertex shader usually 16

      MorphTarget buffers are either POSITION, NORMAL or TANGENT buffers. So we can support up to 14 simultaneous POSITION targets 7 simultaneous POSITION and NORMAL targets 4 simultaneous POSITION, NORMAL and TANGENT targets.

      Note that the MorphControl will find how many buffers can be supported for each mesh/material combination. Note that all buffers have 3 components (Vector3f) even the Tangent buffer that does not contain the w (handedness) component that will not be interpolated for morph animation.

      Note that those buffers contain the difference between the base buffer (POSITION, NORMAL or TANGENT) and the target value So that you can interpolate with a MADD operation in the vertex shader position = weight * diffPosition + basePosition;

    • MorphTarget1

      public static final VertexBuffer.Type MorphTarget1
    • MorphTarget2

      public static final VertexBuffer.Type MorphTarget2
    • MorphTarget3

      public static final VertexBuffer.Type MorphTarget3
    • MorphTarget4

      public static final VertexBuffer.Type MorphTarget4
    • MorphTarget5

      public static final VertexBuffer.Type MorphTarget5
    • MorphTarget6

      public static final VertexBuffer.Type MorphTarget6
    • MorphTarget7

      public static final VertexBuffer.Type MorphTarget7
    • MorphTarget8

      public static final VertexBuffer.Type MorphTarget8
    • MorphTarget9

      public static final VertexBuffer.Type MorphTarget9
    • MorphTarget10

      public static final VertexBuffer.Type MorphTarget10
    • MorphTarget11

      public static final VertexBuffer.Type MorphTarget11
    • MorphTarget12

      public static final VertexBuffer.Type MorphTarget12
    • MorphTarget13

      public static final VertexBuffer.Type MorphTarget13
  • Method Details

    • values

      public static VertexBuffer.Type[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VertexBuffer.Type valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null