added VCGVertexScriptInterface::setP

This commit is contained in:
Guido Ranzuglia granzuglia 2011-09-09 14:57:05 +00:00
parent f74484ac9d
commit e590470c4e
2 changed files with 8 additions and 2 deletions

View File

@ -398,7 +398,7 @@ Q_INVOKABLE VCGVertexScriptInterface* MeshModelScriptInterface::v( const int ind
return NULL;
}
Q_INVOKABLE QVector<float> VCGVertexScriptInterface::p()
Q_INVOKABLE QVector<float> VCGVertexScriptInterface::getP()
{
QVector<float> vfl(3);
for (int ii = 0;ii < 3;++ii)
@ -406,6 +406,11 @@ Q_INVOKABLE QVector<float> VCGVertexScriptInterface::p()
return vfl;
}
Q_INVOKABLE void VCGVertexScriptInterface::setP( const float x,const float y,const float z )
{
vv.P() = vcg::Point3f(x,y,z);
}
QScriptValue MeshModelScriptInterfaceToScriptValue(QScriptEngine* eng,MeshModelScriptInterface* const& in)
{
return eng->newQObject(in);

View File

@ -81,7 +81,8 @@ public:
VCGVertexScriptInterface(CMeshO::VertexType& v);
//Q_INVOKABLE vcg::Point3f* p();
Q_INVOKABLE QVector<float> p();
Q_INVOKABLE QVector<float> getP();
Q_INVOKABLE void setP(const float x,const float y,const float z);
CMeshO::VertexType& vv;
};