#include <polygon.h>
Public Methods | |
| POLYGON () | |
| ~POLYGON () | |
| VECTOR | GetNormal () |
| void | SetNormal () |
Public Attributes | |
| float | Scale [2] |
| float | Shift [2] |
| float | Rotate |
| unsigned int | Texture |
| int | numVertices |
| VERTEX | Vertex [3] |
|
|
Definition at line 10 of file polygon.cpp. References numVertices.
00011 : 00012 numVertices(3) 00013 { 00014 00015 } |
|
|
Definition at line 17 of file polygon.cpp.
00018 {
00019 }
|
|
|
Definition at line 21 of file polygon.cpp. References Vertex, VECTOR::x, VERTEX::x, VECTOR::y, VERTEX::y, VECTOR::z, and VERTEX::z. Referenced by CheckForCollision(), CreateLargePortal(), and CreateLightmaps().
00022 {
00023 VECTOR temp;
00024 float ux;
00025 float uy;
00026 float uz;
00027 float vx;
00028 float vy;
00029 float vz;
00030 ux = Vertex[1].x - Vertex[0].x;
00031 uy = Vertex[1].y - Vertex[0].y;
00032 uz = Vertex[1].z - Vertex[0].z;
00033 vx = Vertex[2].x - Vertex[0].x;
00034 vy = Vertex[2].y - Vertex[0].y;
00035 vz = Vertex[2].z - Vertex[0].z;
00036 temp.x = (uy*vz)-(vy*uz);
00037 temp.y = (uz*vx)-(vz*ux);
00038 temp.z = (ux*vy)-(vx*uy);
00039 return temp;
00040 }
|
|
|
Definition at line 42 of file polygon.cpp. References VERTEX::nx, VERTEX::ny, VERTEX::nz, Vertex, VERTEX::x, VERTEX::y, and VERTEX::z. Referenced by SetGLWorld(), and SplitPolygon().
00043 {
00044 float ux;
00045 float uy;
00046 float uz;
00047 float vx;
00048 float vy;
00049 float vz;
00050 ux = Vertex[1].x - Vertex[0].x;
00051 uy = Vertex[1].y - Vertex[0].y;
00052 uz = Vertex[1].z - Vertex[0].z;
00053 vx = Vertex[2].x - Vertex[0].x;
00054 vy = Vertex[2].y - Vertex[0].y;
00055 vz = Vertex[2].z - Vertex[0].z;
00056 Vertex[0].nx = (uy*vz)-(vy*uz);
00057 Vertex[0].ny = (uz*vx)-(vz*ux);
00058 Vertex[0].nz = (ux*vy)-(vx*uy);
00059 Vertex[1].nx = Vertex[0].nx;
00060 Vertex[1].ny = Vertex[0].ny;
00061 Vertex[1].nz = Vertex[0].nz;
00062 Vertex[2].nx = Vertex[0].nx;
00063 Vertex[2].ny = Vertex[0].ny;
00064 Vertex[2].nz = Vertex[0].nz;
00065 }
|
|
|
Definition at line 23 of file polygon.h. Referenced by SplitPolygon(). |
|
|
Definition at line 21 of file polygon.h. Referenced by RenderBSP(), and SetGLWorld(). |
|
|
Definition at line 19 of file polygon.h. Referenced by RenderBSP(), and SetGLWorld(). |
|
|
Definition at line 20 of file polygon.h. Referenced by RenderBSP(), and SetGLWorld(). |
|
|
Definition at line 22 of file polygon.h. Referenced by RenderBSP(), and SetGLWorld(). |
|
|
Definition at line 24 of file polygon.h. Referenced by CheckForCollision(), ClassifyInvertedPortal(), ClassifyPortal(), CreateLargePortal(), CreateLightmaps(), FindCurrentLeaf(), GetEdgeIntersection(), GetNormal(), InitGL(), InvertPortals(), RenderBSP(), SetGLWorld(), SetNormal(), SplitPolygon(), and SplitPortal(). |
1.2.15