SOFA API  ca665544
Open source framework for multi-physics simuation
sofa::gl::DrawToolGL Class Reference

#include <DrawToolGL.h>

Inheritance diagram for sofa::gl::DrawToolGL:

Protected Attributes

bool mLightEnabled
 
int mPolygonMode
 
bool mWireFrameEnabled
 
gl::BasicShapesGL_Sphere< type::Vec3m_sphereUtil
 
gl::BasicShapesGL_FakeSphere< type::Vec3m_fakeSphereUtil
 

Public Member Functions

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

Protected Member Functions

virtual void internalDrawPoint (const type::Vec3 &p, const type::RGBAColor &c)
 
virtual void internalDrawPoint (const type::Vec3 &p, const type::Vec3 &n, const type::RGBAColor &c)
 
virtual void internalDrawLine (const type::Vec3 &p1, const type::Vec3 &p2, const type::RGBAColor &color)
 
virtual void internalDrawTriangle (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &normal)
 
virtual void internalDrawTriangle (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &normal, const type::RGBAColor &c)
 
virtual void internalDrawTriangle (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &normal, const type::RGBAColor &c1, const type::RGBAColor &c2, const type::RGBAColor &c3)
 
virtual void internalDrawTriangle (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &normal1, const type::Vec3 &normal2, const type::Vec3 &normal3, const type::RGBAColor &c1, const type::RGBAColor &c2, const type::RGBAColor &c3)
 
virtual void internalDrawQuad (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &p4, const type::Vec3 &normal)
 
virtual void internalDrawQuad (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &p4, const type::Vec3 &normal, const type::RGBAColor &c)
 
virtual void internalDrawQuad (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &p4, const type::Vec3 &normal, const type::RGBAColor &c1, const type::RGBAColor &c2, const type::RGBAColor &c3, const type::RGBAColor &c4)
 
virtual void internalDrawQuad (const type::Vec3 &p1, const type::Vec3 &p2, const type::Vec3 &p3, const type::Vec3 &p4, const type::Vec3 &normal1, const type::Vec3 &normal2, const type::Vec3 &normal3, const type::Vec3 &normal4, const type::RGBAColor &c1, const type::RGBAColor &c2, const type::RGBAColor &c3, const type::RGBAColor &c4)
 

Attribute details

◆ m_fakeSphereUtil

gl::BasicShapesGL_FakeSphere<type::Vec3> sofa::gl::DrawToolGL::m_fakeSphereUtil
protected

◆ m_sphereUtil

gl::BasicShapesGL_Sphere<type::Vec3> sofa::gl::DrawToolGL::m_sphereUtil
protected

◆ mLightEnabled

bool sofa::gl::DrawToolGL::mLightEnabled
protected

◆ mPolygonMode

int sofa::gl::DrawToolGL::mPolygonMode
protected

◆ mWireFrameEnabled

bool sofa::gl::DrawToolGL::mWireFrameEnabled
protected

Constructor details

◆ DrawToolGL()

sofa::gl::DrawToolGL::DrawToolGL ( )

◆ ~DrawToolGL()

sofa::gl::DrawToolGL::~DrawToolGL ( )
overridevirtual

Function details

◆ clear()

void sofa::gl::DrawToolGL::clear ( )
overridevirtual

Reimplemented from sofa::helper::visual::DrawTool.

◆ disableBlending()

void sofa::gl::DrawToolGL::disableBlending ( )
overridevirtual

◆ disableDepthTest()

void sofa::gl::DrawToolGL::disableDepthTest ( )
overridevirtual

◆ disableLighting()

void sofa::gl::DrawToolGL::disableLighting ( )
overridevirtual

◆ disablePolygonOffset()

void sofa::gl::DrawToolGL::disablePolygonOffset ( )
overridevirtual

Remove variable depth offset for polygon drawing.

Implements sofa::helper::visual::DrawTool.

◆ draw3DText()

