157 assert(vTrig1 && vTrig2);
170 float local98 = 0.0f;
182 if (local98 < locala4) {
187 if (locala4 < local9c) {
191 if (local9c < local98) {
194 if (local9c - local98 < 0.0025) {
240 float local28 = 0.0f;
242 local3c = *local8[i];
243 local3c -= *local8[i - 1];
244 local50 = *local8[i - 2];
245 local50 -= *local8[i - 1];
250 if (local28 < 0.00001f) {
254 float local58 = sqrt((
double) local28);
259 if (local54 < 0.98) {
273 if (local8 !=
NULL) {
virtual LegoS32 VTable0x04()
[AI] Connects and links the associated edge objects to set up adjacency across the face.
LegoU8 m_numEdges
[AI] Number of edge elements in m_edges; number of sides of the polygon. [AI]
LegoU8 GetNumEdges()
[AI] Returns the number of edge elements assigned to this face.
LegoU32 IsEqual(LegoWEEdge *p_other)
[AI] Checks if this face object is the same as another.
LegoUnknown100db7f4 ** m_edges
[AI] Array of pointers to edge objects (LegoUnknown100db7f4) comprising this face....
[AI] Represents a "geometry edge" in the LEGO Island world polygon/path system.
Mx4DPointFloat m_unk0x14
[AI] 4D plane equation or normal used for polygon/edge side tests. [AI]
float m_unk0x44
[AI] Maximum squared distance from center—polygon bounding radius or similar. [AI]
LegoS32 VTable0x04() override
[AI] Performs geometry calculations for the edge, sets up normals, center point, and trigger vectors.
LegoU8 m_numTriggers
[AI] Number of trigger (path/segment) structures attached to this edge. [AI]
Mx3DPointFloat * m_unk0x50
[AI] Transition direction/unit vector—used for edge trigger geometry. [AI]
Mx4DPointFloat * m_edgeNormals
[AI] Per-edge normals for each polygon segment, allocated dynamically. [AI]
LegoS32 FUN_1009aea0()
[AI] Internal routine called by VTable0x04 for validity checking of polygon vertices and normal consi...
LegoChar * m_name
[AI] Edge's name string, dynamically allocated for debug/lookup. [AI]
PathWithTrigger * m_pathTrigger
[AI] Array of triggers influencing entity motion or event logic on this edge. [AI]
~LegoWEGEdge() override
[AI] Destroys this edge instance and properly deallocates memory for associated dynamic members.
Mx3DPointFloat m_unk0x30
[AI] Cached center for the edge polygon, used in geometric calculations. [AI]
[AI] Represents a 3D point with floating-point precision, inheriting from Vector3.
[AI] 4D point class for floating point values.
virtual float Dot(const float *p_a, const float *p_b) const
[AI] Compute the dot product of the two float arrays interpreted as vectors of 2 elements.
virtual int Unitize()
[AI] Scales the vector so its norm is 1 (unit vector).
[AI] 3D vector class, providing vector and cross-product operations in 3D space.
void Clear() override
[AI] Sets every coordinate (x, y, z) to zero.
float LenSquared() const override
[AI] Computes the squared magnitude (x^2 + y^2 + z^2) of this vector.
virtual void EqualsCross(const Vector3 &p_a, const Vector3 &p_b)
[AI] Sets this vector to be the cross product of p_a and p_b.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
long LegoS32
[AI] Signed 32-bit integer type for cross-platform compatibility.
Vector3 * CWVertex(LegoWEEdge &p_face)
[AI] Returns the "clockwise" endpoint of this edge with respect to a given face.
Vector3 * m_pointB
[AI] The second endpoint of the edge.
LegoWEEdge * GetFaceB()
[AI] Gets the second face (B) using this edge.
LegoWEEdge * GetFaceA()
[AI] Gets the first face (A) using this edge.
Vector3 * m_pointA
[AI] The first endpoint of the edge.
Vector3 * CCWVertex(LegoWEEdge &p_face)
[AI] Returns the "counterclockwise" endpoint of this edge with respect to a given face.
[AI] Represents an advanced edge in the LEGO Island geometry system, with direction,...
@ c_bit2
[AI] Bit flag 2 for face A connection/properties
@ c_bit1
[AI] Bit flag 1 for face B connection/properties
float m_unk0x3c
[AI] Unknown float; likely represents additional metric (possibly precomputed distance/weight).
Mx3DPointFloat m_unk0x28
[AI] Represents the edge's direction/normal vector or outward face normal.
LegoResult FUN_1002ddc0(LegoWEEdge &p_f, Vector3 &p_point) const
[AI] Calculates the edge normal for use from the given face, negating it if called from faceA.
void SetFlags(LegoU16 p_flags)
[AI] Directly sets the internal flags value.
[AI] Represents a path segment with an associated trigger in LEGO Island pathing logic.
float m_unk0x08
[AI] Distance along the path or trigger threshold (exact semantics unclear). [AI]