Struct CylinderPrimitive¶
Defined in File schemas.hpp
Struct Documentation¶
-
struct CylinderPrimitive¶
A primitive representing a cylinder, elliptic cylinder, or truncated cone.
Public Functions
-
FoxgloveError encode(uint8_t *ptr, size_t len, size_t *encoded_len)¶
Encoded the CylinderPrimitive 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
-
std::optional<Pose> pose¶
Position of the center of the cylinder and orientation of the cylinder. The flat face(s) are perpendicular to the z-axis.
-
double bottom_scale = 0¶
0-1, ratio of the diameter of the cylinder’s bottom face (min z) to the bottom of the bounding box
-
double top_scale = 0¶
0-1, ratio of the diameter of the cylinder’s top face (max z) to the top of the bounding box
Public Static Functions
-
static Schema schema()¶
Get the CylinderPrimitive schema.
The schema data returned is statically allocated.
-
FoxgloveError encode(uint8_t *ptr, size_t len, size_t *encoded_len)¶