class cv::viz::Mesh

Overview

This class wraps mesh attributes, and it can load a mesh from a ply file. : More…

#include <types.hpp>

class Mesh
{
public:
    // enums

    enum
    {
        LOAD_AUTO = 0,
        LOAD_PLY  = 1,
        LOAD_OBJ  = 2,
    };

    // fields

    Mat cloud;
    Mat colors;
    Mat normals;
    Mat polygons;
    Mat tcoords;
    Mat texture;

    // methods

    static
    Mesh
    load(
        const String& file,
        int type = LOAD_PLY
        );
};

Detailed Documentation

This class wraps mesh attributes, and it can load a mesh from a ply file. :

Fields

Mat polygons

Raw integer list of the form: (n,id1,id2,…,idn, n,id1,id2,…,idn, …) where n is the number of points in the poligon, and id is a zero-offset index into an associated cloud.

Methods

static
Mesh
load(
    const String& file,
    int type = LOAD_PLY
    )

Loads a mesh from a ply or a obj file.

File type** can be one of the following:

  • LOAD_PLY
  • LOAD_OBJ

Parameters:

file File name
type File type (for now only PLY and OBJ are supported)