If this post is correct, the reason of my error is an incorrect way to create an object, but looking a bit my code, I cannot find the error:
Here's the code:
Error function
void Joint::addVertex(double x, double y, double z)
{
Vertex v;
v.x = x;
v.y = y;
v.z = z;
qDebug() << "Checkpoint 20" << v.x << v.y << v.z <<endl;
vertexVector.push_back(v);
}
void Joint::addVertex(double x, double y, double z)
{
Vertex v;
v.x = x;
v.y = y;
v.z = z;
qDebug() << "Checkpoint 20" << v.x << v.y << v.z <<endl;
vertexVector.push_back(v);
}
To copy to clipboard, switch view to plain text mode
header of the object Vertex
#ifndef VERTEX_H
#define VERTEX_H
class Vertex
{
public:
Vertex();
double x,y,z; //coordonnées
};
#endif // VERTEX_H
#ifndef VERTEX_H
#define VERTEX_H
class Vertex
{
public:
Vertex();
double x,y,z; //coordonnées
};
#endif // VERTEX_H
To copy to clipboard, switch view to plain text mode
Declaration of vertexVector:
private:
std::vector<Vertex> vertexVector;
private:
std::vector<Vertex> vertexVector;
To copy to clipboard, switch view to plain text mode
Bookmarks