Exemplo n.º 1
0
 public BoxPrimitive(BoxPrimitive objectToCopy)
     : this(objectToCopy.size, objectToCopy.name, objectToCopy.CreateCentered)
 {
 }
Exemplo n.º 2
0
 public Box(Vector3 size, string name = "", bool createCentered = true)
     : base(name)
 {
     root = new BoxPrimitive(size, name, createCentered);
 }
Exemplo n.º 3
0
		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);
		}
Exemplo n.º 4
0
		public BoxPrimitive(BoxPrimitive objectToCopy)
			: this(objectToCopy.size, objectToCopy.name, objectToCopy.CreateCentered)
		{
		}
Exemplo n.º 5
0
		public Box(Vector3 size, string name = "", bool createCentered = true)
			: base(name)
		{
			root = new BoxPrimitive(size, name, createCentered);
		}
Exemplo n.º 6
0
		public PolygonMesh.Mesh CsgToMeshRecursive(BoxPrimitive objectToProcess)
		{
			if (objectToProcess.CreateCentered)
			{
				//objectToProcess.Size;
			}
			else
			{
			}

			return PlatonicSolids.CreateCube(objectToProcess.Size);
		}
Exemplo n.º 7
0
		public IPrimitive GetIPrimitiveRecursive(BoxPrimitive objectToProcess)
		{
			return new BoxShape(Vector3.Zero, objectToProcess.Size, DefaultMaterial);
		}
Exemplo n.º 8
0
		public CsgObject DoCopyAndFlatten(BoxPrimitive objectToProcess)
		{
			return new BoxPrimitive(objectToProcess);
		}
Exemplo n.º 9
0
		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);
		}