Skip to content

Instantly share code, notes, and snippets.

@zseker
Last active May 9, 2019 02:59
Show Gist options
  • Save zseker/345c9aa8a59cd024c725fbfadf4359c4 to your computer and use it in GitHub Desktop.
Save zseker/345c9aa8a59cd024c725fbfadf4359c4 to your computer and use it in GitHub Desktop.
bowler studio-1st trial
//Move and rotate opperations
double size =40;
CSG cube = new Cube(size,// X dimention
size,// Y dimention
size// Z dimention
).toCSG()
//cubeIntersectSphere = cubeIntersectSphere.move(x,y,z);// vector notation
CSG movedCube = cube
.movex(10)
.movey(20)
.movez(30)
//rotate
//cubeIntersectSphere = cubeIntersectSphere.rot(rx,ry,rz);// vector notation
movedCube = movedCube
.rotx(15)
.roty(20)
.rotz(30)
//set colors
cube.setColor(javafx.scene.paint.Color.CYAN);
CSG secondCube = new Cube(size,size,size).toCSG()
CSG secondMovedCube = secondCube
.movex(25)
.movey(20)
.movez(30)
CSG twoCubes = movedCube.union(secondMovedCube);
CSG trialtwoCubes = twoCubes
.movex(14)
.movey(20)
.movez(30)
return [trialtwoCubes]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment