#include <point3d.h>
Display a list of 3D points. It is made of tiny small cubes showing where the points are. Points coordinates are 3 float values (x,y,z).
Points are in world coordinates. If you are using volume coordinates, scale the points to the correct volume size before. The following example shows how to display the points with a volume displayed in a centered unit box:
glTranslatef(-0.5f,-0.5f,-0.5f); glScalef(1.0f/width, 1.0f/height, 1.0f/depth); points.display();
For better results use the following OpenGL initialization:
glShadeModel(GL_SMOOTH); glEnable(GL_DEPTH_TEST); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Public Member Functions | |
Point3D () | |
~Point3D () | |
void | update (const float *points, unsigned int nbPoints) |
void | display () |
void | display (const float *data) |
Display::Point3D::Point3D | ( | ) |
Display::Point3D::~Point3D | ( | ) |
void Display::Point3D::update | ( | const float * | points, | |
unsigned int | nbPoints | |||
) |
update the visualizer with a new list of point points are in world coordinates internally creates or update the display list
points | successive triplets (x,y,z) for each point | |
nbPoints | number of triplets |
void Display::Point3D::display | ( | ) |
display the display list
void Display::Point3D::display | ( | const float * | data | ) |
display directly a point point is in world coordinate
data | a triplet (x,y,z) |