Blender
V3.3
|
#include <Stroke.h>
Class to define an attribute associated to a Stroke Vertex. This attribute stores the color, alpha and thickness values for a Stroke Vertex.
Freestyle::StrokeAttribute::StrokeAttribute | ( | ) |
default constructor
Definition at line 26 of file Stroke.cpp.
Freestyle::StrokeAttribute::StrokeAttribute | ( | const StrokeAttribute & | iBrother | ) |
Copy constructor
Definition at line 42 of file Stroke.cpp.
Freestyle::StrokeAttribute::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 |
Definition at line 71 of file Stroke.cpp.
Freestyle::StrokeAttribute::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. |
Definition at line 94 of file Stroke.cpp.
References isVisible(), and t.
|
virtual |
destructor
Definition at line 150 of file Stroke.cpp.
|
inline |
Returns the alpha color component.
Definition at line 125 of file Stroke.h.
Referenced by Freestyle::Strip::computeTexCoordWithTips(), Freestyle::operator<<(), and Freestyle::Strip::setVertexColor().
float Freestyle::StrokeAttribute::getAttributeReal | ( | const char * | iName | ) | const |
Returns an attribute of type real
iName | The name of the attribute |
Definition at line 206 of file Stroke.cpp.
References Freestyle::a, G, and G_DEBUG_FREESTYLE.
Vec2f Freestyle::StrokeAttribute::getAttributeVec2f | ( | const char * | iName | ) | const |
Returns an attribute of type Vec2f
iName | The name of the attribute |
Definition at line 225 of file Stroke.cpp.
References Freestyle::a, G, and G_DEBUG_FREESTYLE.
Referenced by Freestyle::Strip::createStrip().
Vec3f Freestyle::StrokeAttribute::getAttributeVec3f | ( | const char * | iName | ) | const |
Returns an attribute of type Vec3f
iName | The name of the attribute |
Definition at line 244 of file Stroke.cpp.
References Freestyle::a, G, and G_DEBUG_FREESTYLE.
|
inline |
Returns the attribute's color.
Definition at line 95 of file Stroke.h.
Referenced by Freestyle::Strip::setVertexColor().
|
inline |
Returns the B color component.
Definition at line 113 of file Stroke.h.
Referenced by Freestyle::operator<<(), and Freestyle::TextStrokeRenderer::RenderStrokeRepBasic().
|
inline |
Returns the G color component.
Definition at line 107 of file Stroke.h.
Referenced by Freestyle::operator<<(), and Freestyle::TextStrokeRenderer::RenderStrokeRepBasic().
|
inline |
Returns the R color component.
Definition at line 101 of file Stroke.h.
Referenced by Freestyle::operator<<(), and Freestyle::TextStrokeRenderer::RenderStrokeRepBasic().
|
inline |
Returns the RGB color components.
Definition at line 119 of file Stroke.h.
Referenced by Freestyle::Strip::computeTexCoordWithTips(), and Freestyle::Strip::setVertexColor().
|
inline |
Returns the attribute's thickness.
Definition at line 134 of file Stroke.h.
Referenced by Freestyle::Strip::createStrip().
|
inline |
Returns the thickness on the left of the vertex when following the stroke.
Definition at line 146 of file Stroke.h.
Referenced by Freestyle::operator<<(), Freestyle::TextStrokeRenderer::RenderStrokeRepBasic(), and Freestyle::Stroke::ScaleThickness().
|
inline |
Returns the thickness on the right of the vertex when following the stroke.
Definition at line 140 of file Stroke.h.
Referenced by Freestyle::operator<<(), Freestyle::TextStrokeRenderer::RenderStrokeRepBasic(), and Freestyle::Stroke::ScaleThickness().
|
inline |
bool Freestyle::StrokeAttribute::isAttributeAvailableReal | ( | const char * | iName | ) | const |
Checks whether the attribute iName is available
Definition at line 263 of file Stroke.cpp.
References Freestyle::a.
bool Freestyle::StrokeAttribute::isAttributeAvailableVec2f | ( | const char * | iName | ) | const |
Checks whether the attribute iName is available
Definition at line 275 of file Stroke.cpp.
References Freestyle::a.
Referenced by Freestyle::Strip::createStrip().
bool Freestyle::StrokeAttribute::isAttributeAvailableVec3f | ( | const char * | iName | ) | const |
Checks whether the attribute iName is available
Definition at line 287 of file Stroke.cpp.
References Freestyle::a.
|
inline |
Returns true if the strokevertex is visible, false otherwise
Definition at line 159 of file Stroke.h.
Referenced by Freestyle::operator<<(), and StrokeAttribute().
StrokeAttribute & Freestyle::StrokeAttribute::operator= | ( | const StrokeAttribute & | iBrother | ) |
operator =
Definition at line 166 of file Stroke.cpp.
sets the attribute's alpha value.
alpha | The new alpha value. |
Definition at line 222 of file Stroke.h.
Referenced by Freestyle::StrokeShaders::MaterialColorShader::shade().
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 |
Definition at line 299 of file Stroke.cpp.
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 |
Definition at line 307 of file Stroke.cpp.
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 |
Definition at line 315 of file Stroke.cpp.
sets the attribute's color.
r | The new R value. |
g | The new G value. |
b | The new B value. |
Definition at line 200 of file Stroke.h.
References usdtokens::b(), usdtokens::g(), and r.
Referenced by Freestyle::CalligraphicShader::shade(), and Freestyle::StrokeShaders::MaterialColorShader::shade().
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. |
Definition at line 233 of file Stroke.h.
Referenced by Freestyle::Stroke::ScaleThickness(), and Freestyle::CalligraphicShader::shade().