mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
- added a meshmodel default destructor
This commit is contained in:
parent
48663dc3fc
commit
446ca00dab
@ -130,7 +130,10 @@ public:
|
||||
|
||||
MeshModel(MeshDocument *parent, QString fullFileName, QString labelName);
|
||||
MeshModel(MeshModel* cp);
|
||||
|
||||
~MeshModel()
|
||||
{
|
||||
}
|
||||
|
||||
MeshDocument *parent;
|
||||
|
||||
CMeshO cm;
|
||||
|
||||
@ -635,6 +635,20 @@ float EnvWrap::evalFloat(const QString& nm)
|
||||
return float();
|
||||
}
|
||||
|
||||
MESHLAB_SCALAR EnvWrap::evalReal(const QString& nm)
|
||||
{
|
||||
try
|
||||
{
|
||||
double result = evalDouble(nm);
|
||||
return (MESHLAB_SCALAR)result;
|
||||
}
|
||||
catch (ExpressionHasNotThisTypeException& /*exc*/)
|
||||
{
|
||||
throw ExpressionHasNotThisTypeException("Real", nm);
|
||||
}
|
||||
return MESHLAB_SCALAR();
|
||||
}
|
||||
|
||||
int EnvWrap::evalInt(const QString& nm)
|
||||
{
|
||||
try
|
||||
@ -661,6 +675,18 @@ vcg::Point3f EnvWrap::evalVec3(const QString& nm)
|
||||
return vcg::Point3f();
|
||||
}
|
||||
|
||||
vcg::Point3<MESHLAB_SCALAR> EnvWrap::evalVec3Real(const QString& nm)
|
||||
{
|
||||
QScriptValue result = evalExp(nm);
|
||||
QVariant resVar = result.toVariant();
|
||||
QVariantList resList = resVar.toList();
|
||||
if (resList.size() == 3)
|
||||
return vcg::Point3<MESHLAB_SCALAR>(resList[0].toReal(), resList[1].toReal(), resList[2].toReal());
|
||||
else
|
||||
throw ExpressionHasNotThisTypeException("Vec3", nm);
|
||||
return vcg::Point3<MESHLAB_SCALAR>();
|
||||
}
|
||||
|
||||
int EnvWrap::evalEnum(const QString& nm)
|
||||
{
|
||||
return evalInt(nm);
|
||||
|
||||
@ -250,8 +250,10 @@ public:
|
||||
bool evalBool(const QString& nm);
|
||||
double evalDouble(const QString& nm);
|
||||
float evalFloat( const QString& nm );
|
||||
MESHLAB_SCALAR evalReal(const QString& nm);
|
||||
int evalInt( const QString& nm );
|
||||
vcg::Point3f evalVec3(const QString& nm);
|
||||
vcg::Point3<MESHLAB_SCALAR> evalVec3Real(const QString& nm);
|
||||
QColor evalColor(const QString& nm);
|
||||
/*QString getExpType(const QString& nm);*/
|
||||
QString evalString(const QString& nm);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user