SOFA API  7226d276
Open source framework for multi-physics simuation
sofa::helper::visual::DrawTool Struct Referenceabstract

#include <DrawTool.h>

Utility class to perform debug drawing. More...

Inheritance diagram for sofa::helper::visual::DrawTool:

Detailed Description

Utility class to perform debug drawing.

Class which contains a set of methods to perform minimal debug drawing regardless of the graphics API used. Components receive a pointer to the DrawTool through the VisualParams parameter of their draw method. Sofa provides a default concrete implementation of this class for the OpenGL API with the DrawToolGL class. k

Public Member Functions

 DrawTool ()
 
virtual ~DrawTool ()
 
virtual void init ()=0
 
virtual void enableBlending ()=0
 
virtual void disableBlending ()=0
 
virtual void enableLighting ()=0
 
virtual void disableLighting ()=0
 
virtual void enableDepthTest ()=0
 
virtual void disableDepthTest ()=0
 
virtual void clear ()
 
 StateLifeCycle ()=delete
 
 StateLifeCycle (const StateLifeCycle &)=delete
 
 StateLifeCycle (DrawTool *drawTool)
 
 ~StateLifeCycle ()
 
Primitive rendering methods
virtual void drawPoints (const std::vector< Vec3 > &points, float size, const RGBAColor &color)=0
 
virtual void drawPoints (const std::vector< Vec3 > &points, float size, const std::vector< RGBAColor > &color)=0
 
virtual void drawLine (const Vec3 &p1, const Vec3 &p2, const RGBAColor &color)=0
 
virtual void drawInfiniteLine (const Vec3 &point, const Vec3 &direction, const RGBAColor &color, const bool &vanishing=false)=0
 
virtual void drawInfiniteLine (const Vec3 &point, const Vec3 &direction, const float &size, const RGBAColor &color, const bool &vanishing=false)=0
 
virtual void drawLines (const std::vector< Vec3 > &points, float size, const RGBAColor &color)=0
 
virtual void drawLines (const std::vector< Vec3 > &points, float size, const std::vector< RGBAColor > &colors)=0
 
virtual void drawLines (const std::vector< Vec3 > &points, const std::vector< Vec2i > &index, float size, const RGBAColor &color)=0
 
virtual void drawLineStrip (const std::vector< Vec3 > &points, float size, const RGBAColor &color)=0
 
virtual void drawLineStrip (const std::vector< Vec3 > &points, float size, const std::vector< RGBAColor > &colors)=0
 
virtual void drawLineLoop (const std::vector< Vec3 > &points, float size, const RGBAColor &color)=0
 
virtual void drawDisk (float radius, double from, double to, int resolution, const RGBAColor &color)=0
 
virtual void drawCircle (float radius, float lineThickness, int resolution, const RGBAColor &color)=0
 
virtual void drawTriangles (const std::vector< Vec3 > &points, const RGBAColor &color)=0
 
virtual void drawTriangles (const std::vector< Vec3 > &points, const Vec3 &normal, const RGBAColor &color)=0
 
virtual void drawTriangles (const std::vector< Vec3 > &points, const std::vector< Vec3i > &index, const std::vector< Vec3 > &normal, const RGBAColor &color)=0
 
virtual void drawTriangles (const std::vector< Vec3 > &points, const std::vector< Vec3i > &index, const std::vector< Vec3 > &normal, const std::vector< RGBAColor > &color)=0
 
virtual void drawTriangles (const std::vector< Vec3 > &points, const std::vector< RGBAColor > &color)=0
 
virtual void drawTriangles (const std::vector< Vec3 > &points, const std::vector< Vec3 > &normal, const std::vector< RGBAColor > &color)=0
 
virtual void drawTriangleStrip (const std::vector< Vec3 > &points, const std::vector< Vec3 > &normal, const RGBAColor &color)=0
 
virtual void drawTriangleFan (const std::vector< Vec3 > &points, const std::vector< Vec3 > &normal, const RGBAColor &color)=0
 
virtual void drawFrame (const Vec3 &position, const Quaternion &orientation, const Vec3f &size)=0
 
virtual void drawFrame (const Vec3 &position, const Quaternion &orientation, const Vec3f &size, const RGBAColor &color)=0
 
virtual void drawSpheres (const std::vector< Vec3 > &points, const std::vector< float > &radius, const RGBAColor &color)=0
 
