public BoxPrimitive(BoxPrimitive objectToCopy) : this(objectToCopy.size, objectToCopy.name, objectToCopy.CreateCentered) { }
public Box(Vector3 size, string name = "", bool createCentered = true) : base(name) { root = new BoxPrimitive(size, name, createCentered); }
public string GetScadOutputRecursive(BoxPrimitive objectToProcess, int level = 0) { string info = AddRenderInfoIfReqired(objectToProcess); if (objectToProcess.CreateCentered) { info += "cube([" + objectToProcess.Size.x.ToString() + ", " + objectToProcess.Size.y.ToString() + ", " + objectToProcess.Size.z.ToString() + "], center=true);" + AddNameAsComment(objectToProcess); } else { info += "cube([" + objectToProcess.Size.x.ToString() + ", " + objectToProcess.Size.y.ToString() + ", " + objectToProcess.Size.z.ToString() + "]);" + AddNameAsComment(objectToProcess); } return ApplyIndent(info, level); }
public PolygonMesh.Mesh CsgToMeshRecursive(BoxPrimitive objectToProcess) { if (objectToProcess.CreateCentered) { //objectToProcess.Size; } else { } return PlatonicSolids.CreateCube(objectToProcess.Size); }
public IPrimitive GetIPrimitiveRecursive(BoxPrimitive objectToProcess) { return new BoxShape(Vector3.Zero, objectToProcess.Size, DefaultMaterial); }
public CsgObject DoCopyAndFlatten(BoxPrimitive objectToProcess) { return new BoxPrimitive(objectToProcess); }
public void RenderToGlRecursive(BoxPrimitive objectToProcess) { if (objectToProcess.CreateCentered) { //objectToProcess.Size; } else { } RGBA_Floats partColor = new RGBA_Floats(.8, .8, 1); RenderMeshToGl.Render(CreateBox(objectToProcess.GetAxisAlignedBoundingBox()), partColor); }