class mrpt::opengl::CSimpleLine

A line segment.

See also:

opengl::COpenGLScene

#include <mrpt/opengl/CSimpleLine.h>

class CSimpleLine: public mrpt::opengl::CRenderizableShaderWireFrame
{
public:
    // construction

    CSimpleLine(
        float x0 = 0,
        float y0 = 0,
        float z0 = 0,
        float x1 = 0,
        float y1 = 0,
        float z1 = 0,
        float lineWidth = 1,
        bool antiAliasing = true
        );

    //
methods

    void setLineCoords(
        const mrpt::math::TPoint3Df& p0,
        const mrpt::math::TPoint3Df& p1
        );

    mrpt::math::TPoint3Df getLineStart() const;
    mrpt::math::TPoint3Df getLineEnd() const;
    void setLineCoords(float x0, float y0, float z0, float x1, float y1, float z1);
    void getLineCoords(float& x0, float& y0, float& z0, float& x1, float& y1, float& z1) const;
    virtual void onUpdateBuffers_Wireframe();
    virtual mrpt::math::TBoundingBox getBoundingBox() const;
};

Inherited Members

public:
    // structs

    struct RenderContext;

    //
methods

    virtual void render(const RenderContext& rc) const = 0;
    virtual void renderUpdateBuffers() const = 0;
    virtual shader_list_t requiredShaders() const;
    virtual auto getBoundingBox() const = 0;
    virtual void freeOpenGLResources() = 0;
    virtual void onUpdateBuffers_Wireframe() = 0;

Construction

CSimpleLine(
    float x0 = 0,
    float y0 = 0,
    float z0 = 0,
    float x1 = 0,
    float y1 = 0,
    float z1 = 0,
    float lineWidth = 1,
    bool antiAliasing = true
    )

Constructor.

Methods

void setLineCoords(float x0, float y0, float z0, float x1, float y1, float z1)

Deprecated (MRPT 2.3.1)

void getLineCoords(
    float& x0,
    float& y0,
    float& z0,
    float& x1,
    float& y1,
    float& z1
    ) const

Deprecated (MRPT 2.3.1)

virtual void onUpdateBuffers_Wireframe()

Must be implemented in derived classes to update the geometric entities to be drawn in “m_*_buffer” fields.

virtual mrpt::math::TBoundingBox getBoundingBox() const

Evaluates the bounding box of this object (including possible children) in the coordinate frame of the object parent.