ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PlyFilter.cpp File Reference
#include "PlyFilter.h"
#include "FileIO.h"
#include "PlyOpenDlg.h"
#include <QFileInfo>
#include <QImage>
#include <QMessageBox>
#include <QPushButton>
#include <CVLog.h>
#include <ecvHObjectCaster.h>
#include <ecvMaterial.h>
#include <ecvMaterialSet.h>
#include <ecvMesh.h>
#include <ecvPointCloud.h>
#include <ecvProgressDialog.h>
#include <ecvScalarField.h>
#include <array>
#include <cassert>
#include <cstring>
#include <unistd.h>
#include <ctime>
Include dependency graph for PlyFilter.cpp:

Macros

#define PROCESS_EVENTS_FREQ   10000
 
#define ELEM_POS_0   0x00000000
 
#define ELEM_POS_1   0x00000001
 
#define ELEM_POS_2   0x00000002
 
#define ELEM_POS_3   0x00000003
 
#define ELEM_EOL   0x00000004
 
#define POS_MASK   0x00000003
 

Functions

static bool IsFloat (e_ply_type type)
 
static void errorCallback (p_ply _ply, const char *message)
 
static int vertex_cb (p_ply_argument argument)
 
static int normal_cb (p_ply_argument argument)
 
static int rgb_cb (p_ply_argument argument)
 
static int grey_cb (p_ply_argument argument)
 
static int scalar_cb (p_ply_argument argument)
 
static int face_cb (p_ply_argument argument)
 
static int texCoords_cb (p_ply_argument argument)
 
static int texIndexes_cb (p_ply_argument argument)
 

Variables

static e_ply_storage_mode s_defaultOutputFormat = PLY_DEFAULT
 
static int s_PointCount = 0
 
static int s_NormalCount = 0
 
static int s_ColorCount = 0
 
static int s_IntensityCount = 0
 
static unsigned s_totalScalarCount = 0
 
static unsigned s_triCount = 0
 
static bool s_PointDataCorrupted = false
 
static bool s_NotEnoughMemory = false
 
static FileIOFilter::LoadParameters s_loadParameters
 
static CCVector3d s_Pshift (0, 0, 0)
 
bool s_hasQuads = false
 
bool s_hasMaterials = false
 
std::vector< bool > s_triIsQuad
 
static bool s_unsupportedPolygonType = false
 
static unsigned s_texCoordCount = 0
 
static bool s_invalidTexCoordinates = false
 
static int s_maxTextureIndex = -1
 

Macro Definition Documentation

◆ ELEM_EOL

#define ELEM_EOL   0x00000004

◆ ELEM_POS_0

#define ELEM_POS_0   0x00000000

◆ ELEM_POS_1

#define ELEM_POS_1   0x00000001

◆ ELEM_POS_2

#define ELEM_POS_2   0x00000002

◆ ELEM_POS_3

#define ELEM_POS_3   0x00000003

◆ POS_MASK

#define POS_MASK   0x00000003

◆ PROCESS_EVENTS_FREQ

#define PROCESS_EVENTS_FREQ   10000

Function Documentation

◆ errorCallback()

static void errorCallback ( p_ply  _ply,
const char *  message 
)
static

References CVLog::Error().

Referenced by PlyFilter::loadFile().

◆ face_cb()

◆ grey_cb()

static int grey_cb ( p_ply_argument  argument)
static

◆ IsFloat()

static bool IsFloat ( e_ply_type  type)
static

References type.

Referenced by PlyFilter::loadFile().

◆ normal_cb()

static int normal_cb ( p_ply_argument  argument)
static

◆ rgb_cb()

◆ scalar_cb()

static int scalar_cb ( p_ply_argument  argument)
static

◆ texCoords_cb()

◆ texIndexes_cb()

◆ vertex_cb()

Variable Documentation

◆ s_ColorCount

int s_ColorCount = 0
static

Referenced by PlyFilter::loadFile(), and rgb_cb().

◆ s_defaultOutputFormat

e_ply_storage_mode s_defaultOutputFormat = PLY_DEFAULT
static

◆ s_hasMaterials

bool s_hasMaterials = false

Referenced by face_cb(), and PlyFilter::loadFile().

◆ s_hasQuads

bool s_hasQuads = false

Referenced by face_cb(), and PlyFilter::loadFile().

◆ s_IntensityCount

int s_IntensityCount = 0
static

Referenced by grey_cb(), and PlyFilter::loadFile().

◆ s_invalidTexCoordinates

bool s_invalidTexCoordinates = false
static

◆ s_loadParameters

◆ s_maxTextureIndex

int s_maxTextureIndex = -1
static

◆ s_NormalCount

int s_NormalCount = 0
static

Referenced by PlyFilter::loadFile(), and normal_cb().

◆ s_NotEnoughMemory

bool s_NotEnoughMemory = false
static

◆ s_PointCount

int s_PointCount = 0
static

Referenced by PlyFilter::loadFile(), and vertex_cb().

◆ s_PointDataCorrupted

bool s_PointDataCorrupted = false
static

Referenced by PlyFilter::loadFile(), and vertex_cb().

◆ s_Pshift

CCVector3d s_Pshift(0, 0, 0)
static

Referenced by PlyFilter::loadFile(), and vertex_cb().

◆ s_texCoordCount

unsigned s_texCoordCount = 0
static

◆ s_totalScalarCount

unsigned s_totalScalarCount = 0
static

Referenced by PlyFilter::loadFile(), and scalar_cb().

◆ s_triCount

unsigned s_triCount = 0
static

Referenced by face_cb(), and PlyFilter::loadFile().

◆ s_triIsQuad

std::vector<bool> s_triIsQuad

Referenced by face_cb(), and PlyFilter::loadFile().

◆ s_unsupportedPolygonType

bool s_unsupportedPolygonType = false
static

Referenced by face_cb(), and PlyFilter::loadFile().