Package codechicken.lib.render.pipeline
Interface IVertexSource
- All Known Implementing Classes:
BakedVertexSource,BlockRenderer.BlockFace,BlockRenderer.FullBlock,CCModel
public interface IVertexSource
Created by covers1624 on 10/10/2016.
-
Method Summary
Modifier and TypeMethodDescription<T> TgetAttribute(AttributeKey<T> attr) Gets an attribute from thisIVertexSource.default intThe number of vertices available in the model.Vertex5[]The vertices for this model.booleanhasAttribute(AttributeKey<?> attr) Returnstrueif the specified attribute is provided by thisIVertexSource.voidprepareVertex(CCRenderState ccrs) Called before the pipeline processes a vertex.
-
Method Details
-
getVertices
Vertex5[] getVertices()The vertices for this model.- Returns:
- The Vertices.
-
getVertexCount
default int getVertexCount()The number of vertices available in the model. By default, this method just returns the length of the @link #getVertices()} array.- Returns:
- The number of vertices available.
-
getAttribute
Gets an attribute from thisIVertexSource.- Parameters:
attr- The vertex attribute to get- Returns:
- The
Tfor the givenAttributeKeyornullof the Attribute does not exist.
-
hasAttribute
Returnstrueif the specified attribute is provided by thisIVertexSource.The
IVertexSourcewill either return data fromgetAttribute(AttributeKey)or set the state inprepareVertex(CCRenderState).- Returns:
trueif the attribute exists.
-
prepareVertex
Called before the pipeline processes a vertex.- Parameters:
ccrs- The instance.
-