public Face(NObject parent) { this.Parent = parent; Adjacent = new Face[Parent.Point.Length]; AdjacentIdx = new UInt16[Parent.Point.Length]; Offset = new SerializableVector3[4]; }
// to should be a standardized position created by comparing from(if it exists), the ray cast, and the ray hit public QuadWall(NObject fromObject, Vector3 from, Vector3 to) : this() { // Set two points to match the nearest two on the object we are starting from // Only using indices 0 and 1 is important, because correcting quad rotational // traversal order is done by swapping 3 and 4 to create order 1, 2, 3, 4 NPoint[] adjacent = fromObject.ClosestPair(from).ToArray(); this.Point[0] = adjacent[0]; this.Point[1] = adjacent[1]; }