public void setRightPlane(LVector3 pivot, LVector3 rightEdgeVertex) { rightPlane.set(pivot, pivot.Add(LVector3.up), rightEdgeVertex); // 高度 rightPlane.normal = -rightPlane.normal; // 平面方向取反 rightPlane.d = -rightPlane.d; rightPortal = (rightEdgeVertex); }
public Triangle(LVector3 a, LVector3 b, LVector3 c, int index, params int[] vectorIndex) { this.a = a; this.b = b; this.c = c; this.y = (a.y + b.y + c.y) / 3; this.index = index; this.center = a.Add(b).Add(c).scl(1 / 3.ToLFloat()); this.connections = new List <Connection <Triangle> >(); this.vectorIndex = vectorIndex; }
public LVector3 pivot = new LVector3(); // 漏斗点,路径的起点或拐点 public void setLeftPlane(LVector3 pivot, LVector3 leftEdgeVertex) { leftPlane.set(pivot, pivot.Add(LVector3.up), leftEdgeVertex); leftPortal = leftEdgeVertex; }