DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | List of all members
dd4hep::VisAttr Class Reference

Handle class describing visualization attributes. More...

#include <Objects.h>

Inheritance diagram for dd4hep::VisAttr:
dd4hep::Handle< VisAttrObject >

Public Types

enum  Style { SOLID = 0x1, WIREFRAME = 0x2, DASHED = 0x2, LAST_STYLE }
 
- Public Types inherited from dd4hep::Handle< VisAttrObject >
typedef VisAttrObject Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< VisAttrObjectBase
 Self type: used by sub-classes. More...
 

Public Member Functions

 VisAttr ()=default
 Default constructor. More...
 
 VisAttr (const VisAttr &e)=default
 Copy constructor for handle. More...
 
 VisAttr (const Handle< Object > &e)
 Copy constructor for handle. More...
 
template<typename Q >
 VisAttr (const Handle< Q > &e)
 Constructor to be used for assignment from object handle. More...
 
 VisAttr (const std::string &name)
 Constructor to be used when creating a new registered visualization object. More...
 
 VisAttr (const char *name)
 Constructor to be used when creating a new registered visualization object. More...
 
VisAttroperator= (const VisAttr &attr)=default
 Assignment operator. More...
 
bool showDaughters () const
 Get Flag to show/hide daughter elements. More...
 
void setShowDaughters (bool value)
 Set Flag to show/hide daughter elements. More...
 
bool visible () const
 Get visibility flag. More...
 
void setVisible (bool value)
 Set visibility flag. More...
 
int lineStyle () const
 Get line style. More...
 
void setLineStyle (int style)
 Set line style. More...
 
int drawingStyle () const
 Get drawing style. More...
 
void setDrawingStyle (int style)
 Set drawing style. More...
 
float alpha () const
 Get alpha value. More...
 
int color () const
 Get object color. More...
 
void setColor (float alpha, float red, float green, float blue)
 Set object color. More...
 
bool rgb (float &red, float &green, float &blue) const
 Get RGB values of the color (if valid) More...
 
bool argb (float &alpha, float &red, float &green, float &blue) const
 Get alpha and RGB values of the color (if valid) More...
 
std::string toString () const
 String representation of this object. More...
 
- Public Member Functions inherited from dd4hep::Handle< VisAttrObject >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< VisAttrObject > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< VisAttrObject > &element)=default
 Copy constructor. More...
 
 Handle (VisAttrObject *element)
 Initializing constructor from pointer. More...
 
 Handle (Q *element)
 Initializing constructor from unrelated pointer with type checking. More...
 
 Handle (const Handle< Q > &element)
 Initializing constructor from unrelated handle with type checking. More...
 
Handle< VisAttrObject > & operator= (Handle< VisAttrObject > &&element)=default
 Assignment move operator. More...
 
Handle< VisAttrObject > & operator= (const Handle< VisAttrObject > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< VisAttrObject > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< VisAttrObject > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< VisAttrObject > &element) const
 Boolean operator > used for RB tree insertions. More...
 
bool isValid () const
 Check the validity of the object held by the handle. More...
 
bool operator! () const
 Check the validity of the object held by the handle. More...
 
Handle< VisAttrObject > & clear ()
 Release the object held by the handle. More...
 
VisAttrObjectoperator-> () const
 Access the held object using the -> operator. More...
 
 operator VisAttrObject & () const
 Automatic type conversion to an object references. More...
 
VisAttrObjectoperator* () const
 Access the held object using the * operator. More...
 
VisAttrObjectptr () const
 Access to the held object. More...
 
Q * _ptr () const
 Access to an unrelated object type. More...
 
Q * data () const
 Access to an unrelated object type. More...
 
Q & object () const
 Access to an unrelated object type. More...
 
VisAttrObjectaccess () const
 Checked object access. Throws invalid handle runtime exception if invalid handle. More...
 
const char * name () const
 Access the object name (or "" if not supported by the object) More...
 
const char * name () const
 
const char * name () const
 
void assign (Object *n, const std::string &nam, const std::string &title)
 Assign a new named object. Note: object references must be managed by the user. More...
 
void assign (_Segmentation *s, const std::string &n, const std::string &)
 
void assign (NamedObject *p, const std::string &n, const std::string &t)
 
