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

StrokeAttribute Class Reference

#include <Stroke.h>

List of all members.


Detailed Description

Class to define an attribute associated to a Stroke Vertex. This attribute stores the color, alpha and thickness values for a Stroke Vertex.


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 ()
StrokeAttributeoperator= (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)

Constructor & Destructor Documentation

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.

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.

Parameters:
a1 The first Attribute.
a2 The second parameter.
t The interpolation parameter.

virtual ~StrokeAttribute  )  [virtual]
 

destructor


Member Function Documentation

float getAlpha  )  const [inline]
 

Returns the alpha color component.

float getAttributeReal const char *  iName  )  const
 

Returns an attribute of type real

Parameters:
iName The name of the attribute

Vec2f getAttributeVec2f const char *  iName  )  const
 

Returns an attribute of type Vec2f

Parameters:
iName The name of the attribute

Vec3f getAttributeVec3f const char *  iName  )  const
 

Returns an attribute of type Vec3f

Parameters:
iName The name of the attribute

const float* getColor  )  const [inline]
 

Returns the attribute's color.

Returns:
The array of 3 floats containing the R,G,B values of the attribute's color.

const float getColorB  )  const [inline]
 

Returns the B color component.

const float getColorG  )  const [inline]
 

Returns the G color component.

const float getColorR  )  const [inline]
 

Returns the R color component.

Vec3f getColorRGB  )  const [inline]
 

Returns the RGB color components.

const float* getThickness  )  const [inline]
 

Returns the attribute's thickness.

Returns:
an array of 2 floats. the first value is the thickness on the right of the vertex when following the stroke, the second one is the thickness on the left.

const float getThicknessL  )  const [inline]
 

Returns the thickness on the left of the vertex when following the stroke.

const float getThicknessR  )  const [inline]
 

Returns the thickness on the right 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 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

bool isVisible  )  const [inline]
 

Returns true if the strokevertex is visible, false otherwise

StrokeAttribute& operator= const StrokeAttribute iBrother  ) 
 

operator =

void setAlpha float  alpha  )  [inline]
 

Sets the attribute's alpha value.

Parameters:
alpha The new alpha value.

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.

Parameters:
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.

Parameters:
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.

Parameters:
iName The name of the attribute
att The attribute's value

void setColor const Vec3f &  iRGB  )  [inline]
 

Sets the attribute's color.

Parameters:
iRGB The new RGB values.

void setColor float  r,
float  g,
float  b
[inline]
 

Sets the attribute's color.

Parameters:
r The new R value.
g The new G value.
b The new B value.

void setThickness const Vec2f &  tRL  )  [inline]
 

Sets the attribute's thickness.

Parameters:
tRL The thickness on the right and on the left of the vertex when following the stroke.

void setThickness float  tr,
float  tl
[inline]
 

Sets the attribute's thickness.

Parameters:
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 SetVisible bool  iVisible  )  [inline]
 

Sets the visible flag. True means visible.


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