Created
January 4, 2020 22:23
-
-
Save skyburchard/07b7d0a25436ed8fd04b155fa0322eac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float width = chf("width"); | |
float depth = chf("depth"); | |
float halfWidth = width * 0.5; | |
float halfDepth = depth * 0.5; | |
vector v0 = set( halfWidth, 0, halfDepth); | |
vector v1 = set(-halfWidth, 0, halfDepth); | |
vector v2 = set(-halfWidth, 0, -halfDepth); | |
vector v3 = set( halfWidth, 0, -halfDepth); | |
int pnt0 = addpoint(0, v0); | |
int pnt1 = addpoint(0, v1); | |
int pnt2 = addpoint(0, v2); | |
int pnt3 = addpoint(0, v3); | |
int prim0 = addprim(0, "poly"); | |
int vert0 = addvertex(0, prim0, pnt0); | |
int vert1 = addvertex(0, prim0, pnt1); | |
int vert2 = addvertex(0, prim0, pnt2); | |
int vert3 = addvertex(0, prim0, pnt3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment