class mrpt::math::TPolygonWithPlane

Slightly heavyweight type to speed-up calculations with polygons in 3D.

See also:

TPolygon3D, TPlane

#include <mrpt/math/TPolygonWithPlane.h>

class TPolygonWithPlane
{
public:
    //
fields

    TPolygon3D poly;
    TPlane plane;
    mrpt::math::TPose3D pose;
    mrpt::math::TPose3D inversePose;
    TPolygon2D poly2D;

    // construction

    TPolygonWithPlane(const TPolygon3D& p);
    TPolygonWithPlane();

    //
methods

    static void getPlanes(
        const std::vector<TPolygon3D>& oldPolys,
        std::vector<TPolygonWithPlane>& newPolys
        );
};

Fields

TPolygon3D poly

Actual polygon.

TPlane plane

Plane containing the polygon.

mrpt::math::TPose3D pose

Plane’s pose.

See also:

inversePose

mrpt::math::TPose3D inversePose

Plane’s inverse pose.

See also:

pose

TPolygon2D poly2D

Polygon, after being projected to the plane using inversePose.

See also:

inversePose

Construction

TPolygonWithPlane(const TPolygon3D& p)

Constructor.

Takes a polygon and computes each parameter.

TPolygonWithPlane()

Basic constructor.

Needed to create containers

See also:

TPolygonWithPlane(const TPolygon3D &)

Methods

static void getPlanes(
    const std::vector<TPolygon3D>& oldPolys,
    std::vector<TPolygonWithPlane>& newPolys
    )

Static method for vectors.

Takes a set of polygons and creates every TPolygonWithPlane