Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
|
Define a single continuous stroke by control vertices. More...
#include <Outline.hpp>
Public Types | |
typedef uint32_t | size_type |
Public Member Functions | |
constexpr | Outline () |
constexpr | Outline (size_type vertCapacity) |
void | addVertex (const Vertex &vertex) |
Appends a vertex to the outline loop/strip. | |
void | addVertex (size_type position, const Vertex &vertex) |
Insert the Vertex element at the given position to the outline loop/strip. | |
const AABBox3f & | bounds () const noexcept |
int | compareTo (const Outline &other) const noexcept |
Compare two outline's Bounding Box size. | |
constexpr bool | empty () const noexcept |
Winding | getWinding () const noexcept |
Returns the cached or computed winding of this Outline s polyline using VectorUtil#area(ArrayList) . | |
constexpr bool | isClosed () const noexcept |
bool | isComplex () const noexcept |
Returns cached or computed result if whether this Outline s polyline is a complex shape. | |
bool | isEmpty () const noexcept |
const Vertex & | lastVertex () const noexcept |
constexpr bool | operator== (const Outline &o) const noexcept |
void | removeVertex (size_type position) |
Removes the Vertex element at the given position . | |
constexpr void | reserve (size_type newVertCapacity) |
bool | setClosed (bool closeTail) |
Ensure this outline is closed. | |
void | setWinding (Winding enforce) |
Sets Winding to this outline. | |
Outline | transform (const AffineTransform &t) const |
Returns a transformed copy of this instance using the given AffineTransform. | |
constexpr const Vertex & | vertex (size_type i) const noexcept |
constexpr Vertex & | vertex (size_type i) noexcept |
constexpr size_type | vertexCount () const noexcept |
constexpr const VertexList & | vertices () const noexcept |
constexpr VertexList & | vertices () noexcept |
Static Public Attributes | |
static constexpr size_type | max_elements = std::numeric_limits<uint32_t>::max() / sizeof(uint32_t) |
byte-size int32_t limit: 536'870'911 (FIXME: Adjust to actual type, i.e. Vertex = 2x Vec3f?) | |
Define a single continuous stroke by control vertices.
The vertices define the shape of the region defined by this outline. The Outline can contain a list of off-curve and on-curve vertices which define curved regions.
Note: An outline should be closed to be rendered as a region.
Definition at line 51 of file Outline.hpp.
typedef uint32_t gamp::graph::Outline::size_type |
Definition at line 71 of file Outline.hpp.
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 77 of file Outline.hpp.
|
inlineconstexpr |
Definition at line 85 of file Outline.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Definition at line 92 of file Outline.hpp.
Definition at line 95 of file Outline.hpp.
|
inline |
Removes the Vertex
element at the given position
.
Sets the bounding box dirty, hence a next call to bounds() will validate it.
position | of the to be removed Vertex |
Definition at line 104 of file Outline.hpp.
|
inlinenoexcept |
Definition at line 111 of file Outline.hpp.
|
inlinenoexcept |
|
inlineconstexprnoexcept |
Definition at line 122 of file Outline.hpp.
|
inline |
Ensure this outline is closed.
Checks whether the last vertex equals to the first. If not equal, it either appends a copy of the first vertex or prepends a copy of the last vertex, depending on closeTail
.
closeTail | if true, a copy of the first vertex will be appended, otherwise a copy of the last vertex will be prepended. |
Definition at line 135 of file Outline.hpp.
|
inlinenoexcept |
Returns the cached or computed winding of this Outline
s polyline
using VectorUtil#area(ArrayList)
.
The result is cached.
Winding#CCW
or Winding#CW
Definition at line 159 of file Outline.hpp.
|
inline |
|
inlinenoexcept |
Returns cached or computed result if whether this Outline
s polyline
is a complex shape.
A polyline with less than 3 elements is marked a simple shape for simplicity.
The result is cached.
Definition at line 203 of file Outline.hpp.
|
inlinenoexcept |
|
inline |
Appends a vertex to the outline loop/strip.
vertex | Vertex to be added |
NullPointerException | if the Vertex element is null |
Definition at line 235 of file Outline.hpp.
Insert the Vertex
element at the given position
to the outline loop/strip.
NullPointerException | if the Vertex element is null |
IndexOutOfBoundsException | if position is out of range (position < 0 || position > getVertexNumber()) |
Definition at line 253 of file Outline.hpp.
|
inline |
Returns a transformed copy of this instance using the given AffineTransform.
Definition at line 265 of file Outline.hpp.
|
inlinenoexcept |
Compare two outline's Bounding Box size.
Definition at line 279 of file Outline.hpp.
|
inlineconstexprnoexcept |
o
equals bounds and vertices in the same order Definition at line 294 of file Outline.hpp.
|
staticconstexpr |
byte-size int32_t limit: 536'870'911 (FIXME: Adjust to actual type, i.e. Vertex = 2x Vec3f?)
Definition at line 73 of file Outline.hpp.