Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
TissueForge::rendering::Style Struct Reference

The Tissue Forge style type. More...

#include <tfStyle.h>

Collaboration diagram for TissueForge::rendering::Style:

Public Member Functions

 Style (const fVector3 *color=NULL, const bool &visible=true, uint32_t flags=STYLE_VISIBLE, ColorMapper *cmap=NULL)
 
 Style (const std::string &color, const bool &visible=true, uint32_t flags=STYLE_VISIBLE, ColorMapper *cmap=NULL)
 Construct a new style.
 
 Style (const Style &other)
 
int init (const fVector3 *color=NULL, const bool &visible=true, uint32_t flags=STYLE_VISIBLE, ColorMapper *cmap=NULL)
 
HRESULT setColor (const std::string &colorName)
 Set the color by name.
 
HRESULT setFlag (StyleFlags flag, bool value)
 Set a style flag.
 
fVector4 map_color (struct Particle *p)
 Map a particle to a color.
 
fVector4 map_color (struct Angle *a)
 Map an angle to a color.
 
fVector4 map_color (struct Bond *b)
 Map a bond to a color.
 
fVector4 map_color (struct Dihedral *d)
 Map a dihedral to a color.
 
const bool getVisible () const
 Test whether visible.
 
void setVisible (const bool &visible)
 Set whether visible.
 
std::string getColorMap () const
 Get the name of the color map, if any.
 
ColorMappergetColorMapper () const
 Get the color mapper, if any.
 
void setColorMap (const std::string &colorMap)
 Create a color mapper by name.
 
void setColorMapper (ColorMapper *cmap)
 Set the color mapper.
 
std::string toString ()
 Get a JSON string representation.
 

Static Public Member Functions

static StylefromString (const std::string &str)
 Create from a JSON string representation.
 

Public Attributes

fVector3 color
 
uint32_t flags
 
struct ColorMappermapper = NULL
 Color mapper of this style.
 

Detailed Description

The Tissue Forge style type.

Constructor & Destructor Documentation

◆ Style()

TissueForge::rendering::Style::Style ( const std::string & color,
const bool & visible = true,
uint32_t flags = STYLE_VISIBLE,
ColorMapper * cmap = NULL )

Construct a new style.

Parameters
colorname of color
visiblevisibility flag
flagsstyle flags
cmapcolor mapper

Member Function Documentation

◆ fromString()

static Style * TissueForge::rendering::Style::fromString ( const std::string & str)
static

Create from a JSON string representation.

Parameters
str
Returns
Style*

◆ setColor()

HRESULT TissueForge::rendering::Style::setColor ( const std::string & colorName)

Set the color by name.

Parameters
colorNamename of color
Returns
HRESULT

◆ toString()

std::string TissueForge::rendering::Style::toString ( )

Get a JSON string representation.

Returns
std::string

Member Data Documentation

◆ color

fVector3 TissueForge::rendering::Style::color

Default color

◆ flags

uint32_t TissueForge::rendering::Style::flags

Style flags


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