Skip to main content

TriangleListPrimitive

Represents a primitive that consists of a set of triangles or a surface tiled with triangles.

Parent Data Structure

TriangleListPrimitive appears in the SceneEntity message data structure.

Data Structure

FieldTypeDescription
poseposeOrigin of the triangles relative to the reference coordinate frame
pointsPoint3[]Vertices for the triangles, interpreted as a list of triplets (0-1-2, 3-4-5, ...)
colorcolorSolid color for the entire shape. Either color or colors must be provided.
colorsColor[]Color for each vertex (if specified, must be the same length as points). Either color or colors must be provided.
indicesuint32[]Indices into the points and colors attribute arrays, which can be used to avoid duplicating attribute data.

indices

If omitted or empty, no indices are used. This default behavior is equivalent to specifying [0, 1, ..., N-1] for the indices (where N is the number of points provided).

Reference Implementation

The visualization data structure is framework-independent and can be implemented using any supported message encoding:

EncodingData Structure
ROS 1foxglove_msgs/TriangleListPrimitive
ROS 2foxglove_msgs/msg/TriangleListPrimitive
JSONfoxglove.TriangleListPrimitive
Protobuffoxglove.TriangleListPrimitive
FlatBuffersfoxglove.TriangleListPrimitive
OMG IDLfoxglove::TriangleListPrimitive

You must use the data structure names specified above for the visualization to recognize the data structure.