Isle
Loading...
Searching...
No Matches
legoedge.cpp
Go to the documentation of this file.
1#include "legoedge.h"
2
3#include "assert.h"
4#include "decomp.h"
5
7
8// FUNCTION: LEGO1 0x1009a470
10{
11 m_faceA = NULL;
12 m_faceB = NULL;
13 m_ccwA = NULL;
14 m_cwA = NULL;
15 m_ccwB = NULL;
16 m_cwB = NULL;
17 m_pointA = NULL;
18 m_pointB = NULL;
19}
20
21// FUNCTION: LEGO1 0x1009a4c0
23{
24}
25
26// FUNCTION: LEGO1 0x1009a4d0
28{
29 if (&p_face == m_faceA) {
30 return m_cwA;
31 }
32 else if (&p_face == m_faceB) {
33 return m_cwB;
34 }
35 else {
36 return NULL;
37 }
38}
39
40// FUNCTION: LEGO1 0x1009a4f0
42{
43 if (&p_face == m_faceA) {
44 return m_ccwA;
45 }
46 else if (&p_face == m_faceB) {
47 return m_ccwB;
48 }
49 else {
50 return NULL;
51 }
52}
53
54// FUNCTION: LEGO1 0x1009a510
55// FUNCTION: BETA10 0x10182433
57{
58 if (m_faceA == &p_face) {
59 return m_pointB;
60 }
61 else {
62 assert(m_faceB == &p_face);
63 return m_pointA;
64 }
65}
66
67// FUNCTION: LEGO1 0x1009a530
68// FUNCTION: BETA10 0x10182498
70{
71 if (m_faceB == &p_face) {
72 return m_pointB;
73 }
74 else {
75 assert(m_faceA == &p_face);
76 return m_pointA;
77 }
78}
[AI] Represents a face (polygon) composed of a list of edges in the LEGO Island world engine.
Definition: legoweedge.h:17
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
Definition: vector.h:249
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
[AI] Represents an edge in the LEGO world geometry graph.
Definition: legoedge.h:16
LegoEdge * m_ccwB
[AI] Next edge (counterclockwise) around face B.
Definition: legoedge.h:118
LegoWEEdge * m_faceA
[AI] Pointer to the first face sharing this edge.
Definition: legoedge.h:97
virtual ~LegoEdge()
[AI] Destructor.
Definition: legoedge.cpp:22
LegoEdge * m_cwB
[AI] Next edge (clockwise) around face B.
Definition: legoedge.h:123
Vector3 * CWVertex(LegoWEEdge &p_face)
[AI] Returns the "clockwise" endpoint of this edge with respect to a given face.
Definition: legoedge.cpp:56
LegoWEEdge * m_faceB
[AI] Pointer to the second face sharing this edge.
Definition: legoedge.h:103
LegoEdge * GetCounterclockwiseEdge(LegoWEEdge &p_face)
[AI] Returns the counterclockwise adjacent edge relative to the given face.
Definition: legoedge.cpp:41
Vector3 * m_pointB
[AI] The second endpoint of the edge.
Definition: legoedge.h:133
LegoEdge * GetClockwiseEdge(LegoWEEdge &p_face)
[AI] Returns the clockwise adjacent edge relative to the given face.
Definition: legoedge.cpp:27
LegoEdge * m_ccwA
[AI] Next edge (counterclockwise) around face A.
Definition: legoedge.h:108
LegoEdge * m_cwA
[AI] Next edge (clockwise) around face A.
Definition: legoedge.h:113
Vector3 * m_pointA
[AI] The first endpoint of the edge.
Definition: legoedge.h:128
Vector3 * CCWVertex(LegoWEEdge &p_face)
[AI] Returns the "counterclockwise" endpoint of this edge with respect to a given face.
Definition: legoedge.cpp:69