h o m e | d o c u m e n t a t i o n | c l a s s h i e r a r c h y |
#include <Stroke.h>
Public Member Functions | |
StrokeAttribute () | |
StrokeAttribute (const StrokeAttribute &iBrother) | |
StrokeAttribute (float iRColor, float iGColor, float iBColor, float iAlpha, float iRThickness, float iLThickness) | |
StrokeAttribute (const StrokeAttribute &a1, const StrokeAttribute &a2, float t) | |
virtual | ~StrokeAttribute () |
StrokeAttribute & | operator= (const StrokeAttribute &iBrother) |
const float * | getColor () const |
const float | getColorR () const |
const float | getColorG () const |
const float | getColorB () const |
Vec3f | getColorRGB () const |
float | getAlpha () const |
const float * | getThickness () const |
const float | getThicknessR () const |
const float | getThicknessL () const |
Vec2f | getThicknessRL () const |
bool | isVisible () const |
float | getAttributeReal (const char *iName) const |
Vec2f | getAttributeVec2f (const char *iName) const |
Vec3f | getAttributeVec3f (const char *iName) const |
bool | isAttributeAvailableReal (const char *iName) const |
bool | isAttributeAvailableVec2f (const char *iName) const |
bool | isAttributeAvailableVec3f (const char *iName) const |
void | setColor (float r, float g, float b) |
void | setColor (const Vec3f &iRGB) |
void | setAlpha (float alpha) |
void | setThickness (float tr, float tl) |
void | setThickness (const Vec2f &tRL) |
void | SetVisible (bool iVisible) |
void | setAttributeReal (const char *iName, float att) |
void | setAttributeVec2f (const char *iName, const Vec2f &att) |
void | setAttributeVec3f (const char *iName, const Vec3f &att) |
StrokeAttribute | ( | ) |
default constructor
StrokeAttribute | ( | const StrokeAttribute & | iBrother | ) |
Copy constructor
StrokeAttribute | ( | float | iRColor, | |
float | iGColor, | |||
float | iBColor, | |||
float | iAlpha, | |||
float | iRThickness, | |||
float | iLThickness | |||
) |
Builds a stroke vertex attribute from a set of parameters.
iRColor | The Red Component value. | |
iGColor | The Green Component value. | |
iBColor | The Blue Component value. | |
iAlpha | The transparency value | |
iRThickness | The thickness of the stroke on the right | |
iLThickness | The Thickness of the stroke on the left |
StrokeAttribute | ( | const StrokeAttribute & | a1, | |
const StrokeAttribute & | a2, | |||
float | t | |||
) |
Interpolation constructor. Builds a StrokeAttribute from two StrokeAttributes and an interpolation parameter.
a1 | The first Attribute. | |
a2 | The second parameter. | |
t | The interpolation parameter. |
virtual ~StrokeAttribute | ( | ) | [virtual] |
destructor
StrokeAttribute& operator= | ( | const StrokeAttribute & | iBrother | ) |
operator =
const float* getColor | ( | ) | const [inline] |
Returns the attribute's color.
const float getColorR | ( | ) | const [inline] |
Returns the R color component.
const float getColorG | ( | ) | const [inline] |
Returns the G color component.
const float getColorB | ( | ) | const [inline] |
Returns the B color component.
Vec3f getColorRGB | ( | ) | const [inline] |
Returns the RGB color components.
float getAlpha | ( | ) | const [inline] |
Returns the alpha color component.
const float* getThickness | ( | ) | const [inline] |
Returns the attribute's thickness.
const float getThicknessR | ( | ) | const [inline] |
Returns the thickness on the right of the vertex when following the stroke.
const float getThicknessL | ( | ) | const [inline] |
Returns the thickness on the left of the vertex when following the stroke.
Vec2f getThicknessRL | ( | ) | const [inline] |
Returns the thickness on the right and on the left of the vertex when following the stroke.
bool isVisible | ( | ) | const [inline] |
Returns true if the strokevertex is visible, false otherwise
float getAttributeReal | ( | const char * | iName | ) | const |
Returns an attribute of type real
iName | The name of the attribute |
Vec2f getAttributeVec2f | ( | const char * | iName | ) | const |
Returns an attribute of type Vec2f
iName | The name of the attribute |
Vec3f getAttributeVec3f | ( | const char * | iName | ) | const |
Returns an attribute of type Vec3f
iName | The name of the attribute |
bool isAttributeAvailableReal | ( | const char * | iName | ) | const |
Checks whether the attribute iName is availbale
bool isAttributeAvailableVec2f | ( | const char * | iName | ) | const |
Checks whether the attribute iName is availbale
bool isAttributeAvailableVec3f | ( | const char * | iName | ) | const |
Checks whether the attribute iName is availbale
void setColor | ( | float | r, | |
float | g, | |||
float | b | |||
) | [inline] |
Sets the attribute's color.
r | The new R value. | |
g | The new G value. | |
b | The new B value. |
void setColor | ( | const Vec3f & | iRGB | ) | [inline] |
Sets the attribute's color.
iRGB | The new RGB values. |
void setAlpha | ( | float | alpha | ) | [inline] |
Sets the attribute's alpha value.
alpha | The new alpha value. |
void setThickness | ( | float | tr, | |
float | tl | |||
) | [inline] |
Sets the attribute's thickness.
tr | The thickness on the right of the vertex when following the stroke. | |
tl | The thickness on the left of the vertex when following the stroke. |
void setThickness | ( | const Vec2f & | tRL | ) | [inline] |
Sets the attribute's thickness.
tRL | The thickness on the right and on the left of the vertex when following the stroke. |
void SetVisible | ( | bool | iVisible | ) | [inline] |
Sets the visible flag. True means visible.
void setAttributeReal | ( | const char * | iName, | |
float | att | |||
) |
Adds a user defined attribute of type real If there is no attribute of name iName, it is added. Otherwise, the new value replaces the old one.
iName | The name of the attribute | |
att | The attribute's value |
void setAttributeVec2f | ( | const char * | iName, | |
const Vec2f & | att | |||
) |
Adds a user defined attribute of type Vec2f If there is no attribute of name iName, it is added. Otherwise, the new value replaces the old one.
iName | The name of the attribute | |
att | The attribute's value |
void setAttributeVec3f | ( | const char * | iName, | |
const Vec3f & | att | |||
) |
Adds a user defined attribute of type Vec3f If there is no attribute of name iName, it is added. Otherwise, the new value replaces the old one.
iName | The name of the attribute | |
att | The attribute's value |