virtual void drawSpheres (const std::vector< Vec3 > &points, float radius, const RGBAColor &color)=0
 
virtual void drawFakeSpheres (const std::vector< Vec3 > &points, const std::vector< float > &radius, const RGBAColor &color)=0
 
virtual void drawFakeSpheres (const std::vector< Vec3 > &points, float radius, const RGBAColor &color)=0
 
virtual void drawCone (const Vec3 &p1, const Vec3 &p2, float radius1, float radius2, const RGBAColor &color, int subd=16)=0
 
virtual void drawCube (const float &radius, const RGBAColor &color, const int &subd=16)=0
 Draw a cube of size one centered on the current point. More...
 
virtual void drawCylinder (const Vec3 &p1, const Vec3 &p2, float radius, const RGBAColor &color, int subd=16)=0
 
virtual void drawCapsule (const Vec3 &p1, const Vec3 &p2, float radius, const RGBAColor &color, int subd=16)=0
 
virtual void drawArrow (const Vec3 &p1, const Vec3 &p2, float radius, const RGBAColor &color, int subd=16)=0
 
virtual void drawArrow (const Vec3 &p1, const Vec3 &p2, float radius, float coneLength, const RGBAColor &color, int subd=16)=0
 
virtual void drawArrow (const Vec3 &p1, const Vec3 &p2, float radius, float coneLength, float coneRadius, const RGBAColor &color, int subd=16)=0
 
virtual void drawCross (const Vec3 &p, float length, const RGBAColor &color)=0
 Draw a cross (3 lines) centered on p. More...
 
virtual void drawPlus (const float &radius, const RGBAColor &color, const int &subd=16)=0
 Draw a plus sign of size one centered on the current point. More...
 
virtual void drawPoint (const Vec3 &p, const RGBAColor &c)=0
 
virtual void drawPoint (const Vec3 &p, const Vec3 &n, const RGBAColor &c)=0
 
virtual void drawTriangle (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &normal)=0
 
virtual void drawTriangle (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &normal, const RGBAColor &c)=0
 
virtual void drawTriangle (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &normal, const RGBAColor &c1, const RGBAColor &c2, const RGBAColor &c3)=0
 
virtual void drawTriangle (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &normal1, const Vec3 &normal2, const Vec3 &normal3, const RGBAColor &c1, const RGBAColor &c2, const RGBAColor &c3)=0
 
virtual void drawQuad (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &p4, const Vec3 &normal)=0
 
virtual void drawQuad (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &p4, const Vec3 &normal, const RGBAColor &c)=0
 
virtual void drawQuad (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &p4, const Vec3 &normal, const RGBAColor &c1, const RGBAColor &c2, const RGBAColor &c3, const RGBAColor &c4)=0
 
virtual void drawQuad (const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &p4, const Vec3 &normal1, const Vec3 &normal2, const Vec3 &normal3, const Vec3 &normal4, const RGBAColor &c1, const RGBAColor &c2, const RGBAColor &c3, const RGBAColor &c4)=0
 
virtual void drawQuads (const std::vector< Vec3 > &points, const RGBAColor &color)=0
 
virtual void drawQuads (const std::vector< Vec3 > &points, const std::vector< RGBAColor > &colors)=0
 
virtual void drawTetrahedron (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const RGBAColor &color)=0
 
virtual void drawScaledTetrahedron (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const RGBAColor &color, const float scale)=0
 
virtual void drawTetrahedra (const std::vector< Vec3 > &points, const RGBAColor &color)=0
 
virtual void drawScaledTetrahedra (const std::vector< Vec3 > &points, const RGBAColor &color, const float scale)=0
 
virtual void drawHexahedron (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &p4, const Vec3 &p5, const Vec3 &p6, const Vec3 &p7, const RGBAColor &color)=0
 
virtual void drawHexahedra (const std::vector< Vec3 > &points, const RGBAColor &color)=0
 
virtual void drawScaledHexahedra (const std::vector< Vec3 > &points, const RGBAColor &color, const float scale)=0
 
virtual void drawSphere (const Vec3 &p, float radius)=0
 
virtual void drawSphere (const Vec3 &p, float radius, const RGBAColor &color)=0
 
virtual void drawEllipsoid (const Vec3 &p, const Vec3 &radii)=0
 
virtual void drawBoundingBox (const Vec3 &min, const Vec3 &max, float size=1.0)=0
 
