IN THIS ARTICLE
Vertex Container Type
VertexContainer is a concrete type and an interface that is used by several Open 3D Engine (O3DE) component buses. It is implemented directly by the
Polygon Prism Shape
component and the
component, and used indirectly by the
A vertex container provides the ability to access, modify, add, and remove vertices. A vertex container has several interfaces that build upon one another, including the following:
UpdateVertex functions for vertices in a container and a
Size function that returns the number of vertices in the container.
Because the number of vertices is fixed, vertices cannot be added or removed. You can implement this interface with an array or
VariableVertices interface supports all the functionality of
FixedVertices, but also provides
VariableVertices also provides a utility function called
Empty that checks whether a container has any elements or is empty.
To implement the
VariableVertices interface, you can use either an
AZStd::vector or a
VertexContainerInterface provides an interface to all functionality provided by the previous two interfaces and the
VertexContainer type. For convenience, the
VertexContainerInterface also provides
ClearVertices functions that can update all vertices or remove all vertices in one operation. The
SetVertices function takes a
vertices parameter that contains a list of all vertices to be stored.
VertexContainerowns the vertices to which it has access; they are not stored elsewhere (a
VertexContaineris not a view).
For more information about the interfaces in the
VertexContainerInterface, see the code and code comments in the
For more information about the
VertexContainer type, see the code and code comments in the
Vector3types. The vector type is determined at compile time when the type is created. This is useful for certain components that do not allow points to be modified on the Z (vertical) axis and treat points just in two dimensions. The Polygon Prism Shape component requires the