Skip to content
Snippets Groups Projects
Commit 16ffea1d authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

cast in bindings for MVertex::x,y,z

parent 45790967
No related branches found
No related tags found
No related merge requests found
...@@ -405,8 +405,10 @@ void MVertex::registerBindings(binding *b) ...@@ -405,8 +405,10 @@ void MVertex::registerBindings(binding *b)
classBinding *cb = b->addClass<MVertex>("MVertex"); classBinding *cb = b->addClass<MVertex>("MVertex");
methodBinding *cm; methodBinding *cm;
cm = cb->addMethod("getNum",&MVertex::getNum); cm = cb->addMethod("getNum",&MVertex::getNum);
// cm = cb->addMethod("x",&MVertex::x); // here we specify the cast because there are 2 MVertex::x function
// cm = cb->addMethod("y",&MVertex::y); cm = cb->addMethod("x", (double (MVertex::*)() const) &MVertex::x);
// cm = cb->addMethod("z",&MVertex::z); cm = cb->addMethod("x2", (double& (MVertex::*)()) &MVertex::x);
cm = cb->addMethod("y", (double (MVertex::*)() const) &MVertex::y);
cm = cb->addMethod("z", (double (MVertex::*)() const) &MVertex::z);
cm = cb->setConstructor<MVertex,double,double,double>(); cm = cb->setConstructor<MVertex,double,double,double>();
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment