From e590470c4e34e190c690883a6da7123ca1bfa8a2 Mon Sep 17 00:00:00 2001 From: Guido Ranzuglia granzuglia Date: Fri, 9 Sep 2011 14:57:05 +0000 Subject: [PATCH] added VCGVertexScriptInterface::setP --- src/common/scriptinterface.cpp | 7 ++++++- src/common/scriptinterface.h | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/scriptinterface.cpp b/src/common/scriptinterface.cpp index 9f445e0a8..f007cd492 100644 --- a/src/common/scriptinterface.cpp +++ b/src/common/scriptinterface.cpp @@ -398,7 +398,7 @@ Q_INVOKABLE VCGVertexScriptInterface* MeshModelScriptInterface::v( const int ind return NULL; } -Q_INVOKABLE QVector VCGVertexScriptInterface::p() +Q_INVOKABLE QVector VCGVertexScriptInterface::getP() { QVector vfl(3); for (int ii = 0;ii < 3;++ii) @@ -406,6 +406,11 @@ Q_INVOKABLE QVector 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); diff --git a/src/common/scriptinterface.h b/src/common/scriptinterface.h index 239fec77f..c4e1645ee 100644 --- a/src/common/scriptinterface.h +++ b/src/common/scriptinterface.h @@ -81,7 +81,8 @@ public: VCGVertexScriptInterface(CMeshO::VertexType& v); //Q_INVOKABLE vcg::Point3f* p(); - Q_INVOKABLE QVector p(); + Q_INVOKABLE QVector getP(); + Q_INVOKABLE void setP(const float x,const float y,const float z); CMeshO::VertexType& vv; };