void sofa::gl::DrawToolGL::draw3DText ( const type::Vec3 p,
float  scale,
const type::RGBAColor color,
const char text 
)
overridevirtual

◆ draw3DText_Indices()

void sofa::gl::DrawToolGL::draw3DText_Indices ( const std::vector< type::Vec3 > &  positions,
float  scale,
const type::RGBAColor color 
)
overridevirtual

◆ drawArrow() [1/3]

void sofa::gl::DrawToolGL::drawArrow ( const type::Vec3 p1,
const type::Vec3 p2,
float  radius,
const type::RGBAColor color,
int  subd = 16 
)
overridevirtual

◆ drawArrow() [2/3]

void sofa::gl::DrawToolGL::drawArrow ( const type::Vec3 p1,
const type::Vec3 p2,
float  radius,
float  coneLength,
const type::RGBAColor color,
int  subd = 16 
)
overridevirtual

◆ drawArrow() [3/3]

void sofa::gl::DrawToolGL::drawArrow ( const type::Vec3 p1,
const type::Vec3 p2,
float  radius,
float  coneLength,
float  coneRadius,
const type::RGBAColor color,
int  subd = 16 
)
overridevirtual

◆ drawBoundingBox()

void sofa::gl::DrawToolGL::drawBoundingBox ( const type::Vec3 min,
const type::Vec3 max,
float  size = 1.0 
)
overridevirtual

◆ drawCapsule()

void sofa::gl::DrawToolGL::drawCapsule ( const type::Vec3 p1,
const type::Vec3 p2,
float  radius,
const type::RGBAColor color,
int  subd = 16 
)
overridevirtual

◆ drawCircle()

void sofa::gl::DrawToolGL::drawCircle ( float  radius,
float  lineThickness,
int  resolution,
const type::RGBAColor color 
)
overridevirtual

◆ drawCone()

void sofa::gl::DrawToolGL::drawCone ( const type::Vec3 p1,
const type::Vec3 p2,
float  radius1,
float  radius2,
const type::RGBAColor color,
int  subd = 16 
)
overridevirtual

◆ drawCross()

void sofa::gl::DrawToolGL::drawCross ( const type::Vec3 p,
float  length,
const type::RGBAColor color 
)
overridevirtual

Draw a cross (3 lines) centered on p.

Implements sofa::helper::visual::DrawTool.

◆ drawCube()

void sofa::gl::DrawToolGL::drawCube ( const float radius,
const type::RGBAColor color,
const int &  subd = 16 
)
overridevirtual

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

Implements sofa::helper::visual::DrawTool.

◆ drawCylinder()

void sofa::gl::DrawToolGL::drawCylinder ( const type::Vec3 p1,
const type::Vec3 p2,
float  radius,
const type::RGBAColor color,
int  subd = 16 
)
overridevirtual

◆ drawDisk()

void sofa::gl::DrawToolGL::drawDisk ( float  radius,
double  from,
double  to,
int  resolution,
const type::RGBAColor color 
)
overridevirtual

◆ drawEllipsoid()

void sofa::gl::DrawToolGL::drawEllipsoid ( const type::Vec3 p,
const type::Vec3 radii 
)
overridevirtual

◆ drawFakeSpheres() [1/2]

void sofa::gl::DrawToolGL::drawFakeSpheres ( const std::vector< type::Vec3 > &  points,
const std::vector< float > &  radius,
const type::RGBAColor color 
)
overridevirtual

◆ drawFakeSpheres() [2/2]

void sofa::gl::DrawToolGL::drawFakeSpheres ( const std::vector< type::Vec3 > &  points,
float  radius,
const type::RGBAColor color 
)
overridevirtual

◆ drawFrame() [1/2]

void sofa::gl::DrawToolGL::drawFrame ( const type::Vec3 position,
const Quaternion orientation,
const type::Vec3f size 
)
overridevirtual

