struct mrpt::viz::CVisualObject::State

Overview

#include <mrpt/viz/CVisualObject.h>

struct State
{
    // fields

    std::string name;
    bool show_name = false;
    mrpt::img::TColor color = {0xff, 0xff, 0xff, 0xff};
    float materialShininess = 0.2f;
    float materialSpecularExponent = 16.0f;
    mrpt::img::TColorf materialEmissive {0, 0, 0, 0};
    mrpt::poses::CPose3D pose;
    float scale_x = 1.0f;
    float scale_y = 1.0f;
    float scale_z = 1.0f;
    bool visible = true;
    bool castShadows = true;
    mrpt::math::TPoint3Df representativePoint {0, 0, 0};
};

Fields

mrpt::img::TColor color = {0xff, 0xff, 0xff, 0xff}

RGBA components in the range [0,255].

float materialSpecularExponent = 16.0f

Specular exponent for Blinn-Phong lighting (higher = sharper highlight).

Typical values: 8 (rough), 32 (default, plastic), 128 (metal/mirror).

mrpt::img::TColorf materialEmissive {0, 0, 0, 0}

Emissive color: light emitted by the object regardless of scene lighting.

Default is black (no emission). Useful for displays, indicator lights, laser beams, etc.

mrpt::poses::CPose3D pose

SE(3) pose wrt the parent coordinate reference.

This class automatically holds the cached 3x3 rotation matrix for quick load into opengl stack.

float scale_x = 1.0f

Scale components to apply to the object (default=1)

bool visible = true

Is the object visible? (default=true)