void destroy ()
 Destroy the underlying object (be careful here: things are not reference counted)! More...
 

Additional Inherited Members

- Static Public Member Functions inherited from dd4hep::Handle< VisAttrObject >
static void bad_assignment (const std::type_info &from, const std::type_info &to)
 Helper routine called when unrelated types are assigned. More...
 
- Public Attributes inherited from dd4hep::Handle< VisAttrObject >
VisAttrObjectm_element
 Single and only data member: Reference to the actual element. More...
 

Detailed Description

Handle class describing visualization attributes.

Author
M.Frank
Version
1.0

Definition at line 324 of file Objects.h.

Member Enumeration Documentation

◆ Style

Enumerator
SOLID 
WIREFRAME 
DASHED 
LAST_STYLE 

Definition at line 326 of file Objects.h.

Constructor & Destructor Documentation

◆ VisAttr() [1/6]

dd4hep::VisAttr::VisAttr ( )
default

Default constructor.

◆ VisAttr() [2/6]

dd4hep::VisAttr::VisAttr ( const VisAttr e)
default

Copy constructor for handle.

◆ VisAttr() [3/6]

dd4hep::VisAttr::VisAttr ( const Handle< Object > &  e)
inline

Copy constructor for handle.

Definition at line 335 of file Objects.h.

◆ VisAttr() [4/6]

template<typename Q >
dd4hep::VisAttr::VisAttr ( const Handle< Q > &  e)
inline

Constructor to be used for assignment from object handle.

Definition at line 338 of file Objects.h.

◆ VisAttr() [5/6]

VisAttr::VisAttr ( const std::string &  name)

Constructor to be used when creating a new registered visualization object.

Constructor to be used when creating a new entity.

Definition at line 307 of file Objects.cpp.

◆ VisAttr() [6/6]

VisAttr::VisAttr ( const char *  name)

Constructor to be used when creating a new registered visualization object.

Constructor to be used when creating a new entity.

Definition at line 319 of file Objects.cpp.

Member Function Documentation

◆ alpha()

float VisAttr::alpha ( ) const

Get alpha value.

Definition at line 371 of file Objects.cpp.

◆ argb()

bool VisAttr::argb ( float &  alpha,
float &  red,
float &  green,
float &  blue 
) const

Get alpha and RGB values of the color (if valid)

Definition at line 406 of file Objects.cpp.

◆ color()

int VisAttr::color ( ) const

Get object color.

Definition at line 376 of file Objects.cpp.

◆ drawingStyle()

int VisAttr::drawingStyle ( ) const

Get drawing style.

Definition at line 361 of file Objects.cpp.

◆ lineStyle()

int VisAttr::lineStyle ( ) const

Get line style.

Definition at line 351 of file Objects.cpp.

◆ operator=()

VisAttr& dd4hep::VisAttr::operator= ( const VisAttr attr)
default

Assignment operator.

◆ rgb()

bool VisAttr::rgb ( float &  red,
float &  green,
float &  blue 
) const

Get RGB values of the color (if valid)

Definition at line 396 of file Objects.cpp.

◆ setColor()

void VisAttr::setColor ( float  alpha,
float  red,
float  green,
float  blue 
)

Set object color.

Definition at line 381 of file Objects.cpp.

◆ setDrawingStyle()

void VisAttr::setDrawingStyle ( int  style)

Set drawing style.

Definition at line 366 of file Objects.cpp.

◆ setLineStyle()

void VisAttr::setLineStyle ( int  style)

Set line style.

Definition at line 356 of file Objects.cpp.

◆ setShowDaughters()

void VisAttr::setShowDaughters ( bool  value)

Set Flag to show/hide daughter elements.

Definition at line 336 of file Objects.cpp.

◆ setVisible()

void VisAttr::setVisible ( bool  value)

Set visibility flag.

Definition at line 346 of file Objects.cpp.

◆ showDaughters()

bool VisAttr::showDaughters ( ) const

Get Flag to show/hide daughter elements.

Definition at line 331 of file Objects.cpp.

◆ toString()

std::string VisAttr::toString ( ) const

String representation of this object.

Definition at line 417 of file Objects.cpp.

◆ visible()

bool VisAttr::visible ( ) const

Get visibility flag.

Definition at line 341 of file Objects.cpp.


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