class mrpt::viz::CDisk

Python API: mrpt.viz.CDisk

Overview

A planar disk in the XY plane.

mrpt::viz::CDisk

See also:

opengl::Scene

#include <mrpt/viz/CDisk.h>

class CDisk:
    public mrpt::viz::CVisualObject,
    public mrpt::viz::VisualObjectParams_Triangles
{
public:
    // typedefs

    typedef std::shared_ptr<mrpt::viz ::CDisk> Ptr;
    typedef std::shared_ptr<const mrpt::viz ::CDisk> ConstPtr;
    typedef std::unique_ptr<mrpt::viz ::CDisk> UniquePtr;
    typedef std::unique_ptr<const mrpt::viz ::CDisk> ConstUniquePtr;

    // fields

    static constexpr const char* className = "mrpt::viz" "::" "CDisk";

    // construction

    CDisk();

    CDisk(
        float rOut,
        float rIn,
        uint32_t slices = 50
        );

    // methods

    static constexpr auto getClassName();
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    static std::shared_ptr<CObject> CreateObject();

    template <typename... Args>
    static Ptr Create(Args&&... args);

    template <typename Alloc, typename... Args>
    static Ptr CreateAlloc(
        const Alloc& alloc,
        Args&&... args
        );

    template <typename... Args>
    static UniquePtr CreateUnique(Args&&... args);

    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual mrpt::rtti::CObject* clone() const;

    void setDiskRadius(
        float outRadius,
        float inRadius = 0
        );

    float getInRadius() const;
    float getOutRadius() const;
    void setSlicesCount(uint32_t N);
    virtual void updateBuffers() const;
    virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const;
    virtual bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const;
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<CSerializable> Ptr;
    typedef std::shared_ptr<const CSerializable> ConstPtr;
    typedef std::shared_ptr<CVisualObject> Ptr;
    typedef std::shared_ptr<const CVisualObject> ConstPtr;
    typedef std::unique_ptr<CObject> UniquePtr;
    typedef std::unique_ptr<const CObject> ConstUniquePtr;

    // structs

    struct BuffersVersion;
    struct ChangeCounter;
    struct PoseAndScale;
    struct State;

    // methods

    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    const auto& shaderTrianglesBuffer() const;
    auto& shaderTrianglesBufferMutex() const;
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    PoseAndScale getPoseAndScale() const;
    virtual CVisualObject& setColor_u8(const mrpt::img::TColor& c);
    bool isLightEnabled() const;
    void enableLight(bool enable = true);
    TCullFace cullFaces() const;
    void notifyBBoxChange() const;
    auto getBoundingBoxLocalf() const;

Typedefs

typedef std::shared_ptr<mrpt::viz ::CDisk> Ptr

A type for the associated smart pointer.

Construction

CDisk()

Constructor.

Methods

virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const

Returns information about the class of an object in runtime.

virtual mrpt::rtti::CObject* clone() const

Returns a deep copy (clone) of the object, indepently of its class.

void setSlicesCount(uint32_t N)

Default=50.

At least 3 slices are needed to form a disk.

virtual void updateBuffers() const

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

virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const

Must be implemented by derived classes to provide the updated bounding box in the object local frame of coordinates.

This will be called only once after each time the derived class reports to notifyChange() that the object geometry changed.

See also:

getBoundingBox(), getBoundingBoxLocal(), getBoundingBoxLocalf()

virtual bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const

Ray tracing.