Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::components::AnnotationContext Struct Reference

Component: The AnnotationContext provides additional information on how to display entities. More...

#include <rerun/components/annotation_context.hpp>

Public Member Functions

template<typename TElement , typename = std::enable_if_t< std::is_constructible_v<datatypes::ClassDescriptionMapElem, TElement>>>
 AnnotationContext (std::initializer_list< TElement > class_descriptions)
 Construct from an initializer list of elements from which rerun::datatypes::ClassDescriptionMapElems can be constructed.
 
 AnnotationContext (rerun::Collection< rerun::datatypes::ClassDescriptionMapElem > class_map_)
 
AnnotationContextoperator= (rerun::Collection< rerun::datatypes::ClassDescriptionMapElem > class_map_)
 

Public Attributes

rerun::Collection< rerun::datatypes::ClassDescriptionMapElemclass_map
 List of class descriptions, mapping class indices to class names, colors etc.
 

Detailed Description

Component: The AnnotationContext provides additional information on how to display entities.

Entities can use ClassIds and KeypointIds to provide annotations, and the labels and colors will be looked up in the appropriate AnnotationContext. We use the first annotation context we find in the path-hierarchy when searching up through the ancestors of a given entity path.

Constructor & Destructor Documentation

◆ AnnotationContext()

template<typename TElement , typename = std::enable_if_t< std::is_constructible_v<datatypes::ClassDescriptionMapElem, TElement>>>
rerun::components::AnnotationContext::AnnotationContext ( std::initializer_list< TElement >  class_descriptions)
inline

Construct from an initializer list of elements from which rerun::datatypes::ClassDescriptionMapElems can be constructed.

This will then create a new collection of rerun::datatypes::ClassDescriptionMapElem.

Implementation note: We handle this type of conversion in a generic rerun::ContainerAdapter. However, it is still necessary since initializer list overload resolution is handled in a special way by the compiler, making this case not being covered by the general container case.


The documentation for this struct was generated from the following file: