Commit 0d55abc5 authored by Jan Möbius's avatar Jan Möbius
Browse files

Splatcloud indices patch from Tobias



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14626 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fa2c1bd7
......@@ -134,6 +134,7 @@ bool SplatCloud::deleteSelected()
bool hasNrm = hasNormals();
bool hasPS = hasPointsizes();
bool hasCol = hasColors();
bool hasIdx = hasIndices();
bool hasSel = hasSelections();
// create new (empty) data vectors
......@@ -141,6 +142,7 @@ bool SplatCloud::deleteSelected()
NormalVector newNormals;
PointsizeVector newPointsizes;
ColorVector newColors;
IndexVector newIndices;
SelectionVector newSelections;
// reserve memory/space if data vector(s) in use
......@@ -148,12 +150,14 @@ bool SplatCloud::deleteSelected()
if( hasNrm ) newNormals.reserve ( newSize );
if( hasPS ) newPointsizes.reserve( newSize );
if( hasCol ) newColors.reserve ( newSize );
if( hasIdx ) newIndices.reserve ( newSize );
if( hasSel ) newSelections.reserve( newSize );
PointVector::const_iterator pointIter = points_.begin();
NormalVector::const_iterator normalIter = normals_.begin();
PointsizeVector::const_iterator pointsizeIter = pointsizes_.begin();
ColorVector::const_iterator colorIter = colors_.begin();
IndexVector::const_iterator indexIter = indices_.begin();
SelectionVector::const_iterator selectionIter = selections_.begin();
// add old data entry to new data vector if point is *not* selected
......@@ -188,6 +192,13 @@ bool SplatCloud::deleteSelected()
++colorIter;
}
if( hasIdx )
{
if( unselected )
newIndices.push_back ( *indexIter );
++indexIter;
}
if( hasSel )
{
if( unselected )
......@@ -201,6 +212,7 @@ bool SplatCloud::deleteSelected()
normals_ = newNormals;
pointsizes_ = newPointsizes;
colors_ = newColors;
indices_ = newIndices;
selections_ = newSelections;
return true; // data has been modified
......
......@@ -45,7 +45,7 @@
// CLASS SplatCloud
//
// SplatCloud stores the data for a SplatCloud.
// Points, normals, point sizes and colors are internally stored as arrays.
// Points, normals, point sizes, colors, indices and selections are internally stored as arrays.
//
//================================================================
......@@ -69,7 +69,7 @@
/** \class SplatCloud SplatCloud.hh <ObjectTypes/SplatCloud/SplatCloud/SplatCloud.hh>
*
* Storage of points, normals, point sizes and colors for a SplatCloud.
* Storage of points, normals, point sizes, colors, indices and selections for a SplatCloud.
*/
class DLLEXPORT SplatCloud
......@@ -82,12 +82,14 @@ public:
typedef ACG::Vec3f Normal;
typedef float Pointsize;
typedef ACG::Vec3uc Color;
typedef int Index;
typedef bool Selection;
typedef std::vector<Point> PointVector;
typedef std::vector<Normal> NormalVector;
typedef std::vector<Pointsize> PointsizeVector;
typedef std::vector<Color> ColorVector;
typedef std::vector<Index> IndexVector;
typedef std::vector<Selection> SelectionVector;
//----------------------------------------------------------------
......@@ -101,6 +103,7 @@ public:
normals_ ( _splatCloud.normals_ ),
pointsizes_ ( _splatCloud.pointsizes_ ),
colors_ ( _splatCloud.colors_ ),
indices_ ( _splatCloud.indices_ ),
selections_ ( _splatCloud.selections_ ),
translation_( _splatCloud.translation_ ),
scaleFactor_( _splatCloud.scaleFactor_ )
......@@ -108,46 +111,53 @@ public:
// ---- data vectors ----
inline void clearPoints() { points_ = PointVector(); }
inline void clearNormals() { normals_ = NormalVector(); }
inline void clearPointsizes() { pointsizes_ = PointsizeVector(); }
inline void clearColors() { colors_ = ColorVector(); }
inline void clearSelections() { selections_ = SelectionVector(); }
inline void clearPoints() { PointVector temp; points_.swap ( temp ); }
inline void clearNormals() { NormalVector temp; normals_.swap ( temp ); }
inline void clearPointsizes() { PointsizeVector temp; pointsizes_.swap( temp ); }
inline void clearColors() { ColorVector temp; colors_.swap ( temp ); }
inline void clearIndices() { IndexVector temp; indices_.swap ( temp ); }
inline void clearSelections() { SelectionVector temp; selections_.swap( temp ); }
inline void clear() { clearPoints(); clearNormals(); clearPointsizes(); clearColors(); clearSelections(); }
inline void clear() { clearPoints(); clearNormals(); clearPointsizes(); clearColors(); clearIndices(); clearSelections(); }
inline void addPoint ( const Point &_point ) { points_.push_back ( _point ); }
inline void addNormal ( const Normal &_normal ) { normals_.push_back ( _normal ); }
inline void addPointsize( const Pointsize &_pointsize ) { pointsizes_.push_back( _pointsize ); }
inline void addColor ( const Color &_color ) { colors_.push_back ( _color ); }
inline void addIndex ( const Index &_index ) { indices_.push_back ( _index ); }
inline void addSelection( const Selection &_selection ) { selections_.push_back( _selection ); }
inline unsigned int numPoints() const { return points_.size(); }
inline unsigned int numNormals() const { return normals_.size(); }
inline unsigned int numPointsizes() const { return pointsizes_.size(); }
inline unsigned int numColors() const { return colors_.size(); }
inline unsigned int numIndices() const { return indices_.size(); }
inline unsigned int numSelections() const { return selections_.size(); } /// *not* numSelected() ! use countSelected() for this
inline bool hasPoints() const { return numPoints() > 0; }
inline bool hasNormals() const { return hasPoints() && (numNormals() == numPoints()); }
inline bool hasPointsizes() const { return hasPoints() && (numPointsizes() == numPoints()); }
inline bool hasColors() const { return hasPoints() && (numColors() == numPoints()); }
inline bool hasIndices() const { return hasPoints() && (numIndices() == numPoints()); }
inline bool hasSelections() const { return hasPoints() && (numSelections() == numPoints()); }
inline void initNormals() { if( !hasNormals() ) normals_ = NormalVector ( numPoints(), Normal(0.0f,0.0f,0.0f) ); }
inline void initPointsizes() { if( !hasPointsizes() ) pointsizes_ = PointsizeVector( numPoints(), Pointsize(0.0f) ); }
inline void initColors() { if( !hasColors() ) colors_ = ColorVector ( numPoints(), Color(0,0,0) ); }
inline void initIndices() { if( !hasIndices() ) indices_ = IndexVector ( numPoints(), Index(-1) ); }
inline void initSelections() { if( !hasSelections() ) selections_ = SelectionVector( numPoints(), Selection(false) ); }
inline PointVector &points() { return points_; }
inline NormalVector &normals() { return normals_; }
inline PointsizeVector &pointsizes() { return pointsizes_; }
inline ColorVector &colors() { return colors_; }
inline IndexVector &indices() { return indices_; }
inline SelectionVector &selections() { return selections_; }
inline const PointVector &points() const { return points_; }
inline const NormalVector &normals() const { return normals_; }
inline const PointsizeVector &pointsizes() const { return pointsizes_; }
inline const ColorVector &colors() const { return colors_; }
inline const IndexVector &indices() const { return indices_; }
inline const SelectionVector &selections() const { return selections_; }
unsigned int countSelected() const;
......@@ -176,6 +186,7 @@ private:
NormalVector normals_;
PointsizeVector pointsizes_;
ColorVector colors_;
IndexVector indices_;
SelectionVector selections_;
// ---- translation and scale ----
......
......@@ -76,6 +76,7 @@ SplatCloudNode::SplatCloudNode( const SplatCloud &_splatCloud, BaseNode *_parent
normalsModified_ ( false ),
pointsizesModified_ ( false ),
colorsModified_ ( false ),
indicesModified_ ( false ),
selectionsModified_ ( false ),
pickColorsModified_ ( false ),
defaultNormal_ ( Normal(0.0f,0.0f,1.0f) ),
......@@ -92,6 +93,7 @@ SplatCloudNode::SplatCloudNode( const SplatCloud &_splatCloud, BaseNode *_parent
vboNormalsOffset_ ( -1 ),
vboPointsizesOffset_( -1 ),
vboColorsOffset_ ( -1 ),
vboIndicesOffset_ ( -1 ),
vboSelectionsOffset_( -1 ),
vboPickColorsOffset_( -1 )
{
......@@ -223,6 +225,16 @@ void SplatCloudNode::draw( GLState &_state, const DrawModes::DrawMode &_drawMode
glSecondaryColor3ub( defaultColor_[0], defaultColor_[1], defaultColor_[2] );
}
// indices
if( vboIndicesOffset_ != -1 )
{
// - no indices in VBO -
}
else
{
// - no indices in VBO -
}
// selections
if( vboSelectionsOffset_ != -1 )
{
......@@ -274,6 +286,9 @@ void SplatCloudNode::draw( GLState &_state, const DrawModes::DrawMode &_drawMode
// colors
ACG::GLState::disableClientState( GL_SECONDARY_COLOR_ARRAY );
// indices
// - no indices in VBO -
// selections
glClientActiveTexture( GL_TEXTURE1 ); // TODO: use ACG::GLState::clientActiveTexture() when implemented
ACG::GLState::disableClientState( GL_TEXTURE_COORD_ARRAY );
......@@ -393,6 +408,7 @@ void SplatCloudNode::rebuildVBO( GLState &_state )
int normalsOffset = -1;
int pointsizesOffset = -1;
int colorsOffset = -1;
int indicesOffset = -1;
int selectionsOffset = -1;
int pickColorsOffset = -1;
......@@ -400,6 +416,7 @@ void SplatCloudNode::rebuildVBO( GLState &_state )
if( splatCloud_.hasNormals() ) { normalsOffset = size; size += numPoints * 12; }
if( splatCloud_.hasPointsizes() ) { pointsizesOffset = size; size += numPoints * 4; }
if( splatCloud_.hasColors() ) { colorsOffset = size; size += numPoints * 3; }
if( splatCloud_.hasIndices() ) { } // - no indices in VBO -
if( splatCloud_.hasSelections() ) { selectionsOffset = size; size += numPoints * 4; }
/* has pick colors = true */ { pickColorsOffset = size; size += numPoints * 4; }
......@@ -427,6 +444,7 @@ void SplatCloudNode::rebuildVBO( GLState &_state )
vboNormalsOffset_ = normalsOffset;
vboPointsizesOffset_ = pointsizesOffset;
vboColorsOffset_ = colorsOffset;
vboIndicesOffset_ = indicesOffset;
vboSelectionsOffset_ = selectionsOffset;
vboPickColorsOffset_ = pickColorsOffset;
......@@ -446,6 +464,7 @@ void SplatCloudNode::rebuildVBO( GLState &_state )
if( normalsModified_ ) rebuildVBONormals();
if( pointsizesModified_ ) rebuildVBOPointsizes();
if( colorsModified_ ) rebuildVBOColors();
if( indicesModified_ ) rebuildVBOIndices();
if( selectionsModified_ ) rebuildVBOSelections();
if( pickColorsModified_ ) rebuildVBOPickColors( _state );
......@@ -458,6 +477,7 @@ void SplatCloudNode::rebuildVBO( GLState &_state )
normalsModified_ = false;
pointsizesModified_ = false;
colorsModified_ = false;
indicesModified_ = false;
selectionsModified_ = false;
pickColorsModified_ = false;
......@@ -492,6 +512,22 @@ static void addFloatToBuffer( float _value, unsigned char *&_buffer )
//----------------------------------------------------------------
static void addIntToBuffer( int _value, unsigned char *&_buffer )
{
// get pointer
unsigned char *v = (unsigned char *) &_value;
// copy over 4 bytes
*_buffer++ = *v++;
*_buffer++ = *v++;
*_buffer++ = *v++;
*_buffer++ = *v;
}
//----------------------------------------------------------------
static void addUCharToBuffer( unsigned char _value, unsigned char *&_buffer )
{
// get pointer
......@@ -615,6 +651,33 @@ void SplatCloudNode::rebuildVBOColors()
//----------------------------------------------------------------
void SplatCloudNode::rebuildVBOIndices()
{
if( vboIndicesOffset_ == -1 || !splatCloud_.hasIndices() )
return;
# ifdef REPORT_VBO_UPDATES
std::cout << "SplatCloudNode::rebuildVBOIndices()" << std::endl;
# endif
// get pointer to buffer
unsigned char *buffer = vboData_ + vboIndicesOffset_;
// for all points...
unsigned int i, num = splatCloud_.numPoints();
for( i=0; i<num; ++i )
{
// add index
// - no indices in VBO -
//const Index &idx = getIndex( i );
//addIntToBuffer( idx, buffer );
}
}
//----------------------------------------------------------------
void SplatCloudNode::rebuildVBOSelections()
{
if( vboSelectionsOffset_ == -1 || !splatCloud_.hasSelections() )
......
......@@ -45,7 +45,7 @@
// CLASS SplatCloudNode
//
// SplatCloudNode renders splats by passing points, normals, point sizes and colors (and picking colors) to the GL.
// These elements are internally stored in an interleaved array using an OpenGL vertex-buffer-object
// These elements are internally stored in an array using an OpenGL vertex-buffer-object
// including vertices, normals, texcoords and colors.
//
//================================================================
......@@ -94,6 +94,7 @@ private:
typedef SplatCloud::Normal Normal;
typedef SplatCloud::Pointsize Pointsize;
typedef SplatCloud::Color Color;
typedef SplatCloud::Index Index;
typedef SplatCloud::Selection Selection;
//----------------------------------------------------------------
......@@ -131,10 +132,11 @@ public:
inline void modifiedNormals() { normalsModified_ = true; }
inline void modifiedPointsizes() { pointsizesModified_ = true; }
inline void modifiedColors() { colorsModified_ = true; }
inline void modifiedIndices() { indicesModified_ = true; }
inline void modifiedSelections() { selectionsModified_ = true; }
inline void modifiedPickColors() { pickColorsModified_ = true; }
inline void modifiedAll() { modifiedPoints(); modifiedNormals(); modifiedPointsizes(); modifiedColors(); modifiedSelections(); modifiedPickColors(); }
inline void modifiedAll() { modifiedPoints(); modifiedNormals(); modifiedPointsizes(); modifiedColors(); modifiedIndices(); modifiedSelections(); modifiedPickColors(); }
// ---- default values ----
......@@ -151,7 +153,8 @@ public:
inline Normal getNormal ( unsigned int _index ) const { return splatCloud_.hasNormals() ? splatCloud_.normals() [ _index ] : defaultNormal_ ; }
inline Pointsize getPointsize( unsigned int _index ) const { return splatCloud_.hasPointsizes() ? splatCloud_.pointsizes()[ _index ] : defaultPointsize_ ; }
inline Color getColor ( unsigned int _index ) const { return splatCloud_.hasColors() ? splatCloud_.colors() [ _index ] : defaultColor_ ; }
inline Selection getSelection( unsigned int _index ) const { return splatCloud_.hasSelections() ? splatCloud_.selections()[ _index ] : false ; }
inline Index getIndex ( unsigned int _index ) const { return splatCloud_.hasIndices() ? splatCloud_.indices() [ _index ] : Index(-1) ; }
inline Selection getSelection( unsigned int _index ) const { return splatCloud_.hasSelections() ? splatCloud_.selections()[ _index ] : Selection(false) ; }
//----------------------------------------------------------------
......@@ -169,11 +172,12 @@ private:
bool normalsModified_;
bool pointsizesModified_;
bool colorsModified_;
bool indicesModified_;
bool selectionsModified_;
bool pickColorsModified_;
/// return true iff any of the data values in the VBO has to be changed
inline bool vboModified() const { return pointsModified_ || normalsModified_ || pointsizesModified_ || colorsModified_ || selectionsModified_ || pickColorsModified_; }
inline bool vboModified() const { return pointsModified_ || normalsModified_ || pointsizesModified_ || colorsModified_ || indicesModified_ || selectionsModified_ || pickColorsModified_; }
// ---- default values ----
......@@ -203,6 +207,7 @@ private:
int vboNormalsOffset_;
int vboPointsizesOffset_;
int vboColorsOffset_;
int vboIndicesOffset_;
int vboSelectionsOffset_;
int vboPickColorsOffset_;
......@@ -214,6 +219,7 @@ private:
(vboNormalsOffset_ != -1) != splatCloud_.hasNormals() ||
(vboPointsizesOffset_ != -1) != splatCloud_.hasPointsizes() ||
(vboColorsOffset_ != -1) != splatCloud_.hasColors() ||
(vboIndicesOffset_ != -1) != splatCloud_.hasIndices() ||
(vboSelectionsOffset_ != -1) != splatCloud_.hasSelections();
}
......@@ -225,6 +231,7 @@ private:
void rebuildVBONormals();
void rebuildVBOPointsizes();
void rebuildVBOColors();
void rebuildVBOIndices();
void rebuildVBOSelections();
void rebuildVBOPickColors( GLState &_state );
};
......
......@@ -495,6 +495,16 @@ void SplatCloudObject::update( UpdateType _type )
splatCloudNode_->modifiedColors();
}
if( _type.contains( updateType("Indices") ) )
{
# ifdef REPORT_UPDATE_TYPE
std::cout << "SplatCloudObject::update() : UPDATE_Indices" << std::endl;
# endif
if( splatCloudNode_ )
splatCloudNode_->modifiedIndices();
}
if( _type.contains( UPDATE_SELECTION ) )
{
# ifdef REPORT_UPDATE_TYPE
......@@ -560,6 +570,7 @@ QString SplatCloudObject::getObjectinfo()
output += ", normals used: "; output += splatCloud_->hasNormals() ? "true" : "false";
output += ", pointsizes used: "; output += splatCloud_->hasPointsizes() ? "true" : "false";
output += ", colors used: "; output += splatCloud_->hasColors() ? "true" : "false";
output += ", indices used: "; output += splatCloud_->hasIndices() ? "true" : "false";
}
output += "\n";
......
......@@ -77,12 +77,14 @@ FilePTSPlugin::FilePTSPlugin() :
loadPointsizes_(0),
loadColors_(0),
loadColorRange_(0),
loadIndices_(0),
loadNormalizeSize_(0),
saveBinaryFile_(0),
saveNormals_(0),
savePointsizes_(0),
saveColors_(0),
saveColorRange_(0),
saveIndices_(0),
loadMakeDefaultButton_(0),
saveMakeDefaultButton_(0)
......@@ -94,17 +96,19 @@ FilePTSPlugin::FilePTSPlugin() :
bool FilePTSPlugin::readBinaryFile( std::ifstream &_instream, SplatCloud *_splatCloud )
{
// set default options
bool loadNormals = true;
bool loadNormals = true;
bool loadPointsizes = false;
bool loadColors = false;
// int loadColorRange = 0;
bool loadColors = false;
// int loadColorRange = 0;
bool loadIndices = false;
// get options
if (OpenFlipper::Options::gui() && loadOptions_) {
loadNormals = loadNormals_->isChecked();
loadNormals = loadNormals_->isChecked();
loadPointsizes = loadPointsizes_->isChecked();
loadColors = loadColors_->isChecked();
// loadColorRange = loadColorRange_->currentIndex();
loadColors = loadColors_->isChecked();
// loadColorRange = loadColorRange_->currentIndex();
loadIndices = loadIndices_->isChecked();
}
// read file type
......@@ -181,6 +185,20 @@ bool FilePTSPlugin::readBinaryFile( std::ifstream &_instream, SplatCloud *_splat
}
}
// read indices
if (loadIndices) {
unsigned int i;
for (i = 0; i < numPoints; ++i) {
int idx;
_instream.read((char *) &idx, sizeof(int));
SplatCloud::Index index;
index = idx;
_splatCloud->addIndex(index);
}
}
// return success
return true;
}
......@@ -190,17 +208,19 @@ bool FilePTSPlugin::readBinaryFile( std::ifstream &_instream, SplatCloud *_splat
bool FilePTSPlugin::readTextFile( std::ifstream &_instream, SplatCloud *_splatCloud )
{
// set default options
bool loadNormals = true;
bool loadNormals = true;
bool loadPointsizes = false;
bool loadColors = false;
int loadColorRange = 0;
bool loadColors = false;
int loadColorRange = 0;
bool loadIndices = false;
// get options
if (OpenFlipper::Options::gui() && loadOptions_) {
loadNormals = loadNormals_->isChecked();
loadNormals = loadNormals_->isChecked();
loadPointsizes = loadPointsizes_->isChecked();
loadColors = loadColors_->isChecked();
loadColors = loadColors_->isChecked();
loadColorRange = loadColorRange_->currentIndex();
loadIndices = loadIndices_->isChecked();
}
char buffer[4096];
......@@ -276,6 +296,17 @@ bool FilePTSPlugin::readTextFile( std::ifstream &_instream, SplatCloud *_splatCl
_splatCloud->addPointsize(pointsize);
}
// read index
if (loadIndices) {
int idx;
sstream >> idx;
SplatCloud::Index index;
index = idx;
_splatCloud->addIndex(index);
}
}
// return success
......@@ -287,10 +318,11 @@ bool FilePTSPlugin::readTextFile( std::ifstream &_instream, SplatCloud *_splatCl
bool FilePTSPlugin::writeBinaryFile(std::ofstream &_outstream, const SplatCloudNode *_splatCloudNode)
{
// set default options
bool saveNormals = true;
bool saveNormals = true;
bool savePointsizes = false;
bool saveColors = false;
// int saveColorRange = 0;
bool saveColors = false;
// int saveColorRange = 0;
bool saveIndices = false;
// get current translation and scaling
float s = 1.0f / _splatCloudNode->splatCloud().scaleFactor();
......@@ -298,10 +330,11 @@ bool FilePTSPlugin::writeBinaryFile(std::ofstream &_outstream, const SplatCloudN
// get options
if (OpenFlipper::Options::gui() && saveOptions_) {
saveNormals = saveNormals_->isChecked();
saveNormals = saveNormals_->isChecked();
savePointsizes = savePointsizes_->isChecked();
saveColors = saveColors_->isChecked();
// saveColorRange = saveColorRange_->currentIndex();
saveColors = saveColors_->isChecked();
// saveColorRange = saveColorRange_->currentIndex();
saveIndices = saveIndices_->isChecked();
}
// write file type
......@@ -368,6 +401,19 @@ bool FilePTSPlugin::writeBinaryFile(std::ofstream &_outstream, const SplatCloudN
}
}
// write indices
if (saveIndices) {
unsigned int i;
for (i = 0; i < numPoints; ++i) {
const SplatCloud::Index &index = _splatCloudNode->getIndex(i);
int idx;
idx = index;
_outstream.write((char *) &idx, sizeof(int));
}
}
// return success
return true;
}
......@@ -377,10 +423,11 @@ bool FilePTSPlugin::writeBinaryFile(std::ofstream &_outstream, const SplatCloudN
bool FilePTSPlugin::writeTextFile(std::ofstream &_outstream, const SplatCloudNode *_splatCloudNode)
{
// set default options
bool saveNormals = true;
bool saveNormals = true;
bool savePointsizes = false;
bool saveColors = false;
int saveColorRange = 0;
bool saveColors = false;
int saveColorRange = 0;
bool saveIndices = false;
// get current translation and scale factor
float s = 1.0f / _splatCloudNode->splatCloud().scaleFactor();
......@@ -388,10 +435,11 @@ bool FilePTSPlugin::writeTextFile(std::ofstream &_outstream, const SplatCloudNod
// get options
if (OpenFlipper::Options::gui() && saveOptions_) {
saveNormals = saveNormals_->isChecked();
saveNormals = saveNormals_->isChecked();
savePointsizes = savePointsizes_->isChecked();
saveColors = saveColors_->isChecked();
saveColors = saveColors_->isChecked();
saveColorRange = saveColorRange_->currentIndex();
saveIndices = saveIndices_->isChecked();
}
// for all points...
......@@ -463,6 +511,16 @@ bool FilePTSPlugin::writeTextFile(std::ofstream &_outstream, const SplatCloudNod
_outstream << " " << ps;
}
// write index
if (saveIndices) {
const SplatCloud::Index &index = _splatCloudNode->getIndex(i);
int idx;
idx = index;
_outstream << " " << idx;
}
_outstream << std::endl;
}
......@@ -631,13 +689,13 @@ QWidget *FilePTSPlugin::loadOptionsWidget(QString /*_currentFilter*/)
loadBinaryFile_ = new QCheckBox("Load as Binary File");
loadNormals_ = new QCheckBox("Contains Normals");
loadPointsizes_ = new QCheckBox("Contains Pointsizes");
loadColors_ = new QCheckBox("Contains Colors");
loadNormals_ = new QCheckBox( "Contains Normals" );
loadPointsizes_ = new QCheckBox( "Contains Pointsizes" );
loadColors_ = new QCheckBox( "Contains Colors" );
loadColorRange_ = new QComboBox();
loadColorRange_->addItem("[0..1]");
loadColorRange_->addItem("[0..255]");
loadColorRange_->addItem( "[0..1]" );
loadColorRange_->addItem( "[0..255]" );
<