Struct LinePrimitive¶
Defined in File schemas.hpp
Struct Documentation¶
-
struct LinePrimitive¶
A primitive representing a series of points connected by lines.
Public Types
-
enum class LineType : uint8_t¶
An enumeration indicating how input points should be interpreted to create lines.
Values:
-
enumerator LINE_STRIP¶
Connected line segments: 0-1, 1-2, …, (n-1)-n.
-
enumerator LINE_LOOP¶
Closed polygon: 0-1, 1-2, …, (n-1)-n, n-0.
-
enumerator LINE_LIST¶
Individual line segments: 0-1, 2-3, 4-5, …
-
enumerator LINE_STRIP¶
Public Functions
-
FoxgloveError encode(uint8_t *ptr, size_t len, size_t *encoded_len)¶
Encoded the LinePrimitive as protobuf to the provided buffer.
On success, writes the serialized length to *encoded_len. If the provided buffer has insufficient capacity, writes the required capacity to *encoded_len and returns FoxgloveError::BufferTooShort. If the message cannot be encoded, writes the reason to stderr and returns FoxgloveError::EncodeError.
- Parameters:
ptr – the destination buffer. must point to at least len valid bytes.
len – the length of the destination buffer.
encoded_len – where the serialized length or required capacity will be written to.
Public Members
-
double thickness = 0¶
Line thickness.
-
bool scale_invariant = false¶
Indicates whether
thicknessis a fixed size in screen pixels (true), or specified in world coordinates and scales with distance from the camera (false)
-
std::vector<uint32_t> indices¶
Indices into the
pointsandcolorsattribute arrays, which can be used to avoid duplicating attribute data.If omitted or empty, indexing will not be used. This default behavior is equivalent to specifying [0, 1, …, N-1] for the indices (where N is the number of
pointsprovided).
Public Static Functions
-
static Schema schema()¶
Get the LinePrimitive schema.
The schema data returned is statically allocated.
-
enum class LineType : uint8_t¶