public class AccessorModels
extends java.lang.Object
AccessorModel instances.accessor data that
simply represents the data that was given at construction time.
The instances do not have an associated BufferViewModel
instance.| Modifier and Type | Method and Description |
|---|---|
static DefaultAccessorModel |
create(int componentType,
java.lang.String type,
boolean normalized,
java.nio.ByteBuffer byteBuffer)
Create an
AccessorModel from the given data. |
static DefaultAccessorModel |
createByteScalar(java.nio.ByteBuffer data)
|
static DefaultAccessorModel |
createByteScalar(java.nio.IntBuffer data)
|
static DefaultAccessorModel |
createFloat2D(java.nio.FloatBuffer data)
|
static DefaultAccessorModel |
createFloat3D(java.nio.FloatBuffer data)
|
static DefaultAccessorModel |
createFloat4D(java.nio.FloatBuffer data)
|
static DefaultAccessorModel |
createIntScalar(java.nio.IntBuffer data)
|
static DefaultAccessorModel |
createShortScalar(java.nio.IntBuffer data)
|
static DefaultAccessorModel |
createShortScalar(java.nio.ShortBuffer data)
|
static DefaultAccessorModel |
createUnsignedByteScalar(java.nio.ByteBuffer data)
|
static DefaultAccessorModel |
createUnsignedByteScalar(java.nio.IntBuffer data)
|
static DefaultAccessorModel |
createUnsignedIntScalar(java.nio.IntBuffer data)
|
static DefaultAccessorModel |
createUnsignedShortScalar(java.nio.IntBuffer data)
|
static DefaultAccessorModel |
createUnsignedShortScalar(java.nio.ShortBuffer data)
|
public static DefaultAccessorModel createUnsignedIntScalar(java.nio.IntBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createIntScalar(java.nio.IntBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createUnsignedByteScalar(java.nio.IntBuffer data)
AccessorModel with the component type
GL_UNSIGNED_BYTE and the type "SCALAR".byte.data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createUnsignedByteScalar(java.nio.ByteBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createByteScalar(java.nio.IntBuffer data)
AccessorModel with the component type
GL_BYTE and the type "SCALAR".byte.data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createByteScalar(java.nio.ByteBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createUnsignedShortScalar(java.nio.IntBuffer data)
AccessorModel with the component type
GL_UNSIGNED_SHORT and the type "SCALAR".short.data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createUnsignedShortScalar(java.nio.ShortBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createShortScalar(java.nio.IntBuffer data)
AccessorModel with the component type
GL_SHORT and the type "SCALAR".short.data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createShortScalar(java.nio.ShortBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createFloat2D(java.nio.FloatBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createFloat3D(java.nio.FloatBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel createFloat4D(java.nio.FloatBuffer data)
data - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
(in bytes!) is not divisible by the element size that is implied by
the type and component typepublic static DefaultAccessorModel create(int componentType, java.lang.String type, boolean normalized, java.nio.ByteBuffer byteBuffer)
AccessorModel from the given data.
The byte buffer containing the data can be created from buffers
with the respective component type by using the utility methods
in the Buffers class. For example, when the input data
is a FloatBuffer, then the byte buffer can be
created with Buffers.createByteBufferFrom(floatBuffer).componentType - The component type, as a GL constanttype - The type of the data, as a string corresponding to
the ElementType of the accessornormalized - Whether the data is normalizedbyteBuffer - The actual dataAccessorModeljava.lang.IllegalArgumentException - If the capacity of the given buffer
is not divisible by the element size that is implied by the given
type and component typeCopyright © 2022. All Rights Reserved.