I'm writing an 3D Scanner with a Kinect and i want to display the P开发者_如何学Gooint clouds..
The Pointclouds have an additional Transformmatrix from a Trackingsystem..
I use: scale = 0.0005; glScaled(scale, scale, scale);
to encounter the Problem, that x,y,z Value ranges from 0 - 10.000 are cut by Opengl due to clipping planes.
when i use glLoadMatrix(trackingtransform); i don't see anything.. even if i use glscale again after the loadmatrix.
glLoadMatrix replaces the matrix that you generated with glScaled.
if you want to combine them, use glMultMatrix instead of glLoadMatrix.
That said, I'd advise to do what datenwolf alludes to. Use the projection matrix to set a coordinate system that maps your usage scenario (i.e. a world in the 0-10000 range), and keep the modelview matrix to move around.
You can directly scale the matrix your points are in, like:
glPushMatrix();
glScale();
-draw all your points...
glPopMatrix();
精彩评论