I've found yesterday your extension of QwtPlot3D, which runs with Qt5.5.
Not like the Version 0.2.7.0 and 0.3.0.0 because of the huge OpenGL changes in Qt.
Awesome!
Anyway I've a problem with the function: setDataColor( const Qwt3D::Color& col )
All vectors are black.
I've derived my own class from Qwt3D::StandardColor to generate my own palette, which worked nicely with v.0.2.7.0.
With your current version it isn't working anymore.
The version 0.2.7.0 was using the operator()(double x, double y, double z) to figure out which vector gets which color, but you have removed this method.
I assume that your version is now using the method rgba(double x, double y, double z), but for me it isn't working if I rename the operator-method to your rgba-method.
What have you changed or better asked: What should I change to get the old functionality back?
Kind regards,
Pixtar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
RGBA MyStandardColor::getColorAt( double x, double y, double z ) const
{
return RGBA(255,0,0);
}
RGBA MyStandardColor::rgba( double x, double y, double z ) const{
return this->getColorAt( x, y, z );
}
A: Working colored example based on my derived class:
MyStandardColor *col_ = new MyStandardColor( );
ColorVector cv;
col_->setColorVector( cv );
StandardColor col;
for( int i = this->hull().minVertex.z; i < this->hull().maxVertex.z; i++ )
{
cv.push_back( col_->rgba(0,0,i) );
}
col.setColorVector( cv );
this->setDataColor( col );
B: Not working pure black example based on my derived class:
MStandardColor col_ = new MStandardColor( );
ColorVector cv;
col_->setColorVector( cv );
this->setDataColor( col_ );
Why is method A working, but not method B?
If I'm not using setColorVector( ) the default gradient will be used, otherwise I get a pure black graph.
What have I missed?
Kind regards,
Pixtar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My problem was, that I derived from Qwt3D::StandardColor not from it's base class Qwt3D::Color. So now my class is derived from Qwt3D::Color and everything is fine. The plots are now using rgba() instead of operator() as I assumed previously. (Yeah I'm coming from version 0.2.7 ^^)
Thanks again for nice library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I've found yesterday your extension of QwtPlot3D, which runs with Qt5.5.
Not like the Version 0.2.7.0 and 0.3.0.0 because of the huge OpenGL changes in Qt.
Awesome!
Anyway I've a problem with the function: setDataColor( const Qwt3D::Color& col )
All vectors are black.
I've derived my own class from Qwt3D::StandardColor to generate my own palette, which worked nicely with v.0.2.7.0.
With your current version it isn't working anymore.
The version 0.2.7.0 was using the operator()(double x, double y, double z) to figure out which vector gets which color, but you have removed this method.
I assume that your version is now using the method rgba(double x, double y, double z), but for me it isn't working if I rename the operator-method to your rgba-method.
What have you changed or better asked: What should I change to get the old functionality back?
Kind regards,
Pixtar
RGBA MyStandardColor::getColorAt( double x, double y, double z ) const
{
return RGBA(255,0,0);
}
RGBA MyStandardColor::rgba( double x, double y, double z ) const{
return this->getColorAt( x, y, z );
}
A: Working colored example based on my derived class:
MyStandardColor *col_ = new MyStandardColor( );
ColorVector cv;
col_->setColorVector( cv );
StandardColor col;
for( int i = this->hull().minVertex.z; i < this->hull().maxVertex.z; i++ )
{
cv.push_back( col_->rgba(0,0,i) );
}
col.setColorVector( cv );
this->setDataColor( col );
B: Not working pure black example based on my derived class:
MStandardColor col_ = new MStandardColor( );
ColorVector cv;
col_->setColorVector( cv );
this->setDataColor( col_ );
Why is method A working, but not method B?
If I'm not using setColorVector( ) the default gradient will be used, otherwise I get a pure black graph.
What have I missed?
Kind regards,
Pixtar
It's me again.
I figured out what my problem was. :D
My problem was, that I derived from Qwt3D::StandardColor not from it's base class Qwt3D::Color. So now my class is derived from Qwt3D::Color and everything is fine. The plots are now using rgba() instead of operator() as I assumed previously. (Yeah I'm coming from version 0.2.7 ^^)
Thanks again for nice library.