#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 9 of file polygon.cpp. References numVertices.
00010 : 00011 numVertices(3) 00012 { 00013 00014 } |
|
Definition at line 16 of file polygon.cpp.
00017 { 00018 } |
|
Definition at line 20 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().
00021 { 00022 VECTOR temp; 00023 float ux; 00024 float uy; 00025 float uz; 00026 float vx; 00027 float vy; 00028 float vz; 00029 ux = Vertex[1].x - Vertex[0].x; 00030 uy = Vertex[1].y - Vertex[0].y; 00031 uz = Vertex[1].z - Vertex[0].z; 00032 vx = Vertex[2].x - Vertex[0].x; 00033 vy = Vertex[2].y - Vertex[0].y; 00034 vz = Vertex[2].z - Vertex[0].z; 00035 temp.x = (uy*vz)-(vy*uz); 00036 temp.y = (uz*vx)-(vz*ux); 00037 temp.z = (ux*vy)-(vx*uy); 00038 return temp; 00039 } |
|
Definition at line 41 of file polygon.cpp. References VERTEX::nx, VERTEX::ny, VERTEX::nz, Vertex, VERTEX::x, VERTEX::y, and VERTEX::z. Referenced by SetGLWorld(), and SplitPolygon().
00042 { 00043 float ux; 00044 float uy; 00045 float uz; 00046 float vx; 00047 float vy; 00048 float vz; 00049 ux = Vertex[1].x - Vertex[0].x; 00050 uy = Vertex[1].y - Vertex[0].y; 00051 uz = Vertex[1].z - Vertex[0].z; 00052 vx = Vertex[2].x - Vertex[0].x; 00053 vy = Vertex[2].y - Vertex[0].y; 00054 vz = Vertex[2].z - Vertex[0].z; 00055 Vertex[0].nx = (uy*vz)-(vy*uz); 00056 Vertex[0].ny = (uz*vx)-(vz*ux); 00057 Vertex[0].nz = (ux*vy)-(vx*uy); 00058 Vertex[1].nx = Vertex[0].nx; 00059 Vertex[1].ny = Vertex[0].ny; 00060 Vertex[1].nz = Vertex[0].nz; 00061 Vertex[2].nx = Vertex[0].nx; 00062 Vertex[2].ny = Vertex[0].ny; 00063 Vertex[2].nz = Vertex[0].nz; 00064 } |
|
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(). |