Interface ILspVertexAttribute
public interface ILspVertexAttribute
Interface describing a vertex attribute as stored in a vertex array.
- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Describes the semantics of a vertex attribute.static enum
Describes the primitive type used to store vertex attribute values. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of components used by this vertex attribute.getName()
Returns the name of this vertex attribute.int
Returns the offset (in bytes) from the start of the vertex array data buffer to the first occurrence of this vertex attribute.Returns the semantics of this vertex attribute.int
Returns the distance (in bytes) between two consecutive elements of this vertex attribute in memory.getType()
Returns the primitive type of this vertex attribute.boolean
Returns true if the data of this attribute is interleaved with that of other attributes.boolean
For non-floating point attributes, indicates whether the attribute's values should be normalized or not.
-
Method Details
-
getName
String getName()Returns the name of this vertex attribute.- Returns:
- the name of this vertex attribute
-
getSemantics
ILspVertexAttribute.AttributeSemantics getSemantics()Returns the semantics of this vertex attribute.- Returns:
- the semantics of this vertex attribute
-
getType
ILspVertexAttribute.AttributeType getType()Returns the primitive type of this vertex attribute.- Returns:
- the primitive type of this vertex attribute
-
getComponentCount
int getComponentCount()Returns the number of components used by this vertex attribute. For instance, normal vectors typically have 3 components (X, Y and Z).- Returns:
- the number of components used by this vertex attribute
-
getStride
int getStride()Returns the distance (in bytes) between two consecutive elements of this vertex attribute in memory.- Returns:
- the distance (in bytes) between two consecutive elements of this vertex attribute in memory
-
getOffset
int getOffset()Returns the offset (in bytes) from the start of the vertex array data buffer to the first occurrence of this vertex attribute.- Returns:
- the offset (in bytes) from the start of the vertex array data buffer to the first occurrence of this vertex attribute
-
isInterleaved
boolean isInterleaved()Returns true if the data of this attribute is interleaved with that of other attributes. Otherwise, the data for each vertex attribute is stored as a continuous block.- Returns:
- true if the data for this vertex attribute is stored in an interleaved fashion
-
isNormalized
boolean isNormalized()For non-floating point attributes, indicates whether the attribute's values should be normalized or not. For a byte attribute, for example, setting this property to true would result in values in [0, 1] going to the vertex shader, whereas setting the property to false would pass on the unmodified values in the [0, 255] range.- Returns:
- whether this attribute should be normalized
-