◆ drawFrame() [2/2]

void sofa::gl::DrawToolGL::drawFrame ( const type::Vec3 position,
const Quaternion orientation,
const type::Vec3f size,
const type::RGBAColor color 
)
overridevirtual

◆ drawHexahedra()

void sofa::gl::DrawToolGL::drawHexahedra ( const std::vector< type::Vec3 > &  points,
const type::RGBAColor color 
)
overridevirtual

◆ drawHexahedron()

void sofa::gl::DrawToolGL::drawHexahedron ( const type::Vec3 p0,
const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 p5,
const type::Vec3 p6,
const type::Vec3 p7,
const type::RGBAColor color 
)
overridevirtual

◆ drawInfiniteLine()

void sofa::gl::DrawToolGL::drawInfiniteLine ( const type::Vec3 point,
const type::Vec3 direction,
const type::RGBAColor color 
)
overridevirtual

◆ drawLine()

void sofa::gl::DrawToolGL::drawLine ( const type::Vec3 p1,
const type::Vec3 p2,
const type::RGBAColor color 
)
overridevirtual

◆ drawLineLoop()

void sofa::gl::DrawToolGL::drawLineLoop ( const std::vector< type::Vec3 > &  points,
float  size,
const type::RGBAColor color 
)
overridevirtual

◆ drawLines() [1/3]

void sofa::gl::DrawToolGL::drawLines ( const std::vector< type::Vec3 > &  points,
const std::vector< type::Vec2i > &  index,
float  size,
const type::RGBAColor color = type::RGBAColor::white() 
)
overridevirtual

◆ drawLines() [2/3]

void sofa::gl::DrawToolGL::drawLines ( const std::vector< type::Vec3 > &  points,
float  size,
const std::vector< type::RGBAColor > &  colors 
)
overridevirtual

◆ drawLines() [3/3]

void sofa::gl::DrawToolGL::drawLines ( const std::vector< type::Vec3 > &  points,
float  size,
const type::RGBAColor color 
)
overridevirtual

◆ drawLineStrip()

void sofa::gl::DrawToolGL::drawLineStrip ( const std::vector< type::Vec3 > &  points,
float  size,
const type::RGBAColor color 
)
overridevirtual

◆ drawPlus()

void sofa::gl::DrawToolGL::drawPlus ( const float radius,
const type::RGBAColor color,
const int &  subd = 16 
)
overridevirtual

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

Implements sofa::helper::visual::DrawTool.

◆ drawPoint() [1/2]

void sofa::gl::DrawToolGL::drawPoint ( const type::Vec3 p,
const type::RGBAColor c 
)
overridevirtual

◆ drawPoint() [2/2]

void sofa::gl::DrawToolGL::drawPoint ( const type::Vec3 p,
const type::Vec3 n,
const type::RGBAColor c 
)
overridevirtual

◆ drawPoints() [1/2]

void sofa::gl::DrawToolGL::drawPoints ( const std::vector< type::Vec3 > &  points,
float  size,
const std::vector< type::RGBAColor > &  color 
)
overridevirtual

◆ drawPoints() [2/2]

void sofa::gl::DrawToolGL::drawPoints ( const std::vector< type::Vec3 > &  points,
float  size,
const type::RGBAColor color = type::RGBAColor::white() 
)
overridevirtual

◆ drawQuad() [1/4]

void sofa::gl::DrawToolGL::drawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal 
)
overridevirtual

◆ drawQuad() [2/4]

void sofa::gl::DrawToolGL::drawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal,
const type::RGBAColor c 
)
overridevirtual

◆ drawQuad() [3/4]

void sofa::gl::DrawToolGL::drawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3,
const type::RGBAColor c4 
)
overridevirtual

◆ drawQuad() [4/4]

void sofa::gl::DrawToolGL::drawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal1,
const type::Vec3 normal2,
const type::Vec3 normal3,
const type::Vec3 normal4,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3,
const type::RGBAColor c4 
)
overridevirtual

