#include <VertexContainer.h>
|
| VertexContainer (const IndexFunction &addCallback, const IndexFunction &removeCallback, const IndexFunction &updateCallback, const VoidFunction &setCallback, const VoidFunction &clearCallback) |
|
void | AddVertex (const Vertex &vertex) |
|
bool | UpdateVertex (size_t index, const Vertex &vertex) |
|
bool | InsertVertex (size_t index, const Vertex &vertex) |
|
bool | RemoveVertex (size_t index) |
|
template<typename Vertices > |
void | SetVertices (Vertices &&vertices) |
|
void | Clear () |
| Remove all vertices.
|
|
bool | GetVertex (size_t index, Vertex &vertex) const |
|
bool | GetLastVertex (Vertex &vertex) const |
|
size_t | Size () const |
| Number of vertices in the container.
|
|
bool | Empty () const |
| Is the container empty or not.
|
|
const AZStd::vector< Vertex > & | GetVertices () const |
| Immutable reference to container of vertices.
|
|
const Vertex & | operator[] (size_t index) const |
| Unsafe access to vertices (index must be checked to be in range before use).
|
|
void | SetCallbacks (const IndexFunction &addCallback, const IndexFunction &removeCallback, const IndexFunction &updateCallback, const VoidFunction &setCallback, const VoidFunction &clearCallback) |
|
template<typename Vertex>
class AZ::VertexContainer< Vertex >
A wrapper around a AZStd::vector of either Vector2 or Vector3s. Provides an interface to access and modify the container.
◆ AddVertex()
template<typename Vertex >
Add vertex at end of container.
- Parameters
-
vertex | new vertex position (local space). |
◆ GetLastVertex()
template<typename Vertex >
Get last vertex.
- Returns
- if vector is empty return false.
◆ GetVertex()
template<typename Vertex >
Get vertex at index.
- Returns
- was the index in range.
◆ InsertVertex()
template<typename Vertex >
Insert vertex before index in container.
- Parameters
-
index | index of vertex to insert before. |
vertex | new vertex position (local space). |
- Returns
- was the index in range.
◆ RemoveVertex()
template<typename Vertex >
Remove vertex at index in container.
- Parameters
-
index | index of vertex to remove. |
- Returns
- was the index in range.
◆ SetCallbacks()
template<typename Vertex >
Provide callbacks for this container Useful if you could not provide callbacks at construction or you need to re-supply callbacks after deserialization
◆ SetVertices()
template<typename Vertex >
template<typename Vertices >
Set all vertices.
- Parameters
-
vertices | new vertices to set. |
◆ UpdateVertex()
template<typename Vertex >
Update position of vertex in container.
- Parameters
-
index | index of current vertex to update. |
vertex | new vertex position (local space). |
- Returns
- was the index in range.
The documentation for this class was generated from the following files:
- Code/Framework/AzCore/AzCore/Math/VertexContainer.h
- Code/Framework/AzCore/AzCore/Math/Internal/VertexContainer.inl