public override void Create() { foreach (Node n in Children) { Convexes.AddRange(n.Convexes.Select(a => a.Copy())); } }
public override void Create() { Matrix3D m = new TranslateTransform3D(Translation).Value; foreach (Node n in Children) { Convexes.AddRange(n.Convexes.Select(a => a.Copy().ApplyTransform(m))); } }
public override void Create() { Matrix3D m = new RotateTransform3D(new AxisAngleRotation3D(Axis, Angle)).Value; foreach (Node n in Children) { Convexes.AddRange(n.Convexes.Select(a => a.Copy().ApplyTransform(m))); } }
public override void Create() { Convex cvx = new Convex(); cvx.Is3d = false; cvx.Vertices.Add(new Vertex(cvx, -Size.X * 0.5, -Size.Y * 0.5)); cvx.Vertices.Add(new Vertex(cvx, -Size.X * 0.5, Size.Y * 0.5)); cvx.Vertices.Add(new Vertex(cvx, Size.X * 0.5, Size.Y * 0.5)); cvx.Vertices.Add(new Vertex(cvx, Size.X * 0.5, -Size.Y * 0.5)); cvx.Faces.Add(new Face(cvx, 0, 1, 2, 3)); cvx.BuildFromVertsAndFaces(); Convexes.Add(cvx); }