◆ drawQuads() [1/2]

void sofa::gl::DrawToolGL::drawQuads ( const std::vector< type::Vec3 > &  points,
const std::vector< type::RGBAColor > &  colors 
)
overridevirtual

◆ drawQuads() [2/2]

void sofa::gl::DrawToolGL::drawQuads ( const std::vector< type::Vec3 > &  points,
const type::RGBAColor color 
)
overridevirtual

◆ drawScaledHexahedra()

void sofa::gl::DrawToolGL::drawScaledHexahedra ( const std::vector< type::Vec3 > &  points,
const type::RGBAColor color,
const float  scale 
)
overridevirtual

◆ drawScaledTetrahedra()

void sofa::gl::DrawToolGL::drawScaledTetrahedra ( const std::vector< type::Vec3 > &  points,
const type::RGBAColor color,
const float  scale 
)
overridevirtual

◆ drawScaledTetrahedron()

void sofa::gl::DrawToolGL::drawScaledTetrahedron ( const type::Vec3 p0,
const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::RGBAColor color,
const float  scale 
)
overridevirtual

◆ drawSphere() [1/2]

void sofa::gl::DrawToolGL::drawSphere ( const type::Vec3 p,
float  radius 
)
overridevirtual

◆ drawSphere() [2/2]

void sofa::gl::DrawToolGL::drawSphere ( const type::Vec3 p,
float  radius,
const type::RGBAColor color 
)
overridevirtual

◆ drawSpheres() [1/2]

void sofa::gl::DrawToolGL::drawSpheres ( const std::vector< type::Vec3 > &  points,
const std::vector< float > &  radius,
const type::RGBAColor color 
)
overridevirtual

◆ drawSpheres() [2/2]

void sofa::gl::DrawToolGL::drawSpheres ( const std::vector< type::Vec3 > &  points,
float  radius,
const type::RGBAColor color 
)
overridevirtual

◆ drawTetrahedra()

void sofa::gl::DrawToolGL::drawTetrahedra ( const std::vector< type::Vec3 > &  points,
const type::RGBAColor color 
)
overridevirtual

◆ drawTetrahedron()

void sofa::gl::DrawToolGL::drawTetrahedron ( const type::Vec3 p0,
const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::RGBAColor color 
)
overridevirtual

◆ drawTriangle() [1/4]

void sofa::gl::DrawToolGL::drawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal 
)
overridevirtual

◆ drawTriangle() [2/4]

void sofa::gl::DrawToolGL::drawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal,
const type::RGBAColor c 
)
overridevirtual

◆ drawTriangle() [3/4]

void sofa::gl::DrawToolGL::drawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3 
)
overridevirtual

◆ drawTriangle() [4/4]

void sofa::gl::DrawToolGL::drawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal1,
const type::Vec3 normal2,
const type::Vec3 normal3,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3 
)
overridevirtual

◆ drawTriangleFan()

void sofa::gl::DrawToolGL::drawTriangleFan ( const std::vector< type::Vec3 > &  points,
const std::vector< type::Vec3 > &  normal,
const type::RGBAColor color 
)
overridevirtual

◆ drawTriangles() [1/6]

void sofa::gl::DrawToolGL::drawTriangles ( const std::vector< type::Vec3 > &  points,
const std::vector< type::RGBAColor > &  color 
)
overridevirtual

◆ drawTriangles() [2/6]

void sofa::gl::DrawToolGL::drawTriangles ( const std::vector< type::Vec3 > &  points,
const std::vector< type::Vec3 > &  normal,
const std::vector< type::RGBAColor > &  color 
)
overridevirtual

◆ drawTriangles() [3/6]

void sofa::gl::DrawToolGL::drawTriangles ( const std::vector< type::Vec3 > &  points,
const std::vector< type::Vec3i > &  index,
const std::vector< type::Vec3 > &  normal,
const std::vector< type::RGBAColor > &  color 
)
overridevirtual

