00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <string.h>
00027
00028 #include "db.H"
00029
00030 void
00031 MYPOINT::Transform(MATRIX *M)
00032 {
00033 float a,bb,c,d;
00034 a = p[0] * M->m[0][0] + p[1] * M->m[1][0] + p[2] * M->m[2][0] +
00035 p[3] * M->m[3][0];
00036 bb = p[0] * M->m[0][1] + p[1] * M->m[1][1] + p[2] * M->m[2][1] +
00037 p[3] * M->m[3][1];
00038 c = p[0] * M->m[0][2] + p[1] * M->m[1][2] + p[2] * M->m[2][2] +
00039 p[3] * M->m[3][2];
00040 d = p[0] * M->m[0][3] + p[1] * M->m[1][3] + p[2] * M->m[2][3] +
00041 p[3] * M->m[3][3];
00042 p[0] = a; p[1] = bb; p[2] = c; p[3] = d;
00043 }
00044
00045
00046 OPS_Stream &operator<<(OPS_Stream &os, MYPOINT &point)
00047 {
00048 os <<"Point ("<<point.X()<<' '<<point.Y()<<' '<<
00049 point.Z()<<')';
00050 os << " (" << point.r << ' ' << point.g << ' ' << point.b << " )";
00051 return os;
00052 }
00053
00054 OPS_Stream &operator<<(OPS_Stream &os, FACE &face)
00055 {
00056 os <<"Face: "<< endln;
00057 MYPOINT *point;
00058 FOR_EACH(point, face.pointList)
00059 {
00060 os << (*point) << endln;
00061 }
00062 return os;
00063 }
00064