| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/opengl/textureedgesgl.h>

Public Member Functions | |
| TextureEdgesGL (Image *strokeImage, Iterator< Vector > *minTexCoords, Iterator< Vector > *maxTexCoords, unsigned int style=1, double width=0.25, double lengthOffset=0.0, double tiltOffset=0.0, unsigned int hue=100, Color color=Color(0.0, 0.0, 0.0), double depthOffset=0.0, double fadeOutDist=0, double maxDist=0) | |
| unsigned int | getStyle () const |
| void | setStyle (unsigned int style) |
| double | getWidth () const |
| void | setWidth (double width) |
| double | getLengthOffset () const |
| void | setLengthOffset (double offset) |
| double | getTiltOffset () const |
| void | setTiltOffset (double offset) |
| unsigned int | getHue () const |
| void | setHue (unsigned int hue) |
| Color | getColor () const |
| void | setColor (const Color &color) |
| double | getDepthOffset () const |
| void | setDepthOffset (double offset) |
| double | getFadeOutDistance () const |
| double | getMaxDistance () const |
| void | setFading (double fadeOutDist=0, double maxDist=0) |
| SO< Texture > | getStrokeTexture () const |
| SO< Iterator< Vector > > | getMinTexCoords () const |
| SO< Iterator< Vector > > | getMaxTexCoords () const |
| VRS_TYPEINFO (TextureEdgesGL, MonoAttribute) | |
| VRS_SERIALIZABLE (TextureEdgesGL) | |
Static Public Member Functions | |
| static SO< PolygonSet > | createEdgeGeometry (Iterator< Vector > *edges) |
Note:
| VRS::TextureEdgesGL::TextureEdgesGL | ( | Image * | strokeImage, | |
| Iterator< Vector > * | minTexCoords, | |||
| Iterator< Vector > * | maxTexCoords, | |||
| unsigned int | style = 1, |
|||
| double | width = 0.25, |
|||
| double | lengthOffset = 0.0, |
|||
| double | tiltOffset = 0.0, |
|||
| unsigned int | hue = 100, |
|||
| Color | color = Color(0.0, 0.0, 0.0), |
|||
| double | depthOffset = 0.0, |
|||
| double | fadeOutDist = 0, |
|||
| double | maxDist = 0 | |||
| ) |
| unsigned int VRS::TextureEdgesGL::getStyle | ( | ) | const |
| void VRS::TextureEdgesGL::setStyle | ( | unsigned int | style | ) |
Sets the current stroke style. Each rectangle (defined via a min/max-coords pair in the constructor) in the strokeImage defines a stroke style. Consequently The number of styles is defined by the length of minTexCoords. style must be in {0,...,number-of-styles}.
| double VRS::TextureEdgesGL::getWidth | ( | ) | const |
| void VRS::TextureEdgesGL::setWidth | ( | double | width | ) |
Sets the width of the quads that are textured with strokes.
| double VRS::TextureEdgesGL::getLengthOffset | ( | ) | const |
| void VRS::TextureEdgesGL::setLengthOffset | ( | double | offset | ) |
The edges may overlap their endpoints by a fixed length offset. Note that the length offset is scale dependent.
| double VRS::TextureEdgesGL::getTiltOffset | ( | ) | const |
| void VRS::TextureEdgesGL::setTiltOffset | ( | double | offset | ) |
The endpoints of each edge may be shifted orthogonally to the edge direction by a fixed tilt offset.
| unsigned int VRS::TextureEdgesGL::getHue | ( | ) | const |
| void VRS::TextureEdgesGL::setHue | ( | unsigned int | hue | ) |
Sets the hue value of the strokes.
| Color VRS::TextureEdgesGL::getColor | ( | ) | const |
| void VRS::TextureEdgesGL::setColor | ( | const Color & | color | ) |
Sets the stroke color.
| double VRS::TextureEdgesGL::getDepthOffset | ( | ) | const |
| void VRS::TextureEdgesGL::setDepthOffset | ( | double | offset | ) |
Usually the edges are used to enhance a given shape. For this the strokes must not be covered by this shape. So the TextureEdges moves the edge vertices slightly towards the viewer. Note that the depth offset is scale dependent.
| double VRS::TextureEdgesGL::getFadeOutDistance | ( | ) | const |
| double VRS::TextureEdgesGL::getMaxDistance | ( | ) | const |
| void VRS::TextureEdgesGL::setFading | ( | double | fadeOutDist = 0, |
|
| double | maxDist = 0 | |||
| ) |
When viewing from a large distance the edges can produce z-Buffer artifacts or aliasing. To avoid this, the edges can be smoothly faded out when moving away from the viewer. The fading starts at distance 'fadeOutDist' and stops at 'maxDist'. 'fadeOutDist' must be less or equal maxDist! Setting maxDist to 0 disables the fading, i.e. in this case the max distance is infinite.
| static SO<PolygonSet> VRS::TextureEdgesGL::createEdgeGeometry | ( | Iterator< Vector > * | edges | ) | [static] |
Creates an appropriate edge representation that can be rendered with an active TextureEdgeGL attribute. 'edges' must not be NULL and must contain all edge vertices. Note that subsequent edges need not be adjacent. E.g. a polygon (a,b,c,d) has to be passed as (a,b,b,c,c,d,d,a).
| VRS::TextureEdgesGL::VRS_TYPEINFO | ( | TextureEdgesGL | , | |
| MonoAttribute | ||||
| ) |
| VRS::TextureEdgesGL::VRS_SERIALIZABLE | ( | TextureEdgesGL | ) |