◆ drawTriangles() [4/6]

void sofa::gl::DrawToolGL::drawTriangles ( const std::vector< type::Vec3 > &  points,
const std::vector< type::Vec3i > &  index,
const std::vector< type::Vec3 > &  normal,
const type::RGBAColor color = type::RGBAColor::white() 
)
overridevirtual

◆ drawTriangles() [5/6]

void sofa::gl::DrawToolGL::drawTriangles ( const std::vector< type::Vec3 > &  points,
const type::RGBAColor color 
)
overridevirtual

◆ drawTriangles() [6/6]

void sofa::gl::DrawToolGL::drawTriangles ( const std::vector< type::Vec3 > &  points,
const type::Vec3 normal,
const type::RGBAColor color 
)
overridevirtual

◆ drawTriangleStrip()

void sofa::gl::DrawToolGL::drawTriangleStrip ( const std::vector< type::Vec3 > &  points,
const std::vector< type::Vec3 > &  normal,
const type::RGBAColor color 
)
overridevirtual

◆ enableBlending()

void sofa::gl::DrawToolGL::enableBlending ( )
overridevirtual

◆ enableDepthTest()

void sofa::gl::DrawToolGL::enableDepthTest ( )
overridevirtual

◆ enableLighting()

void sofa::gl::DrawToolGL::enableLighting ( )
overridevirtual

◆ enablePolygonOffset()

void sofa::gl::DrawToolGL::enablePolygonOffset ( float  factor,
float  units 
)
overridevirtual

Set the scale and units used to add depth values

Parameters
factor: Specifies a scale factor that is used to create a variable depth offset for each polygon. The initial value is 0.
units: Is multiplied by an implementation-specific value to create a constant depth offset. The initial value is 0.

Implements sofa::helper::visual::DrawTool.

◆ getLightEnabled()

bool sofa::gl::DrawToolGL::getLightEnabled ( )
inline

◆ getPolygonMode()

int sofa::gl::DrawToolGL::getPolygonMode ( )
inline

◆ getWireFrameEnabled()

bool sofa::gl::DrawToolGL::getWireFrameEnabled ( )
inline

◆ init()

void sofa::gl::DrawToolGL::init ( void  )
overridevirtual

◆ internalDrawLine()

void sofa::gl::DrawToolGL::internalDrawLine ( const type::Vec3 p1,
const type::Vec3 p2,
const type::RGBAColor color 
)
protectedvirtual

◆ internalDrawPoint() [1/2]

void sofa::gl::DrawToolGL::internalDrawPoint ( const type::Vec3 p,
const type::RGBAColor c 
)
protectedvirtual

◆ internalDrawPoint() [2/2]

void sofa::gl::DrawToolGL::internalDrawPoint ( const type::Vec3 p,
const type::Vec3 n,
const type::RGBAColor c 
)
protectedvirtual

◆ internalDrawQuad() [1/4]

void sofa::gl::DrawToolGL::internalDrawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal 
)
protectedvirtual

◆ internalDrawQuad() [2/4]

void sofa::gl::DrawToolGL::internalDrawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal,
const type::RGBAColor c 
)
protectedvirtual

◆ internalDrawQuad() [3/4]

void sofa::gl::DrawToolGL::internalDrawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3,
const type::RGBAColor c4 
)
protectedvirtual

◆ internalDrawQuad() [4/4]

void sofa::gl::DrawToolGL::internalDrawQuad ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 p4,
const type::Vec3 normal1,
const type::Vec3 normal2,
const type::Vec3 normal3,
const type::Vec3 normal4,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3,
const type::RGBAColor c4 
)
protectedvirtual

◆ internalDrawSphere()

void sofa::gl::DrawToolGL::internalDrawSphere ( const type::Vec3 center,
const float radius,
const unsigned int  rings,
const unsigned int  sectors 
)