virtual void draw3DText (const Vec3 &p, float scale, const RGBAColor &color, const char *text)=0
 
virtual void draw3DText_Indices (const std::vector< Vec3 > &positions, float scale, const RGBAColor &color)=0
 
Transformation methods.
virtual void pushMatrix ()=0
 
virtual void popMatrix ()=0
 
virtual void multMatrix (float *)=0
 
virtual void scale (float)=0
 
virtual void translate (float x, float y, float z)=0
 
Drawing style methods.
virtual void setMaterial (const RGBAColor &color)=0
 
virtual void resetMaterial (const RGBAColor &color)=0
 
virtual void resetMaterial ()=0
 
virtual void setPolygonMode (int _mode, bool _wireframe)=0
 
virtual void setLightingEnabled (bool _isAnabled)=0
 
States (save/restore)
virtual void saveLastState ()=0
 
virtual void restoreLastState ()=0
 
StateLifeCycle makeStateLifeCycle ()
 
Overlay methods
virtual void writeOverlayText (int x, int y, unsigned fontSize, const RGBAColor &color, const char *text)=0
 draw 2D text at position (x,y) from top-left corner More...
 
virtual void enablePolygonOffset (float factor, float units)=0
 Allow a variable depth offset for polygon drawing. More...
 
virtual void disablePolygonOffset ()=0
 Remove variable depth offset for polygon drawing. More...
 
virtual void readPixels (int x, int y, int w, int h, float *rgb, float *z=nullptr)=0
 

Constructor details

◆ DrawTool()

sofa::helper::visual::DrawTool::DrawTool ( )
inline

◆ ~DrawTool()

virtual sofa::helper::visual::DrawTool::~DrawTool ( )
inlinevirtual

◆ ~StateLifeCycle()

sofa::helper::visual::DrawTool::~StateLifeCycle ( )

Function details

◆ clear()

virtual void sofa::helper::visual::DrawTool::clear ( )
inlinevirtual

Reimplemented in sofa::gl::DrawToolGL.

◆ disableBlending()

virtual void sofa::helper::visual::DrawTool::disableBlending ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ disableDepthTest()

virtual void sofa::helper::visual::DrawTool::disableDepthTest ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ disableLighting()

virtual void sofa::helper::visual::DrawTool::disableLighting ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ disablePolygonOffset()

virtual void sofa::helper::visual::DrawTool::disablePolygonOffset ( )
pure virtual

Remove variable depth offset for polygon drawing.

Implemented in sofa::gl::DrawToolGL.

◆ draw3DText()

