Prototypes of QTextStream input and output operators for various matrices and vectors. More...
#include <QTextStream>#include "matvec3D.h"

Go to the source code of this file.
Defines | |
| #define | _MATVECIO_H_ |
Functions | |
| QTextStream & | operator<< (QTextStream &os, const transf &tr) |
| QTextStream & | operator<< (QTextStream &os, const Quaternion &q) |
| QTextStream & | operator<< (QTextStream &os, const mat3 &m) |
| QTextStream & | operator<< (QTextStream &os, const position &p) |
| QTextStream & | operator<< (QTextStream &os, const vec3 &v) |
| QTextStream & | operator>> (QTextStream &is, transf &tr) |
| QTextStream & | operator>> (QTextStream &is, Quaternion &q) |
| QTextStream & | operator>> (QTextStream &is, mat3 &m) |
| QTextStream & | operator>> (QTextStream &is, position &p) |
| QTextStream & | operator>> (QTextStream &is, vec3 &v) |
| int | readTransRotFromQTextStream (QTextStream &is, transf &tr) |
Prototypes of QTextStream input and output operators for various matrices and vectors.
Definition in file matvecIO.h.
| #define _MATVECIO_H_ |
Definition at line 52 of file matvecIO.h.
| QTextStream& operator<< | ( | QTextStream & | os, | |
| const transf & | tr | |||
| ) |
Writes a transf to a QTextStream in the format "(qw qx qy qz)[x y z]".
Definition at line 171 of file matvecIO.cpp.
| QTextStream& operator<< | ( | QTextStream & | os, | |
| const Quaternion & | q | |||
| ) |
Writes a quaternion to a QTextStream in the format "(qw qx qy qz)".
Definition at line 142 of file matvecIO.cpp.
| QTextStream& operator<< | ( | QTextStream & | os, | |
| const mat3 & | m | |||
| ) |
Writes a mat3 to a QTextStream in the format:
[m1,1 m1,2 m1,3] [m2,1 m2,2 m2,3] [m3,1 m3,2 m3,3]
Definition at line 114 of file matvecIO.cpp.
| QTextStream& operator<< | ( | QTextStream & | os, | |
| const position & | p | |||
| ) |
Writes a position to a QTextStream in the format "[x y z]".
Definition at line 80 of file matvecIO.cpp.
| QTextStream& operator<< | ( | QTextStream & | os, | |
| const vec3 & | v | |||
| ) |
Writes a vec3 to a QTextStream in the format "[x y z]".
Definition at line 54 of file matvecIO.cpp.
| QTextStream& operator>> | ( | QTextStream & | is, | |
| transf & | tr | |||
| ) |
Reads a transf from a QTextStream. The format should be "(qw qx qy qz)[x y z]", where the 4 vector is a quaternion describing the rotation and the 3 vector is a position.
Definition at line 156 of file matvecIO.cpp.
| QTextStream& operator>> | ( | QTextStream & | is, | |
| Quaternion & | q | |||
| ) |
Reads a Quaternion from a QTextStream. The format should be "(qw qx qy qz)".
Definition at line 129 of file matvecIO.cpp.
| QTextStream& operator>> | ( | QTextStream & | is, | |
| mat3 & | m | |||
| ) |
Reads a mat3 from a QTextStream. The format should be:
[m1,1 m1,2 m1,3] [m2,1 m2,2 m2,3] [m3,1 m3,2 m3,3]
Definition at line 97 of file matvecIO.cpp.
| QTextStream& operator>> | ( | QTextStream & | is, | |
| position & | p | |||
| ) |
Reads a position from a QTextStream. The format should be "[x y z]".
Definition at line 66 of file matvecIO.cpp.
| QTextStream& operator>> | ( | QTextStream & | is, | |
| vec3 & | v | |||
| ) |
Reads a vec3 from a QTextStream. The format should be "[x y z]".
Definition at line 40 of file matvecIO.cpp.
| int readTransRotFromQTextStream | ( | QTextStream & | stream, | |
| transf & | tr | |||
| ) |
Reads a transform from a QTextStream that could be in a number of possible formats. The first character of the line determines the format:
The total transform starts as the identitiy, and after a transform from a line is read, it is multipled to the total. This continues until the first charater of a line is not one of the above 4 characters. The total transform is returned in tr. FAILURE is returned if a formatting error is encountered, otherwise SUCCESS is returned.
Definition at line 194 of file matvecIO.cpp.