◆ internalDrawSpheres()

void sofa::gl::DrawToolGL::internalDrawSpheres ( const type::vector< type::Vec3 > &  centers,
const float radius,
const unsigned int  rings,
const unsigned int  sectors 
)

◆ internalDrawTriangle() [1/4]

void sofa::gl::DrawToolGL::internalDrawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal 
)
protectedvirtual

◆ internalDrawTriangle() [2/4]

void sofa::gl::DrawToolGL::internalDrawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal,
const type::RGBAColor c 
)
protectedvirtual

◆ internalDrawTriangle() [3/4]

void sofa::gl::DrawToolGL::internalDrawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3 
)
protectedvirtual

◆ internalDrawTriangle() [4/4]

void sofa::gl::DrawToolGL::internalDrawTriangle ( const type::Vec3 p1,
const type::Vec3 p2,
const type::Vec3 p3,
const type::Vec3 normal1,
const type::Vec3 normal2,
const type::Vec3 normal3,
const type::RGBAColor c1,
const type::RGBAColor c2,
const type::RGBAColor c3 
)
protectedvirtual

◆ multMatrix()

void sofa::gl::DrawToolGL::multMatrix ( float glTransform)
overridevirtual

◆ popMatrix()

void sofa::gl::DrawToolGL::popMatrix ( )
overridevirtual

◆ pushMatrix()

void sofa::gl::DrawToolGL::pushMatrix ( )
overridevirtual

◆ readPixels()

void sofa::gl::DrawToolGL::readPixels ( int  x,
int  y,
int  w,
int  h,
float rgb,
float z = nullptr 
)
overridevirtual

◆ resetMaterial() [1/2]

void sofa::gl::DrawToolGL::resetMaterial ( )
overridevirtual

◆ resetMaterial() [2/2]

void sofa::gl::DrawToolGL::resetMaterial ( const type::RGBAColor color)
overridevirtual

◆ restoreLastState()

void sofa::gl::DrawToolGL::restoreLastState ( )
overridevirtual

◆ saveLastState()

void sofa::gl::DrawToolGL::saveLastState ( )
overridevirtual

◆ scale()

void sofa::gl::DrawToolGL::scale ( float  s)
overridevirtual

◆ setLightingEnabled()

void sofa::gl::DrawToolGL::setLightingEnabled ( bool  _isAnabled)
overridevirtual

◆ setMaterial()

void sofa::gl::DrawToolGL::setMaterial ( const type::RGBAColor color)
overridevirtual

◆ setPolygonMode()

void sofa::gl::DrawToolGL::setPolygonMode ( int  _mode,
bool  _wireframe 
)
overridevirtual

◆ SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER() [1/5]

sofa::gl::DrawToolGL::SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER ( RGBAColor  ,
sofa::type::RGBAColor   
)

◆ SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER() [2/5]

sofa::gl::DrawToolGL::SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER ( Vec2i  ,
sofa::type::Vec2i   
)

◆ SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER() [3/5]

sofa::gl::DrawToolGL::SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER ( Vec3f  ,
sofa::type::Vec3f   
)

◆ SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER() [4/5]

sofa::gl::DrawToolGL::SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER ( Vec3i  ,
sofa::type::Vec3i   
)

◆ SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER() [5/5]

sofa::gl::DrawToolGL::SOFA_ATTRIBUTE_REPLACED__TYPEMEMBER ( Vector3  ,
sofa::type::Vec3   
)

◆ translate()

void sofa::gl::DrawToolGL::translate ( float  x,
float  y,
float  z 
)
overridevirtual

◆ writeOverlayText()

void sofa::gl::DrawToolGL::writeOverlayText ( int  x,
int  y,
unsigned  fontSize,
const type::RGBAColor color,
const char text 
)
overridevirtual

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

Implements sofa::helper::visual::DrawTool.