Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The VectorGraphics class is used in conjuction with SceneManagerVectorGraphics to generate and render 2D vector graphics. More...
#include <VectorGraphics.hpp>
Public Member Functions | |
VectorGraphics () | |
const ActorCollection * | actors () const |
Returns the list of Actor[s] generated by a VectorGraphics object. More... | |
ActorCollection * | actors () |
Returns the list of Actor[s] generated by a VectorGraphics object. More... | |
Actor * | drawLine (double x1, double y1, double x2, double y2) |
Renders a line starting a point <x1,y1> and ending at point <x2,y2> More... | |
Actor * | drawLines (const std::vector< dvec2 > &ln) |
Renders a set of lines. The 'ln' parameter shoud contain N pairs of dvec2. Each pair defines a line segment. More... | |
Actor * | drawLineStrip (const std::vector< dvec2 > &ln) |
Renders a line passing through the points defined by 'ln'. More... | |
Actor * | drawLineLoop (const std::vector< dvec2 > &ln) |
Renders a closed line passing through the points defined by 'ln'. More... | |
Actor * | fillPolygon (const std::vector< dvec2 > &poly) |
Renders a convex polygon whose corners are defined by 'poly'. More... | |
Actor * | fillTriangles (const std::vector< dvec2 > &triangles) |
Renders a set of triangles. The 'triangles' parameters must contain N triplets of dvec2. Each triplet defines a triangle. More... | |
Actor * | fillTriangleFan (const std::vector< dvec2 > &fan) |
Renders a triangle fan. More... | |
Actor * | fillTriangleStrip (const std::vector< dvec2 > &strip) |
Renders a strip of triangles as defined by the OpenGL primitive GL_TRIANGLE_STRIP. More... | |
Actor * | fillQuads (const std::vector< dvec2 > &quads) |
Renders a set of rectangles as defined by the OpenGL primitive GL_QUADS. More... | |
Actor * | fillQuadStrip (const std::vector< dvec2 > &quad_strip) |
Renders a set of rectangles as defined by the OpenGL primitive GL_QUAD_STRIP. More... | |
Actor * | drawPoint (double x, double y) |
Renders a single point. This is only an utility function. If you want to draw many points use drawPoints(const std::vector<dvec2>& pt) instead. More... | |
Actor * | drawPoints (const std::vector< dvec2 > &pt) |
Renders a set of points using the currently set pointSize(), color() and image(). More... | |
Actor * | drawEllipse (double origx, double origy, double xaxis, double yaxis, int segments=64) |
Renders the outline of an ellipse. More... | |
Actor * | fillEllipse (double origx, double origy, double xaxis, double yaxis, int segments=64) |
Renders an ellipse. More... | |
Actor * | drawQuad (double left, double bottom, double right, double top) |
Utility function that renders the outline of a quad. More... | |
Actor * | fillQuad (double left, double bottom, double right, double top) |
Utility function that renders a single quad. More... | |
void | startDrawing () |
Starts the drawing process. More... | |
void | continueDrawing () |
Continues the rendering on a VectorGraphics object. More... | |
void | endDrawing (bool release_cache=true) |
Ends the rendering on a VectorGraphics and releases the resources used during the Actor generation process. More... | |
void | clear () |
Resets the VectorGraphics removing all the graphics objects and resetting its internal state. More... | |
void | setColor (const fvec4 &color) |
The current color. Note that the current color also modulates the currently active image. More... | |
const fvec4 & | color () const |
The current color. Note that the current color also modulates the currently active image. More... | |
void | setPointSize (int size) |
The current point size. More... | |
int | pointSize () const |
The current point size. More... | |
void | setImage (Image *image) |
The current image used to texture the rendered objects. Note that the current color also modulates the currently active image. More... | |
const Image * | image () const |
The current image used to texture the rendered objects. Note that the current color also modulates the currently active image. More... | |
Image * | image () |
The current image used to texture the rendered objects. Note that the current color also modulates the currently active image. More... | |
void | setPoint (Image *image) |
Utility function equivalent to 'setImage(image); setPointSize(image->width());'. More... | |
void | setTextureMode (ETextureMode mode) |
The current texture mode. More... | |
ETextureMode | textureMode () const |
The current texture mode. More... | |
void | setLogicOp (ELogicOp op) |
The current logic operation, see also http://www.opengl.org/sdk/docs/man/xhtml/glLogicOp.xml for more information. More... | |
ELogicOp | logicOp () const |
The current logic operation. More... | |
void | setLineWidth (float width) |
The current line width, see also http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml for more information. More... | |
float | lineWidth () const |
The current line width. More... | |
void | setPointSmoothing (bool smooth) |
The current point smoothing mode. More... | |
bool | pointSmoothing () const |
The current point smoothing mode. More... | |
void | setLineSmoothing (bool smooth) |
The current line smoothing mode. More... | |
bool | lineSmoothing () const |
The current line smoothing mode. More... | |
void | setPolygonSmoothing (bool smooth) |
The current polygon smoothing mode. More... | |
bool | polygonSmoothing () const |
The current polygon smoothing mode. More... | |
void | setLineStipple (ELineStipple stipple) |
The current line stipple, see also http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml for more information. More... | |
void | setLineStipple (unsigned short stipple) |
The current line stipple. More... | |
unsigned short | lineStipple () const |
The current line stipple. More... | |
void | setPolygonStipple (EPolygonStipple stipple) |
The current polygon stipple, see also http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml for more information. More... | |
void | setPolygonStipple (unsigned char *stipple) |
The current polygon stipple. More... | |
const unsigned char * | polygonStipple () const |
The current polygon stipple. More... | |
unsigned char * | polygonStipple () |
The current polygon stipple. More... | |
void | setAlphaFunc (EFunction func, float ref_value) |
The current alpha function, see also http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml for more information. More... | |
void | getAlphaFunc (EFunction &func, float &ref_value) const |
The current alpha function. More... | |
void | setBlendFunc (EBlendFactor src_rgb, EBlendFactor dst_rgb, EBlendFactor src_alpha, EBlendFactor dst_alpha) |
The current blending factor, see also http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml for more information. More... | |
void | getBlendFunc (EBlendFactor &src_rgb, EBlendFactor &dst_rgb, EBlendFactor &src_alpha, EBlendFactor &dst_alpha) const |
The current blending factor. More... | |
void | setBlendEquation (EBlendEquation rgb_eq, EBlendEquation alpha_eq) |
The current blend equation, see also http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml for more information. More... | |
void | getBlendEquation (EBlendEquation &rgb_eq, EBlendEquation &alpha_eq) const |
The current blend equation. More... | |
void | setColorMask (bool r, bool g, bool b, bool a) |
The current color mask, see also http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml for more information. More... | |
const ivec4 & | colorMask () const |
The current color mask. More... | |
void | setStencilTestEnabled (bool enabled) |
If set to 'true' the stencil test and operations will be enabled. More... | |
bool | stencilTestEnabled () const |
If set to 'true' the stencil test and operations will be enabled. More... | |
void | setStencilMask (unsigned int mask) |
Current stencil mask, see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml for more information. More... | |
unsigned int | stencilMask () const |
Current stencil mask. More... | |
void | setStencilOp (EStencilOp sfail, EStencilOp dpfail, EStencilOp dppass) |
Current stencil operation, see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml for more information. More... | |
void | getStencilOp (EStencilOp &sfail, EStencilOp &dpfail, EStencilOp &dppass) |
Current stencil operation. More... | |
void | setStencilFunc (EFunction func, int refval, unsigned int mask) |
The current stencil function, see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml for more information. More... | |
void | getStencilFunc (EFunction &func, int &refval, unsigned int &mask) |
The current stencil function. More... | |
void | setFont (const String &name, int size, bool smooth=false) |
Sets the current Font. More... | |
void | setFont (const Font *font) |
Sets the current Font. More... | |
void | setDefaultFont () |
Sets the default Font. More... | |
const Font * | font () const |
Returns the current Font. More... | |
void | setScissor (int x, int y, int width, int height) |
Defines the scissor box and enables the scissor test. More... | |
const Scissor * | scissor () const |
Returns the currently active Scissor. More... | |
void | removeScissor () |
Disables the Scissor test and clipping. More... | |
Actor * | clearColor (const fvec4 &color, int x=0, int y=0, int w=-1, int h=-1) |
Clears the specific area of the viewport. More... | |
Actor * | clearStencil (int clear_val, int x=0, int y=0, int w=-1, int h=-1) |
Clears the specific area of the viewport. More... | |
Actor * | drawText (Text *text) |
Draw the specified Text object. More... | |
Actor * | drawText (int x, int y, const String &text, int alignment=AlignBottom|AlignLeft) |
Draws the specified text at the specified position. More... | |
Actor * | drawText (const String &text, int alignment=AlignBottom|AlignLeft) |
Draws the specified text. More... | |
Actor * | drawActor (Actor *actor, Transform *transform=NULL, bool keep_effect=false) |
Draws the specified Actor with the specified Transform. More... | |
Actor * | drawActorCopy (Actor *actor, Transform *transform=NULL) |
Like drawActor() but instead of drawing the given actor creates a copy of it and draws that. More... | |
const dmat4 & | matrix () const |
Returns the current transform matrix. More... | |
void | setMatrix (const dmat4 &matrix) |
Sets the current transform matrix. More... | |
void | resetMatrix () |
Resets the current transform matrix. More... | |
void | rotate (double deg) |
Performs a rotation of 'deg' degrees around the z axis. More... | |
void | translate (double x, double y, double z=0.0) |
Translates the current transform matrix. More... | |
void | scale (double x, double y, double z=1.0) |
Scales the current transform matrix. More... | |
void | pushMatrix () |
Pushes the current matrix in the matrix stack in order to restore it later with popMatrix(). More... | |
void | popMatrix () |
Pops the top most matrix in the matrix stack and sets it as the current matrix. More... | |
const std::vector< dmat4 > & | matrixStack () const |
Returns the matrix stack. More... | |
void | pushState () |
Pushes the current VectorGraphics state (including the matrix state) in the state stack in order to restore it later with popState(). More... | |
void | popState () |
Pops the top most state in the state stack and sets it as the current state. More... | |
void | pushScissor (int x, int y, int w, int h) |
Pushes the current scissor in the scissor stack in order to restore it later with popScissor() and activates a new one. More... | |
void | popScissor () |
Pops the top most scissor in the scissor stack and sets it as the current scissor. More... | |
const std::vector< ref< Scissor > > & | scissorStack () const |
Returns the scissor stack. More... | |
void | setTransform (Transform *transform) |
Binds the given Transform to all the Actor[s] that have been generated so far. More... | |
Effect * | currentEffect () |
Returns the Effect representing the current VectorGraphic's state. More... | |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
The VectorGraphics class is used in conjuction with SceneManagerVectorGraphics to generate and render 2D vector graphics.
The VectorGraphics object is basically nothing more than an container of Actor[s] generated by functions like drawLines(), fillTriangles() etc. The Actor[s] are rendered in the order in which they are generated.
The VectorGraphics class features a set of advanced capabilites:
For more information please refer to the 2D Vector Graphics page.
Definition at line 106 of file VectorGraphics.hpp.
VectorGraphics::VectorGraphics | ( | ) |
Definition at line 37 of file VectorGraphics.cpp.
References vl::EN_BLEND, and vl::Object::setAutomaticDelete().
|
inline |
Returns the list of Actor[s] generated by a VectorGraphics object.
Definition at line 330 of file VectorGraphics.hpp.
|
inline |
Returns the list of Actor[s] generated by a VectorGraphics object.
Definition at line 333 of file VectorGraphics.hpp.
void VectorGraphics::clear | ( | ) |
Resets the VectorGraphics removing all the graphics objects and resetting its internal state.
Definition at line 284 of file VectorGraphics.cpp.
References vl::Collection< T >::clear().
Referenced by clearColor(), and clearStencil().
Actor * VectorGraphics::clearColor | ( | const fvec4 & | color, |
int | x = 0 , |
||
int | y = 0 , |
||
int | w = -1 , |
||
int | h = -1 |
||
) |
Clears the specific area of the viewport.
The parameters x y w h define a rectangular area in viewport coordinates that is clipped against the viewport itself.
Definition at line 428 of file VectorGraphics.cpp.
References clear(), currentEffect(), vl::ref< T >::get(), NULL, vl::Clear::setClearColorBuffer(), vl::Clear::setClearColorValue(), and vl::Clear::setScissorBox().
Actor * VectorGraphics::clearStencil | ( | int | clear_val, |
int | x = 0 , |
||
int | y = 0 , |
||
int | w = -1 , |
||
int | h = -1 |
||
) |
Clears the specific area of the viewport.
The parameters x y w h define a rectangular area in viewport coordinates that is clipped against the viewport itself.
Definition at line 437 of file VectorGraphics.cpp.
References clear(), currentEffect(), vl::ref< T >::get(), NULL, vl::Clear::setClearStencilBuffer(), vl::Clear::setClearStencilValue(), and vl::Clear::setScissorBox().
|
inline |
The current color. Note that the current color also modulates the currently active image.
Definition at line 402 of file VectorGraphics.hpp.
|
inline |
The current color mask.
Definition at line 501 of file VectorGraphics.hpp.
void VectorGraphics::continueDrawing | ( | ) |
Continues the rendering on a VectorGraphics object.
This function will reset the VectorGraphics state and matrix but will not erase the previously generated graphics.
Definition at line 255 of file VectorGraphics.cpp.
|
inline |
Returns the Effect representing the current VectorGraphic's state.
Definition at line 641 of file VectorGraphics.hpp.
References currentEffect().
Referenced by clearColor(), clearStencil(), currentEffect(), drawActor(), drawLineLoop(), drawLines(), drawLineStrip(), drawPoints(), drawText(), fillPolygon(), fillQuad(), fillQuads(), fillQuadStrip(), fillTriangleFan(), fillTriangles(), fillTriangleStrip(), and popScissor().
Actor * VectorGraphics::drawActor | ( | Actor * | actor, |
Transform * | transform = NULL , |
||
bool | keep_effect = false |
||
) |
Draws the specified Actor with the specified Transform.
If keep_effect is set to 'false' or the Actor's Effect is NULL a default Effect is automatically generated. If 'transform' is non NULL it is bound to the Actor.
Definition at line 473 of file VectorGraphics.cpp.
References currentEffect(), vl::Actor::effect(), NULL, vl::Actor::setEffect(), vl::Actor::setTransform(), and VL_CHECK.
Referenced by drawActorCopy().
Like drawActor() but instead of drawing the given actor creates a copy of it and draws that.
This function is useful when you want to crate multiple instances of the same geometry.
Definition at line 483 of file VectorGraphics.cpp.
References drawActor(), vl::ref< T >::get(), and vl::Actor::setTransform().
Actor * VectorGraphics::drawEllipse | ( | double | origx, |
double | origy, | ||
double | xaxis, | ||
double | yaxis, | ||
int | segments = 64 |
||
) |
Renders the outline of an ellipse.
Definition at line 204 of file VectorGraphics.cpp.
References vl::cos(), vl::dPi, drawLineStrip(), and vl::sin().
Actor * VectorGraphics::drawLine | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2 | ||
) |
Renders a line starting a point <x1,y1> and ending at point <x2,y2>
Definition at line 44 of file VectorGraphics.cpp.
References drawLines().
Renders a closed line passing through the points defined by 'ln'.
Definition at line 89 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_LINE_LOOP.
Referenced by drawQuad().
Renders a set of lines. The 'ln' parameter shoud contain N pairs of dvec2. Each pair defines a line segment.
Definition at line 52 of file VectorGraphics.cpp.
References vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::at(), currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, vl::PT_LINES, vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::resize(), vl::Geometry::setTexCoordArray(), vl::ArrayAbstract::size(), vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::size(), and vl::Geometry::vertexArray().
Referenced by drawLine().
Renders a line passing through the points defined by 'ln'.
Definition at line 77 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_LINE_STRIP.
Referenced by drawEllipse().
Actor * VectorGraphics::drawPoint | ( | double | x, |
double | y | ||
) |
Renders a single point. This is only an utility function. If you want to draw many points use drawPoints(const std::vector<dvec2>& pt) instead.
Definition at line 173 of file VectorGraphics.cpp.
References drawPoints().
Renders a set of points using the currently set pointSize(), color() and image().
Definition at line 180 of file VectorGraphics.cpp.
References vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::at(), currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), matrix(), NULL, vl::PT_POINTS, vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::resize(), vl::Vector3< T_Scalar >::s(), vl::Geometry::setVertexArray(), vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::size(), and vl::Vector3< T_Scalar >::t().
Referenced by drawPoint().
Actor * VectorGraphics::drawQuad | ( | double | left, |
double | bottom, | ||
double | right, | ||
double | top | ||
) |
Utility function that renders the outline of a quad.
Definition at line 228 of file VectorGraphics.cpp.
References drawLineLoop().
Draw the specified Text object.
Definition at line 446 of file VectorGraphics.cpp.
References currentEffect(), vl::Text::font(), NULL, and vl::Text::setFont().
Referenced by drawText().
Actor * VectorGraphics::drawText | ( | int | x, |
int | y, | ||
const String & | text, | ||
int | alignment = AlignBottom|AlignLeft |
||
) |
Draws the specified text at the specified position.
Note that the current matrix transform affect the final position, rotation and scaling of the text.
Definition at line 453 of file VectorGraphics.cpp.
References drawText(), vl::Matrix4< double >::getTranslation(), popMatrix(), and pushMatrix().
Actor * VectorGraphics::drawText | ( | const String & | text, |
int | alignment = AlignBottom|AlignLeft |
||
) |
Draws the specified text.
Definition at line 462 of file VectorGraphics.cpp.
References vl::AlignBottom, vl::AlignLeft, drawText(), vl::ref< T >::get(), matrix(), vl::Text::setAlignment(), vl::Text::setColor(), vl::Text::setMatrix(), vl::Text::setText(), and vl::Text::setViewportAlignment().
void VectorGraphics::endDrawing | ( | bool | release_cache = true | ) |
Ends the rendering on a VectorGraphics and releases the resources used during the Actor generation process.
If you intend to continue the rendering or to add new graphics objects later set 'release_cache' to false.
Definition at line 270 of file VectorGraphics.cpp.
Actor * VectorGraphics::fillEllipse | ( | double | origx, |
double | origy, | ||
double | xaxis, | ||
double | yaxis, | ||
int | segments = 64 |
||
) |
Renders an ellipse.
Definition at line 216 of file VectorGraphics.cpp.
References vl::cos(), vl::dPi, fillPolygon(), and vl::sin().
Renders a convex polygon whose corners are defined by 'poly'.
Definition at line 101 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, vl::PT_TRIANGLES, vl::ArrayAbstract::size(), and vl::Geometry::vertexArray().
Referenced by fillEllipse().
Actor * VectorGraphics::fillQuad | ( | double | left, |
double | bottom, | ||
double | right, | ||
double | top | ||
) |
Utility function that renders a single quad.
Definition at line 238 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_TRIANGLE_FAN.
Renders a set of rectangles as defined by the OpenGL primitive GL_QUADS.
Definition at line 149 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_QUADS.
Renders a set of rectangles as defined by the OpenGL primitive GL_QUAD_STRIP.
Definition at line 161 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_QUAD_STRIP.
Renders a triangle fan.
Definition at line 125 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_TRIANGLE_FAN.
Renders a set of triangles. The 'triangles' parameters must contain N triplets of dvec2. Each triplet defines a triangle.
Definition at line 113 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_TRIANGLES.
Renders a strip of triangles as defined by the OpenGL primitive GL_TRIANGLE_STRIP.
Definition at line 137 of file VectorGraphics.cpp.
References currentEffect(), vl::Geometry::drawCalls(), vl::ref< T >::get(), NULL, and vl::PT_TRIANGLE_STRIP.
|
inline |
Returns the current Font.
Definition at line 540 of file VectorGraphics.hpp.
|
inline |
The current alpha function.
Definition at line 483 of file VectorGraphics.hpp.
void VectorGraphics::getBlendEquation | ( | EBlendEquation & | rgb_eq, |
EBlendEquation & | alpha_eq | ||
) | const |
The current blend equation.
Definition at line 394 of file VectorGraphics.cpp.
void VectorGraphics::getBlendFunc | ( | EBlendFactor & | src_rgb, |
EBlendFactor & | dst_rgb, | ||
EBlendFactor & | src_alpha, | ||
EBlendFactor & | dst_alpha | ||
) | const |
The current blending factor.
Definition at line 380 of file VectorGraphics.cpp.
void VectorGraphics::getStencilFunc | ( | EFunction & | func, |
int & | refval, | ||
unsigned int & | mask | ||
) |
The current stencil function.
Definition at line 421 of file VectorGraphics.cpp.
void VectorGraphics::getStencilOp | ( | EStencilOp & | sfail, |
EStencilOp & | dpfail, | ||
EStencilOp & | dppass | ||
) |
Current stencil operation.
Definition at line 407 of file VectorGraphics.cpp.
|
inline |
The current image used to texture the rendered objects. Note that the current color also modulates the currently active image.
Definition at line 414 of file VectorGraphics.hpp.
Referenced by popScissor().
|
inline |
The current image used to texture the rendered objects. Note that the current color also modulates the currently active image.
Definition at line 417 of file VectorGraphics.hpp.
|
inline |
The current line smoothing mode.
Definition at line 450 of file VectorGraphics.hpp.
|
inline |
The current line stipple.
Definition at line 465 of file VectorGraphics.hpp.
|
inline |
The current line width.
Definition at line 438 of file VectorGraphics.hpp.
|
inline |
The current logic operation.
Definition at line 432 of file VectorGraphics.hpp.
|
inline |
Returns the current transform matrix.
Definition at line 592 of file VectorGraphics.hpp.
Referenced by drawPoints(), drawText(), and popScissor().
|
inline |
Returns the matrix stack.
Definition at line 616 of file VectorGraphics.hpp.
|
inline |
The current point size.
Definition at line 408 of file VectorGraphics.hpp.
|
inline |
The current point smoothing mode.
Definition at line 444 of file VectorGraphics.hpp.
|
inline |
The current polygon smoothing mode.
Definition at line 456 of file VectorGraphics.hpp.
|
inline |
The current polygon stipple.
Definition at line 474 of file VectorGraphics.hpp.
|
inline |
The current polygon stipple.
Definition at line 477 of file VectorGraphics.hpp.
void VectorGraphics::popMatrix | ( | ) |
Pops the top most matrix in the matrix stack and sets it as the current matrix.
Definition at line 506 of file VectorGraphics.cpp.
References vl::Log::error(), and setMatrix().
Referenced by drawText(), and popState().
void VectorGraphics::popScissor | ( | ) |
Pops the top most scissor in the scissor stack and sets it as the current scissor.
Definition at line 542 of file VectorGraphics.cpp.
References vl::AABB::addPoint(), vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::at(), currentEffect(), vl::EN_ALPHA_TEST, vl::EN_BLEND, vl::EN_COLOR_LOGIC_OP, vl::EN_LIGHTING, vl::EN_LINE_SMOOTH, vl::EN_LINE_STIPPLE, vl::EN_POINT_SMOOTH, vl::EN_POINT_SPRITE, vl::EN_POLYGON_SMOOTH, vl::EN_POLYGON_STIPPLE, vl::EN_STENCIL_TEST, vl::Shader::enable(), vl::Log::error(), vl::FU_ALWAYS, vl::ref< T >::get(), vl::ArrayAbstract::getAsVec3(), vl::ArrayAbstract::getAsVec4(), vl::Texture::getTexParameter(), vl::Shader::gocAlphaFunc(), vl::Shader::gocBlendEquation(), vl::Shader::gocBlendFunc(), vl::Shader::gocColorMask(), vl::Shader::gocHint(), vl::Shader::gocLineStipple(), vl::Shader::gocLineWidth(), vl::Shader::gocLogicOp(), vl::Shader::gocMaterial(), vl::Shader::gocPointSize(), vl::Shader::gocPolygonStipple(), vl::Shader::gocStencilFunc(), vl::Shader::gocStencilMask(), vl::Shader::gocStencilOp(), vl::Shader::gocTexEnv(), vl::Shader::gocTextureSampler(), vl::Has_Point_Sprite, vl::AABB::height(), vl::HM_NICEST, image(), vl::LO_COPY, matrix(), vl::AABB::minCorner(), vl::PF_FRONT_AND_BACK, vl::Collection< T >::push_back(), vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::resize(), vl::Vector3< T_Scalar >::s(), vl::Vector4< T_Scalar >::s(), vl::Vector2< T_Scalar >::s(), scissor(), vl::BlendFunc::set(), vl::BlendEquation::set(), vl::AlphaFunc::set(), vl::LogicOp::set(), vl::LineWidth::set(), vl::PointSize::set(), vl::PolygonStipple::set(), vl::LineStipple::set(), vl::StencilFunc::set(), vl::StencilOp::set(), vl::StencilMask::set(), vl::ColorMask::set(), vl::TexParameter::setBorderColor(), vl::Material::setFlatColor(), vl::Hint::setLineSmoothHint(), vl::TexParameter::setMagFilter(), vl::TexParameter::setMinFilter(), vl::Hint::setPointSmoothHint(), vl::TexEnv::setPointSpriteCoordReplace(), vl::Hint::setPolygonSmoohtHint(), vl::Actor::setScissor(), vl::Geometry::setTexCoordArray(), vl::TextureSampler::setTexture(), vl::Geometry::setVertexArray(), vl::TexParameter::setWrapS(), vl::TexParameter::setWrapT(), vl::Effect::shader(), vl::ArrayAbstract::size(), vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::size(), vl::Vector3< T_Scalar >::t(), vl::Vector4< T_Scalar >::t(), vl::Vector2< T_Scalar >::t(), vl::TextureMode_Clamp, vl::TextureMode_Repeat, vl::TF_RGBA, vl::TPF_LINEAR, vl::TPF_LINEAR_MIPMAP_LINEAR, vl::TPW_CLAMP, vl::TPW_REPEAT, vl::Geometry::vertexArray(), vl::AABB::width(), vl::Vector3< T_Scalar >::x(), and vl::Vector3< T_Scalar >::y().
void VectorGraphics::popState | ( | ) |
Pops the top most state in the state stack and sets it as the current state.
Definition at line 523 of file VectorGraphics.cpp.
References vl::Log::error(), and popMatrix().
|
inline |
Pushes the current matrix in the matrix stack in order to restore it later with popMatrix().
Definition at line 610 of file VectorGraphics.hpp.
Referenced by drawText(), and pushState().
void VectorGraphics::pushScissor | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Pushes the current scissor in the scissor stack in order to restore it later with popScissor() and activates a new one.
The 'x', 'y', 'w' and 'h' parameters define the new scissor rectangle. Note that such rectangle is clipped against the currently active one.
Definition at line 535 of file VectorGraphics.cpp.
References vl::Rect< T >::height(), setScissor(), vl::Rect< T >::width(), vl::Rect< T >::x(), and vl::Rect< T >::y().
void VectorGraphics::pushState | ( | ) |
Pushes the current VectorGraphics state (including the matrix state) in the state stack in order to restore it later with popState().
Definition at line 517 of file VectorGraphics.cpp.
References pushMatrix().
|
inline |
Disables the Scissor test and clipping.
Definition at line 555 of file VectorGraphics.hpp.
References vl::AlignBottom, vl::AlignLeft, and NULL.
|
inline |
Resets the current transform matrix.
Definition at line 598 of file VectorGraphics.hpp.
void VectorGraphics::rotate | ( | double | deg | ) |
Performs a rotation of 'deg' degrees around the z axis.
Definition at line 491 of file VectorGraphics.cpp.
References vl::Matrix4< double >::getRotation().
void VectorGraphics::scale | ( | double | x, |
double | y, | ||
double | z = 1.0 |
||
) |
Scales the current transform matrix.
Definition at line 501 of file VectorGraphics.cpp.
References vl::Matrix4< double >::getScaling().
|
inline |
Returns the currently active Scissor.
Definition at line 552 of file VectorGraphics.hpp.
Referenced by popScissor().
Returns the scissor stack.
Definition at line 635 of file VectorGraphics.hpp.
|
inline |
The current alpha function, see also http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml for more information.
Definition at line 480 of file VectorGraphics.hpp.
void VectorGraphics::setBlendEquation | ( | EBlendEquation | rgb_eq, |
EBlendEquation | alpha_eq | ||
) |
The current blend equation, see also http://www.opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml for more information.
Definition at line 388 of file VectorGraphics.cpp.
void VectorGraphics::setBlendFunc | ( | EBlendFactor | src_rgb, |
EBlendFactor | dst_rgb, | ||
EBlendFactor | src_alpha, | ||
EBlendFactor | dst_alpha | ||
) |
The current blending factor, see also http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml for more information.
Definition at line 372 of file VectorGraphics.cpp.
|
inline |
The current color. Note that the current color also modulates the currently active image.
Definition at line 399 of file VectorGraphics.hpp.
|
inline |
The current color mask, see also http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml for more information.
Definition at line 498 of file VectorGraphics.hpp.
|
inline |
Sets the default Font.
Definition at line 537 of file VectorGraphics.hpp.
References vl::defFontManager().
|
inline |
Sets the current Font.
Definition at line 531 of file VectorGraphics.hpp.
References vl::FontManager::acquireFont(), and vl::defFontManager().
|
inline |
Sets the current Font.
Definition at line 534 of file VectorGraphics.hpp.
References vl::Font::filePath(), setFont(), vl::Font::size(), and vl::Font::smooth().
Referenced by setFont().
|
inline |
The current image used to texture the rendered objects. Note that the current color also modulates the currently active image.
Definition at line 411 of file VectorGraphics.hpp.
|
inline |
The current line smoothing mode.
Definition at line 447 of file VectorGraphics.hpp.
void VectorGraphics::setLineStipple | ( | ELineStipple | stipple | ) |
The current line stipple, see also http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml for more information.
Definition at line 301 of file VectorGraphics.cpp.
References vl::LineStipple_Dash, vl::LineStipple_Dash4, vl::LineStipple_Dash8, vl::LineStipple_DashDot, vl::LineStipple_DashDotDot, vl::LineStipple_Dot, and vl::LineStipple_Solid.
|
inline |
The current line stipple.
Definition at line 462 of file VectorGraphics.hpp.
|
inline |
The current line width, see also http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml for more information.
Definition at line 435 of file VectorGraphics.hpp.
|
inline |
The current logic operation, see also http://www.opengl.org/sdk/docs/man/xhtml/glLogicOp.xml for more information.
Definition at line 429 of file VectorGraphics.hpp.
|
inline |
Sets the current transform matrix.
Definition at line 595 of file VectorGraphics.hpp.
Referenced by popMatrix().
|
inline |
Utility function equivalent to 'setImage(image); setPointSize(image->width());'.
Definition at line 420 of file VectorGraphics.hpp.
References vl::Image::width().
|
inline |
The current point size.
Definition at line 405 of file VectorGraphics.hpp.
|
inline |
The current point smoothing mode.
Definition at line 441 of file VectorGraphics.hpp.
|
inline |
The current polygon smoothing mode.
Definition at line 453 of file VectorGraphics.hpp.
void VectorGraphics::setPolygonStipple | ( | EPolygonStipple | stipple | ) |
The current polygon stipple, see also http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml for more information.
Definition at line 315 of file VectorGraphics.cpp.
References vl::PolygonStipple_Chain, vl::PolygonStipple_Dot, vl::PolygonStipple_HLine, vl::PolygonStipple_Solid, and vl::PolygonStipple_VLine.
|
inline |
The current polygon stipple.
Definition at line 471 of file VectorGraphics.hpp.
|
inline |
Defines the scissor box and enables the scissor test.
The parameters are considered in windows coordinates. The Scissor is used to clip the rendering against a specific rectangular area. See also http://www.opengl.org/sdk/docs/man/xhtml/glScissor.xml for more information.
Definition at line 546 of file VectorGraphics.hpp.
Referenced by pushScissor().
void VectorGraphics::setStencilFunc | ( | EFunction | func, |
int | refval, | ||
unsigned int | mask | ||
) |
The current stencil function, see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilFunc.xml for more information.
Definition at line 414 of file VectorGraphics.cpp.
|
inline |
Current stencil mask, see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml for more information.
Definition at line 513 of file VectorGraphics.hpp.
void VectorGraphics::setStencilOp | ( | EStencilOp | sfail, |
EStencilOp | dpfail, | ||
EStencilOp | dppass | ||
) |
Current stencil operation, see also http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml for more information.
Definition at line 400 of file VectorGraphics.cpp.
|
inline |
If set to 'true' the stencil test and operations will be enabled.
Definition at line 507 of file VectorGraphics.hpp.
|
inline |
The current texture mode.
Definition at line 423 of file VectorGraphics.hpp.
|
inline |
Binds the given Transform to all the Actor[s] that have been generated so far.
Definition at line 638 of file VectorGraphics.hpp.
|
inline |
Starts the drawing process.
You have to call this function before calling any of the fill* and draw* functions. This function will erase all the previously generated content of the VectorGraphics.
Definition at line 385 of file VectorGraphics.hpp.
|
inline |
Current stencil mask.
Definition at line 516 of file VectorGraphics.hpp.
|
inline |
If set to 'true' the stencil test and operations will be enabled.
Definition at line 510 of file VectorGraphics.hpp.
|
inline |
The current texture mode.
Definition at line 426 of file VectorGraphics.hpp.
void VectorGraphics::translate | ( | double | x, |
double | y, | ||
double | z = 0.0 |
||
) |
Translates the current transform matrix.
Definition at line 496 of file VectorGraphics.cpp.
References vl::Matrix4< double >::getTranslation().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:12.
© Copyright Michele Bosi. All rights reserved.