Commit 7a4c8432 authored by Jan Möbius's avatar Jan Möbius

Fixed several warnings and added missing functions to adaptor Splatcloud

parent b2b4e797
......@@ -70,33 +70,37 @@ class AdaptorMesh : public AdaptorBase {
public:
AdaptorMesh(MeshT& _mesh, DataType _type) : mesh_(_mesh),currentPoint_(0),type_(_type) {}
virtual ~AdaptorMesh() {
}
void clear() override {
mesh_.clear();
};
}
void add_point(ACG::Vec3d _point) override {
currentPoint_ = mesh_.add_vertex(_point);
};
}
void setNormal(ACG::Vec3d _normal) override{
mesh_.set_normal( currentPoint_,_normal );
};
}
void setColor(ACG::Vec4f _color) override{
mesh_.set_color( currentPoint_,_color );
};
}
void setColor(ACG::Vec3uc _color) override{
mesh_.set_color( currentPoint_, OpenMesh::color_cast <typename MeshT::Color>(_color));
};
}
void setPointSize(double /*_size*/ ) override {
void setPointSize(float /*_size*/ ) override {
};
}
void setIndex(int /*_size*/ ) override {
};
}
void request_vertex_normals() override {
mesh_.request_vertex_normals();
......@@ -114,13 +118,13 @@ public:
}
void reserve(int _size) override {
void reserve(size_t _size) override {
mesh_.reserve(_size,0,0);
};
}
virtual DataType adaptorType() override {
return type_;
};
}
private :
MeshT& mesh_;
......@@ -137,36 +141,40 @@ public:
cloud_.requestPositions();
}
virtual ~AdaptorSplat() {
}
void clear() override {
cloud_.clear();
cloud_.requestPositions();
};
}
void add_point(ACG::Vec3d _point) override {
++splatIdx_;
cloud_.pushbackSplat();
cloud_.positions( splatIdx_ ) = _point;
};
}
void setNormal(ACG::Vec3d _normal) override{
cloud_.normals( splatIdx_ ) = _normal;
};
}
void setColor(ACG::Vec4f _color) override{
cloud_.colors( splatIdx_ ) = OpenMesh::color_cast<SplatCloud::Color>(_color);
};
}
void setColor(ACG::Vec3uc _color) override{
cloud_.colors( splatIdx_) = _color;
};
void setPointSize(double /*_size*/ ) override {
};
}
void setIndex(int /*_size*/ ) override {
void setPointSize(float _size ) override {
cloud_.pointsizes(splatIdx_) = _size;
}
};
void setIndex(int _index ) override {
cloud_.indices(splatIdx_) = _index;
}
void request_vertex_normals() override {
cloud_.requestNormals();
......@@ -184,12 +192,12 @@ public:
cloud_.requestIndices();
}
void reserve(int /*_size*/ ) override {
};
void reserve(size_t /*_size*/ ) override {
}
virtual DataType adaptorType() override {
return DATA_SPLATCLOUD;
};
}
private :
SplatCloud& cloud_;
......@@ -200,14 +208,14 @@ private :
FilePTSPlugin::FilePTSPlugin() :
loadOptions_( nullptr ),
saveOptions_( 0 ),
saveBinaryFile_( 0 ),
saveNormals_ ( 0 ),
savePointsizes_( 0 ),
saveColors_ ( 0 ),
saveColorRange_( 0 ),
saveIndices_ ( 0 ),
saveMakeDefaultButton_( 0 )
saveOptions_( nullptr ),
saveBinaryFile_( nullptr ),
saveNormals_ ( nullptr ),
savePointsizes_( nullptr ),
saveColors_ ( nullptr ),
saveColorRange_( nullptr ),
saveIndices_ ( nullptr ),
saveMakeDefaultButton_( nullptr )
{ }
//----------------------------------------------------------------
......
......@@ -93,15 +93,15 @@ public:
virtual void setNormal(ACG::Vec3d _normal) = 0;
virtual void setColor(ACG::Vec4f _color) = 0;
virtual void setColor(ACG::Vec3uc _color) = 0;
virtual void setPointSize(double _size ) = 0;
virtual void setIndex(int _size ) = 0;
virtual void setPointSize(float _size ) = 0;
virtual void setIndex(int _index ) = 0;
virtual void request_vertex_normals() = 0;
virtual void request_vertex_colors() = 0;
virtual void request_point_sizes() = 0;
virtual void request_indices() = 0;
virtual void reserve(int _size) = 0;
virtual void reserve(size_t _size) = 0;
virtual DataType adaptorType() = 0;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment