Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::ViewCoordinates Struct Reference

Archetype: Sets the default orientation for 3D views at or below this entity. More...

#include <rerun/archetypes/view_coordinates.hpp>

Public Member Functions

 ViewCoordinates (rerun::encodings::ViewDir axis0, rerun::encodings::ViewDir axis1, rerun::encodings::ViewDir axis2)
 Construct ViewCoordinates from x/y/z enum values.
 
 ViewCoordinates (ViewCoordinates &&other)=default
 
 ViewCoordinates (const ViewCoordinates &other)=default
 
ViewCoordinates & operator= (const ViewCoordinates &other)=default
 
ViewCoordinates & operator= (ViewCoordinates &&other)=default
 
 ViewCoordinates (rerun::components::ViewCoordinates _xyz)
 
ViewCoordinates with_xyz (const rerun::components::ViewCoordinates &_xyz) &&
 The directions of the [x, y, z] axes.
 
ViewCoordinates with_many_xyz (const Collection< rerun::components::ViewCoordinates > &_xyz) &&
 This method makes it possible to pack multiple xyz in a single component batch.
 
Collection< ComponentColumn > columns (const Collection< uint32_t > &lengths_)
 Partitions the component data into multiple sub-batches.
 
Collection< ComponentColumn > columns ()
 Partitions the component data into unit-length sub-batches.
 

Static Public Member Functions

static ViewCoordinates update_fields ()
 Update only some specific fields of a ViewCoordinates.
 
static ViewCoordinates clear_fields ()
 Clear all the fields of a ViewCoordinates.
 

Public Attributes

std::optional< ComponentBatch > xyz
 The directions of the [x, y, z] axes.
 

Static Public Attributes

static constexpr const char ArchetypeName [] = "rerun.archetypes.ViewCoordinates"
 The name of the archetype as used in ComponentDescriptors.
 
static constexpr auto Descriptor_xyz
 ComponentDescriptor for the xyz field.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates ULF
 X=Up, Y=Left, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UFL
 X=Up, Y=Forward, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LUF
 X=Left, Y=Up, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LFU
 X=Left, Y=Forward, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FUL
 X=Forward, Y=Up, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FLU
 X=Forward, Y=Left, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates ULB
 X=Up, Y=Left, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UBL
 X=Up, Y=Back, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LUB
 X=Left, Y=Up, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LBU
 X=Left, Y=Back, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BUL
 X=Back, Y=Up, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BLU
 X=Back, Y=Left, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates URF
 X=Up, Y=Right, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UFR
 X=Up, Y=Forward, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RUF
 X=Right, Y=Up, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RFU
 X=Right, Y=Forward, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FUR
 X=Forward, Y=Up, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FRU
 X=Forward, Y=Right, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates URB
 X=Up, Y=Right, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates UBR
 X=Up, Y=Back, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RUB
 X=Right, Y=Up, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RBU
 X=Right, Y=Back, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BUR
 X=Back, Y=Up, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BRU
 X=Back, Y=Right, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DLF
 X=Down, Y=Left, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DFL
 X=Down, Y=Forward, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LDF
 X=Left, Y=Down, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LFD
 X=Left, Y=Forward, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FDL
 X=Forward, Y=Down, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FLD
 X=Forward, Y=Left, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DLB
 X=Down, Y=Left, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DBL
 X=Down, Y=Back, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LDB
 X=Left, Y=Down, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LBD
 X=Left, Y=Back, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BDL
 X=Back, Y=Down, Z=Left.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BLD
 X=Back, Y=Left, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DRF
 X=Down, Y=Right, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DFR
 X=Down, Y=Forward, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RDF
 X=Right, Y=Down, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RFD
 X=Right, Y=Forward, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FDR
 X=Forward, Y=Down, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates FRD
 X=Forward, Y=Right, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DRB
 X=Down, Y=Right, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates DBR
 X=Down, Y=Back, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RDB
 X=Right, Y=Down, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RBD
 X=Right, Y=Back, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BDR
 X=Back, Y=Down, Z=Right.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates BRD
 X=Back, Y=Right, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_X_UP
 X=Up, Y=Right, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_X_DOWN
 X=Down, Y=Right, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Y_UP
 X=Right, Y=Up, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Y_DOWN
 X=Right, Y=Down, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Z_UP
 X=Right, Y=Forward, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates RIGHT_HAND_Z_DOWN
 X=Right, Y=Back, Z=Down.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_X_UP
 X=Up, Y=Right, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_X_DOWN
 X=Down, Y=Right, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_UP
 X=Right, Y=Up, Z=Forward.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_DOWN
 X=Right, Y=Down, Z=Back.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_UP
 X=Right, Y=Back, Z=Up.
 
static RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_DOWN
 X=Right, Y=Forward, Z=Down.
 

Detailed Description

Archetype: Sets the default orientation for 3D views at or below this entity.

The orientation determines the 3D view's eye orientation, navigation, and default grid plane. It does not change logged transforms.

