Class Cuboid

Inheritance Relationships

Base Type

Class Documentation

class Cuboid : public ouster::sdk::viz::Selectable

Manages the state of a single cuboid.

Public Functions

Cuboid(const mat4d &transform, const vec4f &rgba)

Constructor to initialize a cuboid.

Parameters:
  • transform[in] 4x4 matrix representing a transform defining the cuboid

  • rgba[in] 4x1 float matrix representing cuboid color in RGBA format

void update_from(const Cuboid &other)

Updates this cuboid’s state with the state of other, accounting for prior changes to this objects’s state.

Parameters:

other[in] the object to update the state from.

void clear()

Clear dirty flags.

Resets any changes since the last call to PointViz::update()

void dirty()

Set all dirty flags.

Re-sets everything so the object is always redrawn.

void set_transform(const mat4d &pose)

Set the transform defining the cuboid.

Applied to a unit cube centered at the origin.

Parameters:

pose[in]

inline const mat4d &get_transform() const

Get the transform defining the cuboid.

Returns:

4x4 matrix representing the cuboid transform

void set_rgba(const vec4f &rgba)

Set the color of the cuboid.

Parameters:

rgba[in]

inline const vec4f &get_rgba() const

Get the color of the cuboid.

Returns:

rgba color of the cuboid

Public Static Functions

static Cuboid from_object(const ouster::sdk::core::Object &object, const vec4f &rgba)

Construct a Cuboid from an ouster::sdk::core::Object.

The cuboid is placed in world frame using body_to_world * object_to_body.

Parameters:
Returns:

a new Cuboid representing the object

Friends

friend class impl::GLCuboid