A class that manages the structural component properties. More...
#include <StructuralComponentProperties.h>
Public Types | |
enum | Color { DEFAULT , RED , GREEN , BLUE , GRAY , OTHER } |
Default color settings. More... | |
Public Member Functions | |
double | getAlpha () const |
double | getBlue () const |
Color | getColor () const |
double | getGreen () const |
RenderingMode::Mode | getMode () const |
std::string | getModeString () const |
get the string equivalent to the enum rendering mode More... | |
double | getRed () const |
double * | getRGB () const |
double * | getRGBA () const |
bool | isVisible (const RenderingMode::Mode mode) const |
void | setAlpha (const double a) |
void | setBlue (const double b) |
void | setColor (Color c) |
void | setGreen (const double g) |
void | setMode (const RenderingMode::Mode) |
void | setRed (const double r) |
void | setRGB (const double *rgb) |
void | setRGB (const double r, const double g, const double b) |
void | setRGBA (const double *rgba) |
void | setRGBA (const double r, const double g, const double b, const double a) |
void | setVisible (const RenderingMode::Mode, const bool) |
StructuralComponentProperties (PhysicalModel *p) | |
defaultcolor is gray More... | |
StructuralComponentProperties (PhysicalModel *p, const Color c) | |
use a Color constant to set the color More... | |
StructuralComponentProperties (PhysicalModel *p, const Color c, const std::string n) | |
StructuralComponentProperties (PhysicalModel *p, const double *rgb) | |
use a double[3] array to set the color More... | |
StructuralComponentProperties (PhysicalModel *p, const double *rgb, const std::string n) | |
StructuralComponentProperties (PhysicalModel *p, const double r, const double g, const double b) | |
use 3 floats to set the color More... | |
StructuralComponentProperties (PhysicalModel *p, const double r, const double g, const double b, const std::string n) | |
StructuralComponentProperties (PhysicalModel *p, const std::string n) | |
StructuralComponentProperties (PhysicalModel *p, physicalModel::StructuralComponent xmlSC) | |
virtual void | xmlPrint (std::ostream &) |
print to an output stream in "pseaudo" XML format. More... | |
~StructuralComponentProperties () | |
![]() | |
std::string | getName () const |
get the name (be careful, this method DOES NOT return a copy, so you got the direct ptr to the name!!!) More... | |
PhysicalModel * | getPhysicalModel () const |
get the physical model More... | |
Properties (const std::string n="") | |
A nice simple constructor, with a given name. More... | |
Properties (PhysicalModel *, const std::string n="") | |
Another nice constructor, with the PM and a name. More... | |
void | setName (std::string) |
set the name (use the string = operator) More... | |
void | setPhysicalModel (PhysicalModel *) |
set the physical model More... | |
virtual | ~Properties ()=default |
The default destructor. More... | |
void | xmlToFields (xsd::cxx::tree::attribute_set< char > attrs) |
convert the xml node parameters to data fields More... | |
unsigned int | numberOfFields () const |
get the number of extra fields found in the PML More... | |
bool | isAField (std::string attName) const |
check if the field exist in the XML document, return false if it does not More... | |
std::string | getField (unsigned int) const |
get the name of field of given index More... | |
double | getDouble (std::string attName) |
field accessor: get the field attName as a double value, if field does not exist, 0.0 is return More... | |
int | getInt (std::string attName) const |
field accessor: get the field attName as an int value, if field does not exist, 0 is return More... | |
bool | getBool (std::string attName) const |
field accessor: get the field attName as a bool value, if field does not exist, false is return More... | |
std::string | getString (std::string attName) const |
field accessor: get the field attName as a string value, if field does not exist, empty string is return More... | |
void | get (std::string attName, std::string &attVal) const |
field accessor: get the field attName as a string value in attVal, if field does not exist, empty string is return More... | |
void | set (std::string attName, double val) |
field modificator: set field attName using a double value More... | |
void | set (std::string attName, int val) |
field modificator: set field attName using an int value More... | |
void | set (std::string attName, bool val) |
field modificator: set field attName using a bool value More... | |
void | set (std::string attName, std::string val) |
field modificator: set field attName using a string value More... | |
Private Member Functions | |
void | alloc () |
Private Attributes | |
Color | color |
double * | colorRGBA |
RenderingMode | mode |
Additional Inherited Members | |
![]() | |
std::map< std::string, std::string > | fields |
map containing all the different fields (name, value stored as string ) More... | |
A class that manages the structural component properties.
|
inline |
use a Color constant to set the color
References alloc(), setColor(), setMode(), and RenderingMode::WIREFRAME_AND_SURFACE.
StructuralComponentProperties::StructuralComponentProperties | ( | PhysicalModel * | p, |
physicalModel::StructuralComponent | xmlSC | ||
) |
References alloc(), DEFAULT, RenderingMode::NONE, RenderingMode::POINTS, RenderingMode::POINTS_AND_SURFACE, setColor(), setMode(), Properties::setName(), setRGBA(), RenderingMode::SURFACE, RenderingMode::WIREFRAME, RenderingMode::WIREFRAME_AND_POINTS, RenderingMode::WIREFRAME_AND_SURFACE, RenderingMode::WIREFRAME_AND_SURFACE_AND_POINTS, and Properties::xmlToFields().
|
inline |
References alloc(), setColor(), setMode(), and RenderingMode::WIREFRAME_AND_SURFACE.
|
inline |
use a double[3] array to set the color
References alloc(), setAlpha(), setMode(), setRGB(), and RenderingMode::WIREFRAME_AND_SURFACE.
|
inline |
References alloc(), setAlpha(), setMode(), setRGB(), and RenderingMode::WIREFRAME_AND_SURFACE.
|
inline |
use 3 floats to set the color
References alloc(), setAlpha(), setMode(), setRGB(), and RenderingMode::WIREFRAME_AND_SURFACE.
|
inline |
References alloc(), setAlpha(), setMode(), setRGB(), and RenderingMode::WIREFRAME_AND_SURFACE.
|
inline |
defaultcolor is gray
References alloc(), DEFAULT, setColor(), setMode(), and RenderingMode::WIREFRAME_AND_SURFACE.
|
inline |
References alloc(), DEFAULT, setColor(), setMode(), and RenderingMode::WIREFRAME_AND_SURFACE.
|
inline |
References colorRGBA.
|
inlineprivate |
References colorRGBA.
Referenced by StructuralComponentProperties().
|
inline |
References colorRGBA.
|
inline |
References colorRGBA.
|
inline |
References color.
|
inline |
References colorRGBA.
|
inline |
References RenderingMode::getMode(), and mode.
|
inline |
get the string equivalent to the enum rendering mode
References RenderingMode::getModeString(), and mode.
|
inline |
References colorRGBA.
|
inline |
References colorRGBA.
|
inline |
References colorRGBA.
|
inline |
References RenderingMode::isVisible(), and mode.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References mode, and RenderingMode::setMode().
Referenced by StructuralComponentProperties().
|
inline |
|
inline |
References color, OTHER, and setRGB().
Referenced by setRGB(), and StructuralComponentProperties().
|
inline |
References color, OTHER, setBlue(), setGreen(), and setRed().
|
inline |
|
inline |
References a, color, OTHER, setAlpha(), setBlue(), setGreen(), and setRed().
Referenced by setColor(), setRGBA(), and StructuralComponentProperties().
|
inline |
References mode, and RenderingMode::setVisible().
|
virtual |
print to an output stream in "pseaudo" XML format.
This method is to be implemented in the subclass (StructuralComponentProperties). It HAS to call the beginXML() at the beginning and the endXML() at the end.
References Properties::fields, RenderingMode::getMode(), RenderingMode::getModeString(), Properties::getName(), mode, and RenderingMode::NONE.
|
private |
Referenced by getColor(), setAlpha(), setBlue(), setColor(), setGreen(), setRed(), setRGB(), and setRGBA().
|
private |
Referenced by alloc(), getAlpha(), getBlue(), getGreen(), getRed(), getRGB(), getRGBA(), setAlpha(), setBlue(), setGreen(), setRed(), and ~StructuralComponentProperties().
|
private |
Referenced by getMode(), getModeString(), isVisible(), setMode(), setVisible(), and xmlPrint().