public final class DefaultAccessorModel extends AbstractNamedModelElement implements AccessorModel
AccessorModel| Constructor and Description |
|---|
DefaultAccessorModel(int componentType,
int count,
ElementType elementType)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
AccessorData |
getAccessorData()
Returns the
AccessorData for this accessor. |
BufferViewModel |
getBufferViewModel()
Returns the
BufferViewModel for the data that this accessor
provides access to. |
int |
getByteOffset()
Returns the byte offset of this accessor referring to its
BufferViewModel |
int |
getByteStride()
Returns the byte stride between the starts of two consecutive elements
of this accessor.
|
java.lang.Class<?> |
getComponentDataType()
Returns the data type of the components of this accessor.
|
int |
getComponentSizeInBytes()
Returns the size of one component, in bytes
|
int |
getComponentType()
Returns the component type of this accessor, as a GL constant.
|
int |
getCount()
Returns the number of elements that this accessor provides access to
|
int |
getElementSizeInBytes()
Returns the size of one element, in bytes
|
ElementType |
getElementType()
Returns the
ElementType that this accessor provides access to |
java.lang.Number[] |
getMax()
Returns the maximum components of the
AccessorData. |
java.lang.Number[] |
getMin()
Returns the minimum components of the
AccessorData. |
void |
setBufferViewModel(BufferViewModel bufferViewModel)
Set the
BufferViewModel for this model |
void |
setByteOffset(int byteOffset)
Set the byte offset, referring to the
BufferViewModel |
void |
setByteStride(int byteStride)
Set the byte stride, indicating the number of bytes between the start
of one element and the start of the next element
|
getName, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamepublic DefaultAccessorModel(int componentType,
int count,
ElementType elementType)
componentType - The component type GL constantcount - The number of elementselementType - The element typepublic void setBufferViewModel(BufferViewModel bufferViewModel)
BufferViewModel for this modelbufferViewModel - The BufferViewModelpublic void setByteOffset(int byteOffset)
BufferViewModelbyteOffset - The byte offsetpublic void setByteStride(int byteStride)
byteStride - The byte stridepublic BufferViewModel getBufferViewModel()
AccessorModelBufferViewModel for the data that this accessor
provides access to. Typed access to the data is possible by obtaining
the AccessorData using AccessorModel.getAccessorData().getBufferViewModel in interface AccessorModelBufferViewModelpublic int getComponentType()
AccessorModelGL_FLOAT or GL_UNSIGNED_SHORTgetComponentType in interface AccessorModelpublic java.lang.Class<?> getComponentDataType()
AccessorModelfloat.class or short.class.getComponentDataType in interface AccessorModelpublic int getComponentSizeInBytes()
AccessorModelgetComponentSizeInBytes in interface AccessorModelpublic int getElementSizeInBytes()
AccessorModelgetElementSizeInBytes in interface AccessorModelpublic int getByteOffset()
AccessorModelBufferViewModelgetByteOffset in interface AccessorModelpublic int getCount()
AccessorModelgetCount in interface AccessorModelpublic ElementType getElementType()
AccessorModelElementType that this accessor provides access togetElementType in interface AccessorModelElementTypepublic int getByteStride()
AccessorModelgetByteStride in interface AccessorModelpublic AccessorData getAccessorData()
AccessorModelAccessorData for this accessor. The exact type
of the returned AccessorData object will depend on the
component data type. It will be
AccessorByteData, AccessorShortData,
AccessorIntData or AccessorFloatData for a component
data type of byte.class, short.class,
int.class or float.class, respectively,
and can be safely cast to the respective type.getAccessorData in interface AccessorModelAccessorDatapublic java.lang.Number[] getMin()
AccessorModelAccessorData. The
returned array will be a clone of the array that is stored internally,
and have a length that matches the number of components per element.getMin in interface AccessorModelpublic java.lang.Number[] getMax()
AccessorModelAccessorData. The
returned array will be a clone of the array that is stored internally,
and have a length that matches the number of components per element.getMax in interface AccessorModelCopyright © 2022. All Rights Reserved.