The three directions are always ordered as [x, y, z] and specify where each positive axis points. For example, [Right, Down, Forward] means that +X points right, +Y points down, and +Z points forward.

A 3D view uses the value logged at its origin entity or the closest ancestor. SpatialInformation can override it for an individual view.

⚠ Rerun does not yet support left-handed coordinate systems.

Example

Set the default 3D view orientation

image

#include <rerun.hpp>
int main(int argc, char* argv[]) {
const auto rec = rerun::RecordingStream("rerun_example_view_coordinates");
rec.spawn().exit_on_failure();
// Set the 3D view's up direction:
rec.log_static("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP);
rec.log(
"world/xyz",
rerun::Arrows3D::from_vectors(
{{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}
)
.with_colors({{255, 0, 0}, {0, 255, 0}, {0, 0, 255}})
);
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:63

⚠ This type is unstable and may change significantly in a way that the data won't be backwards compatible.

Member Function Documentation

◆ with_many_xyz()

ViewCoordinates rerun::archetypes::ViewCoordinates::with_many_xyz ( const Collection< rerun::components::ViewCoordinates > &  _xyz) &&
inline

This method makes it possible to pack multiple xyz in a single component batch.

This only makes sense when used in conjunction with columns. with_xyz should be used when logging a single row's worth of data.

◆ columns() [1/2]

Collection< ComponentColumn > rerun::archetypes::ViewCoordinates::columns ( const Collection< uint32_t > &  lengths_)

Partitions the component data into multiple sub-batches.

Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.

This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.

The specified lengths must sum to the total length of the component batch.

◆ columns() [2/2]

Collection< ComponentColumn > rerun::archetypes::ViewCoordinates::columns ( )

Partitions the component data into unit-length sub-batches.

This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.

Member Data Documentation

◆ Descriptor_xyz

constexpr auto rerun::archetypes::ViewCoordinates::Descriptor_xyz
staticconstexpr
Initial value:
= ComponentDescriptor(
ArchetypeName, "ViewCoordinates:xyz",
Loggable<rerun::components::ViewCoordinates>::ComponentType
)
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition view_coordinates.hpp:64

ComponentDescriptor for the xyz field.

◆ ULF

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::ULF
static

X=Up, Y=Left, Z=Forward.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LFU

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LFU
static

X=Left, Y=Forward, Z=Up.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ FUL

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::FUL
static

X=Forward, Y=Up, Z=Left.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ UBL

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::UBL
static

X=Up, Y=Back, Z=Left.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LUB

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LUB
static

X=Left, Y=Up, Z=Back.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ BLU

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::BLU
static

X=Back, Y=Left, Z=Up.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ UFR

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::UFR
static

X=Up, Y=Forward, Z=Right.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ RUF

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::RUF
static

X=Right, Y=Up, Z=Forward.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ FRU

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::FRU
static

X=Forward, Y=Right, Z=Up.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ URB

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::URB
static

X=Up, Y=Right, Z=Back.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ RBU

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::RBU
static

X=Right, Y=Back, Z=Up.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ BUR

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::BUR
static

X=Back, Y=Up, Z=Right.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ DFL

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::DFL
static

X=Down, Y=Forward, Z=Left.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LDF

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LDF
static

X=Left, Y=Down, Z=Forward.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ FLD

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::FLD
static

X=Forward, Y=Left, Z=Down.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ DLB

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::DLB
static

X=Down, Y=Left, Z=Back.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LBD

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LBD
static

X=Left, Y=Back, Z=Down.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ BDL

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::BDL
static

X=Back, Y=Down, Z=Left.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ DRF

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::DRF
static

X=Down, Y=Right, Z=Forward.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ RFD

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::RFD
static

X=Right, Y=Forward, Z=Down.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ FDR

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::FDR
static

X=Forward, Y=Down, Z=Right.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ DBR

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::DBR
static

X=Down, Y=Back, Z=Right.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ RDB

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::RDB
static

X=Right, Y=Down, Z=Back.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ BRD

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::BRD
static

X=Back, Y=Right, Z=Down.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LEFT_HAND_X_UP

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LEFT_HAND_X_UP
static

X=Up, Y=Right, Z=Back.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LEFT_HAND_X_DOWN

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LEFT_HAND_X_DOWN
static

X=Down, Y=Right, Z=Forward.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LEFT_HAND_Y_UP

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LEFT_HAND_Y_UP
static

X=Right, Y=Up, Z=Forward.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LEFT_HAND_Y_DOWN

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LEFT_HAND_Y_DOWN
static

X=Right, Y=Down, Z=Back.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LEFT_HAND_Z_UP

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LEFT_HAND_Z_UP
static

X=Right, Y=Back, Z=Up.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.

◆ LEFT_HAND_Z_DOWN

RERUN_SDK_EXPORT const rerun::archetypes::ViewCoordinates rerun::archetypes::ViewCoordinates::LEFT_HAND_Z_DOWN
static

X=Right, Y=Forward, Z=Down.

⚠️ This is a left-handed coordinate system, which is not yet supported by Rerun.


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