I have the following classes:
class Vertex {
public: float X;
float Y;
float Z;
Vertex (float first, float second, float third){
X=first;
Y=second;
Z=third;
}
};
class Obj {
vector<Vertex>vertexCoordinates;
vector<vector<int>> faces;
vector <vector<float>> faceNormals;
vector <vector<float>> faceCenters;
string objName;
int vertexCount, faceCount, edgeCount;
float maxX, minX, maxY, minY, maxZ, minZ, dx, dy, dz;
setVertexCoordinates(vector <Vertex> vertexCoordinatesP) {
vertexCoordinates = vertexCoordinatesP; //??
// How should the assignment be defined?
}
};
Do I need to create a copy constructor here? Overload the operator =
for Vertex
and Obj
?