class mrpt::opengl::LinesProxy
Overview
GPU-side proxy for rendering lines and wireframes.
This proxy handles rendering of any CVisualObject that uses the WIREFRAME shader, such as:
CSetOfLines
CSimpleLine
CGridPlaneXY / CGridPlaneXZ
CAxis
Wireframe rendering of meshes
Any object derived from VisualObjectParams_Lines
The proxy manages:
Vertex buffer (line endpoints as pairs)
Color buffer (per-vertex RGBA colors)
Line rendering parameters (width, anti-aliasing)
VAO for efficient attribute binding
Line rendering features:
Line width in pixels: widths larger than one pixel are drawn as screen-aligned quads (see LinesProxyBase)
Per-vertex colors
Optional anti-aliasing of thick lines (edges faded in the fragment shader)
Alpha blending for transparency
Typical data flow:
compile() : Upload initial line vertices and colors to GPU
updateBuffers() : Re-upload when lines change
render() : Draw lines every frame
See also:
LinesProxyBase, mrpt::viz::VisualObjectParams_Lines
#include <mrpt/opengl/LinesProxy.h> class LinesProxy: public mrpt::opengl::LinesProxyBase { public: // construction LinesProxy(); // methods virtual const char* typeName() const; };
Inherited Members
public: // typedefs typedef std::shared_ptr<RenderableProxy> Ptr; // fields mrpt::math::CMatrixFloat44 m_modelMatrix = mrpt::math::CMatrixFloat44::Identity(); bool m_visible = true; bool m_castShadows = true; uint64_t m_changeCount = 0; mrpt::math::TPoint3Df m_sortPointLocal {0, 0, 0}; // methods virtual void compile(const mrpt::viz::CVisualObject* sourceObj) = 0; virtual void updateBuffers(const mrpt::viz::CVisualObject* sourceObj); virtual void render(const RenderContext& rc) const = 0; virtual std::vector<shader_id_t> requiredShaders() const = 0; virtual bool castsShadows() const; virtual bool isTransparent() const; virtual bool isBackground() const; virtual shader_id_t shadowMapShader() const; virtual bool cullEligible() const; virtual bool supportsInstancing() const; virtual const RenderableProxy* geometry() const; uint64_t id() const; const std::optional<mrpt::math::TBoundingBoxf>& localBoundingBox() const; virtual const char* typeName() const; void setSourceObject(std::weak_ptr<const mrpt::viz::CVisualObject> obj); void setResourceScope(const void* scope); std::shared_ptr<const mrpt::viz::CVisualObject> getSourceObject() const; bool isSourceValid() const; bool sourceNeedsUpdate() const; RenderableProxy& operator = (const RenderableProxy&); RenderableProxy& operator = (RenderableProxy&&); virtual void compile(const mrpt::viz::CVisualObject* sourceObj); virtual void updateBuffers(const mrpt::viz::CVisualObject* sourceObj); virtual void render(const RenderContext& rc) const; virtual std::vector<shader_id_t> requiredShaders() const; virtual bool castsShadows() const; virtual const char* typeName() const; float effectiveLineWidth() const; bool drawsThickLines() const;
Methods
virtual const char* typeName() const
Returns a human-readable type name for this proxy.
Used for debugging and logging.