virtual void sofa::helper::visual::DrawTool::draw3DText ( const Vec3 &  p,
float  scale,
const RGBAColor &  color,
const char *  text 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ draw3DText_Indices()

virtual void sofa::helper::visual::DrawTool::draw3DText_Indices ( const std::vector< Vec3 > &  positions,
float  scale,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawArrow() [1/3]

virtual void sofa::helper::visual::DrawTool::drawArrow ( const Vec3 &  p1,
const Vec3 &  p2,
float  radius,
const RGBAColor &  color,
int  subd = 16 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawArrow() [2/3]

virtual void sofa::helper::visual::DrawTool::drawArrow ( const Vec3 &  p1,
const Vec3 &  p2,
float  radius,
float  coneLength,
const RGBAColor &  color,
int  subd = 16 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawArrow() [3/3]

virtual void sofa::helper::visual::DrawTool::drawArrow ( const Vec3 &  p1,
const Vec3 &  p2,
float  radius,
float  coneLength,
float  coneRadius,
const RGBAColor &  color,
int  subd = 16 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawBoundingBox()

virtual void sofa::helper::visual::DrawTool::drawBoundingBox ( const Vec3 &  min,
const Vec3 &  max,
float  size = 1.0 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawCapsule()

virtual void sofa::helper::visual::DrawTool::drawCapsule ( const Vec3 &  p1,
const Vec3 &  p2,
float  radius,
const RGBAColor &  color,
int  subd = 16 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawCircle()

virtual void sofa::helper::visual::DrawTool::drawCircle ( float  radius,
float  lineThickness,
int  resolution,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawCone()

virtual void sofa::helper::visual::DrawTool::drawCone ( const Vec3 &  p1,
const Vec3 &  p2,
float  radius1,
float  radius2,
const RGBAColor &  color,
int  subd = 16 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawCross()

virtual void sofa::helper::visual::DrawTool::drawCross ( const Vec3 &  p,
float  length,
const RGBAColor &  color 
)
pure virtual

Draw a cross (3 lines) centered on p.

Implemented in sofa::gl::DrawToolGL.

◆ drawCube()

virtual void sofa::helper::visual::DrawTool::drawCube ( const float &  radius,
const RGBAColor &  color,
const int &  subd = 16 
)
pure virtual

Draw a cube of size one centered on the current point.

Implemented in sofa::gl::DrawToolGL.

◆ drawCylinder()

virtual void sofa::helper::visual::DrawTool::drawCylinder ( const Vec3 &  p1,
const Vec3 &  p2,
float  radius,
const RGBAColor &  color,
int  subd = 16 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawDisk()

virtual void sofa::helper::visual::DrawTool::drawDisk ( float  radius,
double  from,
double  to,
int  resolution,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawEllipsoid()

virtual void sofa::helper::visual::DrawTool::drawEllipsoid ( const Vec3 &  p,
const Vec3 &  radii 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawFakeSpheres() [1/2]

virtual void sofa::helper::visual::DrawTool::drawFakeSpheres ( const std::vector< Vec3 > &  points,
const std::vector< float > &  radius,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawFakeSpheres() [2/2]

virtual void sofa::helper::visual::DrawTool::drawFakeSpheres ( const std::vector< Vec3 > &  points,
float  radius,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawFrame() [1/2]

virtual void sofa::helper::visual::DrawTool::drawFrame ( const Vec3 &  position,
const Quaternion &  orientation,
const Vec3f &  size 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawFrame() [2/2]

virtual void sofa::helper::visual::DrawTool::drawFrame ( const Vec3 &  position,
const Quaternion &  orientation,
const Vec3f &  size,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawHexahedra()

virtual void sofa::helper::visual::DrawTool::drawHexahedra ( const std::vector< Vec3 > &  points,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawHexahedron()

virtual void sofa::helper::visual::DrawTool::drawHexahedron ( const Vec3 &  p0,
const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  p4,
const Vec3 &  p5,
const Vec3 &  p6,
const Vec3 &  p7,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawInfiniteLine() [1/2]

virtual void sofa::helper::visual::DrawTool::drawInfiniteLine ( const Vec3 &  point,
const Vec3 &  direction,
const float &  size,
const RGBAColor &  color,
const bool &  vanishing = false 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawInfiniteLine() [2/2]

virtual void sofa::helper::visual::DrawTool::drawInfiniteLine ( const Vec3 &  point,
const Vec3 &  direction,
const RGBAColor &  color,
const bool &  vanishing = false 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawLine()

virtual void sofa::helper::visual::DrawTool::drawLine ( const Vec3 &  p1,
const Vec3 &  p2,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawLineLoop()

virtual void sofa::helper::visual::DrawTool::drawLineLoop ( const std::vector< Vec3 > &  points,
float  size,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawLines() [1/3]

virtual void sofa::helper::visual::DrawTool::drawLines ( const std::vector< Vec3 > &  points,
const std::vector< Vec2i > &  index,
float  size,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawLines() [2/3]

virtual void sofa::helper::visual::DrawTool::drawLines ( const std::vector< Vec3 > &  points,
float  size,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawLines() [3/3]

virtual void sofa::helper::visual::DrawTool::drawLines ( const std::vector< Vec3 > &  points,
float  size,
const std::vector< RGBAColor > &  colors 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawLineStrip() [1/2]

virtual void sofa::helper::visual::DrawTool::drawLineStrip ( const std::vector< Vec3 > &  points,
float  size,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawLineStrip() [2/2]

virtual void sofa::helper::visual::DrawTool::drawLineStrip ( const std::vector< Vec3 > &  points,
float  size,
const std::vector< RGBAColor > &  colors 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawPlus()

virtual void sofa::helper::visual::DrawTool::drawPlus ( const float &  radius,
const RGBAColor &  color,
const int &  subd = 16 
)
pure virtual

Draw a plus sign of size one centered on the current point.

Implemented in sofa::gl::DrawToolGL.

◆ drawPoint() [1/2]

virtual void sofa::helper::visual::DrawTool::drawPoint ( const Vec3 &  p,
const RGBAColor &  c 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawPoint() [2/2]

virtual void sofa::helper::visual::DrawTool::drawPoint ( const Vec3 &  p,
const Vec3 &  n,
const RGBAColor &  c 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawPoints() [1/2]

virtual void sofa::helper::visual::DrawTool::drawPoints ( const std::vector< Vec3 > &  points,
float  size,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawPoints() [2/2]

virtual void sofa::helper::visual::DrawTool::drawPoints ( const std::vector< Vec3 > &  points,
float  size,
const std::vector< RGBAColor > &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawQuad() [1/4]

virtual void sofa::helper::visual::DrawTool::drawQuad ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  p4,
const Vec3 &  normal 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawQuad() [2/4]

virtual void sofa::helper::visual::DrawTool::drawQuad ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  p4,
const Vec3 &  normal,
const RGBAColor &  c 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawQuad() [3/4]

virtual void sofa::helper::visual::DrawTool::drawQuad ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  p4,
const Vec3 &  normal,
const RGBAColor &  c1,
const RGBAColor &  c2,
const RGBAColor &  c3,
const RGBAColor &  c4 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawQuad() [4/4]

virtual void sofa::helper::visual::DrawTool::drawQuad ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  p4,
const Vec3 &  normal1,
const Vec3 &  normal2,
const Vec3 &  normal3,
const Vec3 &  normal4,
const RGBAColor &  c1,
const RGBAColor &  c2,
const RGBAColor &  c3,
const RGBAColor &  c4 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawQuads() [1/2]

virtual void sofa::helper::visual::DrawTool::drawQuads ( const std::vector< Vec3 > &  points,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawQuads() [2/2]

virtual void sofa::helper::visual::DrawTool::drawQuads ( const std::vector< Vec3 > &  points,
const std::vector< RGBAColor > &  colors 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawScaledHexahedra()

virtual void sofa::helper::visual::DrawTool::drawScaledHexahedra ( const std::vector< Vec3 > &  points,
const RGBAColor &  color,
const float  scale 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawScaledTetrahedra()

virtual void sofa::helper::visual::DrawTool::drawScaledTetrahedra ( const std::vector< Vec3 > &  points,
const RGBAColor &  color,
const float  scale 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawScaledTetrahedron()

virtual void sofa::helper::visual::DrawTool::drawScaledTetrahedron ( const Vec3 &  p0,
const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const RGBAColor &  color,
const float  scale 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawSphere() [1/2]

virtual void sofa::helper::visual::DrawTool::drawSphere ( const Vec3 &  p,
float  radius 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawSphere() [2/2]

virtual void sofa::helper::visual::DrawTool::drawSphere ( const Vec3 &  p,
float  radius,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawSpheres() [1/2]

virtual void sofa::helper::visual::DrawTool::drawSpheres ( const std::vector< Vec3 > &  points,
const std::vector< float > &  radius,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawSpheres() [2/2]

virtual void sofa::helper::visual::DrawTool::drawSpheres ( const std::vector< Vec3 > &  points,
float  radius,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTetrahedra()

virtual void sofa::helper::visual::DrawTool::drawTetrahedra ( const std::vector< Vec3 > &  points,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTetrahedron()

virtual void sofa::helper::visual::DrawTool::drawTetrahedron ( const Vec3 &  p0,
const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangle() [1/4]

virtual void sofa::helper::visual::DrawTool::drawTriangle ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  normal 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangle() [2/4]

virtual void sofa::helper::visual::DrawTool::drawTriangle ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  normal,
const RGBAColor &  c 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangle() [3/4]

virtual void sofa::helper::visual::DrawTool::drawTriangle ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  normal,
const RGBAColor &  c1,
const RGBAColor &  c2,
const RGBAColor &  c3 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangle() [4/4]

virtual void sofa::helper::visual::DrawTool::drawTriangle ( const Vec3 &  p1,
const Vec3 &  p2,
const Vec3 &  p3,
const Vec3 &  normal1,
const Vec3 &  normal2,
const Vec3 &  normal3,
const RGBAColor &  c1,
const RGBAColor &  c2,
const RGBAColor &  c3 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangleFan()

virtual void sofa::helper::visual::DrawTool::drawTriangleFan ( const std::vector< Vec3 > &  points,
const std::vector< Vec3 > &  normal,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangles() [1/6]

virtual void sofa::helper::visual::DrawTool::drawTriangles ( const std::vector< Vec3 > &  points,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangles() [2/6]

virtual void sofa::helper::visual::DrawTool::drawTriangles ( const std::vector< Vec3 > &  points,
const std::vector< RGBAColor > &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangles() [3/6]

virtual void sofa::helper::visual::DrawTool::drawTriangles ( const std::vector< Vec3 > &  points,
const std::vector< Vec3 > &  normal,
const std::vector< RGBAColor > &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangles() [4/6]

virtual void sofa::helper::visual::DrawTool::drawTriangles ( const std::vector< Vec3 > &  points,
const std::vector< Vec3i > &  index,
const std::vector< Vec3 > &  normal,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangles() [5/6]

virtual void sofa::helper::visual::DrawTool::drawTriangles ( const std::vector< Vec3 > &  points,
const std::vector< Vec3i > &  index,
const std::vector< Vec3 > &  normal,
const std::vector< RGBAColor > &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangles() [6/6]

virtual void sofa::helper::visual::DrawTool::drawTriangles ( const std::vector< Vec3 > &  points,
const Vec3 &  normal,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ drawTriangleStrip()

virtual void sofa::helper::visual::DrawTool::drawTriangleStrip ( const std::vector< Vec3 > &  points,
const std::vector< Vec3 > &  normal,
const RGBAColor &  color 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ enableBlending()

virtual void sofa::helper::visual::DrawTool::enableBlending ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ enableDepthTest()

virtual void sofa::helper::visual::DrawTool::enableDepthTest ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ enableLighting()

virtual void sofa::helper::visual::DrawTool::enableLighting ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ enablePolygonOffset()

virtual void sofa::helper::visual::DrawTool::enablePolygonOffset ( float  factor,
float  units 
)
pure virtual

Allow a variable depth offset for polygon drawing.

Implemented in sofa::gl::DrawToolGL.

◆ init()

virtual void sofa::helper::visual::DrawTool::init ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ makeStateLifeCycle()

DrawTool::StateLifeCycle sofa::helper::visual::DrawTool::makeStateLifeCycle ( )

Use RAII to bind state save and restore to the returned object: saveLastState is called at object creation, and restoreLastState is called when the object is destroyed.

◆ multMatrix()

virtual void sofa::helper::visual::DrawTool::multMatrix ( float *  )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ popMatrix()

virtual void sofa::helper::visual::DrawTool::popMatrix ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ pushMatrix()

virtual void sofa::helper::visual::DrawTool::pushMatrix ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ readPixels()

virtual void sofa::helper::visual::DrawTool::readPixels ( int  x,
int  y,
int  w,
int  h,
float *  rgb,
float *  z = nullptr 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ resetMaterial() [1/2]

virtual void sofa::helper::visual::DrawTool::resetMaterial ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ resetMaterial() [2/2]

virtual void sofa::helper::visual::DrawTool::resetMaterial ( const RGBAColor &  color)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ restoreLastState()

virtual void sofa::helper::visual::DrawTool::restoreLastState ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ saveLastState()

virtual void sofa::helper::visual::DrawTool::saveLastState ( )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ scale()

virtual void sofa::helper::visual::DrawTool::scale ( float  )
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ setLightingEnabled()

virtual void sofa::helper::visual::DrawTool::setLightingEnabled ( bool  _isAnabled)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ setMaterial()

virtual void sofa::helper::visual::DrawTool::setMaterial ( const RGBAColor &  color)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ setPolygonMode()

virtual void sofa::helper::visual::DrawTool::setPolygonMode ( int  _mode,
bool  _wireframe 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ StateLifeCycle() [1/3]

sofa::helper::visual::DrawTool::StateLifeCycle ( )
delete

◆ StateLifeCycle() [2/3]

sofa::helper::visual::DrawTool::StateLifeCycle ( const StateLifeCycle &  )
delete

◆ StateLifeCycle() [3/3]

sofa::helper::visual::DrawTool::StateLifeCycle ( DrawTool *  drawTool)

◆ translate()

virtual void sofa::helper::visual::DrawTool::translate ( float  x,
float  y,
float  z 
)
pure virtual

Implemented in sofa::gl::DrawToolGL.

◆ writeOverlayText()

virtual void sofa::helper::visual::DrawTool::writeOverlayText ( int  x,
int  y,
unsigned  fontSize,
const RGBAColor &  color,
const char *  text 
)
pure virtual

draw 2D text at position (x,y) from top-left corner

Implemented in sofa::gl::DrawToolGL.