Class AttributeKey<T>
java.lang.Object
codechicken.lib.render.pipeline.attribute.AttributeKey<T>
Represents a Key for abstract data storage on an
IVertexSource-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TCopy and resize the attribute.abstract TCopies the range of the source attribute into the destination attribute.static <T> AttributeKey<T>create(String name, IntFunction<T> factory) abstract TcreateDefault(int length) Construct a new default instance of the storage.
-
Field Details
-
attributeKeyIndex
public final int attributeKeyIndex -
operationIndex
public final int operationIndex
-
-
Constructor Details
-
AttributeKey
-
-
Method Details
-
create
-
createDefault
Construct a new default instance of the storage.- Parameters:
length- The vertex length.- Returns:
- The new storage.
-
copy
Copy and resize the attribute.The attribute will either be
Copyableor an array, which may also hold objects which areCopyable.- Parameters:
src- The object to copy.length- The new length of vertices.- Returns:
- The copied attribute.
-
copyRange
Copies the range of the source attribute into the destination attribute.- Parameters:
src- The attribute instance to copy from.srcpos- The starting vertex position to copy from.dest- The attribute instance to copy into.destpos- The starting vertex position to copy into.length- The number of vertex elements to copy.- Returns:
- The object to set in the destination's attribute slot. Usually just
dest.`
-