class GzMatrix:public vector<vector<GzReal> > {
public:
//Note: Since this calss inherits std::vector, copy constructor and
// operator = are not required to define. However, you should define
// them in general case.
void resize(GzInt _nRow, GzInt _nCol); //Resize to _nRow by _nCol
GzInt nRow() const; //Return the number of rows
GzInt nCol() const; //Return the number of columns
//Converter between GzVertex and GzMatrix with homogeneous coordinate
//GzMatrix is a 4 by 1 vector: [0][0]=X, [1][0]=Y, [2][0]=Z, [3][0]=W
GzVertex toVertex(); //Convert to vertex
void fromVertex(const GzVertex& v); //Convert from vertex
private:
};
i created an object of GzMatrix in Gz class as,
GzMatrix transMatrix;
and struct GzVertes as
GzVertex v;
now i need to convert the structure variable v into trans matrix using the method
void fromVertex(const GzVertex& v);
declared in GzMatrix class.
i am calling the method fromVertex from Gz class as
transMatrix.fromVertex(v);
now how can i initialize the contents of transMatrix from the method fromVertex in GzMatrix class??
it may be a simple but i just can't figure it out on my own. can some one help me pls...