scenepic 1.1.0
3D Visualization Made Easy
Public Member Functions | Friends | List of all members
scenepic::Label Class Reference

A ScenePic label type. More...

#include <label.h>

Public Member Functions

const std::string & label_id () const
 A unique identifier for the Label. More...
 
const std::string & mesh_id () const
 The mesh associated with this label. More...
 
const std::string & text () const
 The text to use in the label. More...
 
Labeltext (const std::string &value)
 The text to use in the label. More...
 
const Colorfill_color () const
 The color to use. More...
 
Labelfill_color (const Color &value)
 The color to use. More...
 
double size_in_pixels () const
 The size in pixels to display the label at. More...
 
Labelsize_in_pixels (double value)
 The size in pixels to display the label at. More...
 
const std::string & font_family () const
 HTML font family name. More...
 
Labelfont_family (const std::string &value)
 HTML font family name. More...
 
const std::string & horizontal_align () const
 How to align the label horizontally (one of 'left', 'center', 'right') More...
 
Labelhorizontal_align (const std::string &value)
 How to align the label horizontally (one of 'left', 'center', 'right') More...
 
const std::string & vertical_align () const
 How to align the label vertically (one of 'top', 'middle', 'bottom') More...
 
Labelvertical_align (const std::string &value)
 How to align the label vertically (one of 'top', 'middle', 'bottom') More...
 
double offset_distance () const
 Distance in world space to offset the label by when using left/right/top/bottom alignment. More...
 
Labeloffset_distance (double value)
 Distance in world space to offset the label by when using left/right/top/bottom alignment. More...
 
bool camera_space () const
 Whether this Mesh is defined in camera space (cannot be moved in the ScenePic user interface) or world space (standard). More...
 
Labelcamera_space (bool camera_space)
 Whether this Mesh is defined in camera space (cannot be moved in the ScenePic user interface) or world space (standard). More...
 
const std::string & layer_id () const
 An identifier to allow several Meshes to be grouped together into a "layer". More...
 
Labellayer_id (const std::string &layer_id)
 An identifier to allow several Meshes to be grouped together into a "layer". More...
 
std::string to_string () const
 Return a JSON string representing the object. More...
 
JsonValue to_json () const
 Convert this object into ScenePic json. More...
 

Friends

class Scene
 

Detailed Description

A ScenePic label type.

Member Function Documentation

◆ camera_space() [1/2]

bool scenepic::Label::camera_space ( ) const

Whether this Mesh is defined in camera space (cannot be moved in the ScenePic user interface) or world space (standard).

◆ camera_space() [2/2]

Label & scenepic::Label::camera_space ( bool  camera_space)

Whether this Mesh is defined in camera space (cannot be moved in the ScenePic user interface) or world space (standard).

◆ fill_color() [1/2]

const Color & scenepic::Label::fill_color ( ) const

The color to use.

◆ fill_color() [2/2]

Label & scenepic::Label::fill_color ( const Color value)

The color to use.

◆ font_family() [1/2]

const std::string & scenepic::Label::font_family ( ) const

HTML font family name.

◆ font_family() [2/2]

Label & scenepic::Label::font_family ( const std::string &  value)

HTML font family name.

◆ horizontal_align() [1/2]

const std::string & scenepic::Label::horizontal_align ( ) const

How to align the label horizontally (one of 'left', 'center', 'right')

◆ horizontal_align() [2/2]

Label & scenepic::Label::horizontal_align ( const std::string &  value)

How to align the label horizontally (one of 'left', 'center', 'right')

◆ label_id()

const std::string & scenepic::Label::label_id ( ) const

A unique identifier for the Label.

◆ layer_id() [1/2]

const std::string & scenepic::Label::layer_id ( ) const

An identifier to allow several Meshes to be grouped together into a "layer".

Layers should be used in conjunction with Canvas3D.set_layer_settings().

See also
Canvas3D::set_layer_settings.

◆ layer_id() [2/2]

Label & scenepic::Label::layer_id ( const std::string &  layer_id)

An identifier to allow several Meshes to be grouped together into a "layer".

Layers should be used in conjunction with Canvas3D.set_layer_settings().

See also
Canvas3D::set_layer_settings.

◆ mesh_id()

const std::string & scenepic::Label::mesh_id ( ) const

The mesh associated with this label.

◆ offset_distance() [1/2]

double scenepic::Label::offset_distance ( ) const

Distance in world space to offset the label by when using left/right/top/bottom alignment.

◆ offset_distance() [2/2]

Label & scenepic::Label::offset_distance ( double  value)

Distance in world space to offset the label by when using left/right/top/bottom alignment.

◆ size_in_pixels() [1/2]

double scenepic::Label::size_in_pixels ( ) const

The size in pixels to display the label at.

◆ size_in_pixels() [2/2]

Label & scenepic::Label::size_in_pixels ( double  value)

The size in pixels to display the label at.

◆ text() [1/2]

const std::string & scenepic::Label::text ( ) const

The text to use in the label.

◆ text() [2/2]

Label & scenepic::Label::text ( const std::string &  value)

The text to use in the label.

◆ to_json()

JsonValue scenepic::Label::to_json ( ) const

Convert this object into ScenePic json.

Returns
a json value

◆ to_string()

std::string scenepic::Label::to_string ( ) const

Return a JSON string representing the object.

◆ vertical_align() [1/2]

const std::string & scenepic::Label::vertical_align ( ) const

How to align the label vertically (one of 'top', 'middle', 'bottom')

◆ vertical_align() [2/2]

Label & scenepic::Label::vertical_align ( const std::string &  value)

How to align the label vertically (one of 'top', 'middle', 'bottom')

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

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