使用激光扫描仪扫描数据点,再使用OpenGL对点云进行处理,我自己写的程序显示效果(上)与激光扫描仪配套的处理软件的显示效果(下)如下图
    
    
    我需要怎么做才能把显示效果跟下图显示一样呢,我是使用扫描仪的SDK获得点云的坐标和光强。获取点的API如下:
    HRESULT getScanPoint([in] int scan, [in] int row, [in] int col, [out] double* x, [out] double* y, [out] double* z, [out] int* color, [out, retval] int* result) 
    Get the point at the given row/column in the given scan. The result is in the local cartesian coordinate system of the scanner. The returned color value depends on the selected reflection mode: 
0.  For grey scan points: Original reflection value of the scanner. In the case of 
an FARO Laser Scanner this isin the range of 0 to 2047. 
For color: the lightness of the color in the range 0 to 255. 
1.  For grey scan points: Mapped reflection value is in the range 0 (black) to 
255 (white). 
For color: the lightness of the color in the range 0 to 255. 
2.  For grey scan points: Mapped reflection value is in the range 0 (black) to 
255 (white) as RGB grey value. 
For color: RGB color, 8 bits per channel (bits 0-7: red, bits 8-15: green, bits 
16-23: blue). 
The default reflection mode is 1. 
The scan number can be in the range 0 to numScans-1. 
我是使用灰度扫描的,所以获取的color是一个灰度值,请问我怎么给一个点设置它的灰度值,我是一个新手,很多都不会,希望各位能帮一下,谢谢OpenGL点云