forked from YoYo000/fusibile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
point_cloud_list.h
40 lines (37 loc) · 915 Bytes
/
point_cloud_list.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include <string.h> // memset()
#include <stdlib.h> // malloc(), realloc(), free()
#include "algorithmparameters.h"
#include "cameraparameters.h"
#include "managed.h"
#include <vector_types.h> // float4
class Point_li {
public:
float4 normal; // Normal
float4 coord; // Point coordinate
float texture; // Average texture color
};
class PointCloudList {
public:
Point_li *points;
int rows;
int cols;
unsigned int size;
unsigned int maximum;
void resize(int n)
{
maximum=n;
points = (Point_li *) malloc (sizeof(Point_li) * n);
memset (points, 0, sizeof(Point_li) * n);
}
void increase_size(int n)
{
maximum=n;
points = (Point_li *) realloc (points, n * sizeof(Point_li));
printf("New size of point cloud list is %d\n", n);
}
~PointCloudList()
{
free (points);
}
};