Parameters: int slices, int rings, void * shared
Returns: LandCSG*
Make a sphere with radius 1.0. It fits within a cube from -1/-1/-1 to 1/1/1.
rings determines how many parts the latitude is divided into, a value of 3 means just south pole, equator and north pole. slices determins how many parts the longitude is divided into, a value of 3 means 0-meridian, +120° and -120°.
Parameters: int divisions, void * shared
Make a sphere out of a repeatedly subdivided tetrahedron.
Parameters: int slices, void * shared
Parameters: int slices, bool opened, float top_radius, void * shared
Make a cut cone along the z-axis with radius 1.0 at the botton and radius top_radius at the top at height 2.0. It fits within a cube from -1/-1/-1 to 1/1/1.
Parameters: int slices, bool opened, void * shared
Make a cone along the z-axis with radius 1.0 and height 2.0. The top of the cone is at 0/0/1. It fits within a cube from -1/-1/-1 to 1/1/1.
Parameters: LandFloat top_x, LandFloat top_y, LandFloat top_z, void * shared
Make a 4-sided pyramid with a side-length of 1 at the base. The top is at top_x/top_y/top_z.
Parameters: void * shared
Parameters: bool opened, LandFloat top_x, LandFloat top_y, LandFloat top_z, LandFloat top_w, LandFloat top_h, void * shared
Make a 4-sided pyramid with a side-length of 1 at the base. The top is centered at top_x/y/z and extends by top_w, top_h.
Parameters: bool opened, LandFloat top_x, LandFloat top_y, void * shared
Make a 4-sided pyramid with a side-length of 1 at the base and a height of 2. The half side-length at the top is top_x times top_y.
Make a tetrahedron.
Make a cube from -1/-1/-1 to 1/1/1.
Parameters: int x, int y, int z, bool outside, void * shared
Parameters: int x, int y, void * shared
Parameters: int n, void * shared
n is the shape - 3 for triangle, 4 for square, 5 for pentagon… The prism extrudes along the z axis from -1 to 1. The first edge is at y = 1 the others are on a circle around 0/0 with radius 1 in the x/y plane.
Parameters: LandFloat x1, LandFloat x2, void * shared
This is a prism, from one shape at z=-1 to another at z=1. The shape is assymetrical, at y=-1 the length is 2, from x=-1 to x=1. At y=1 it goes from x1 to x2. If x1=-1 and x2=1 this is identical to csg_cube. y 1 x1__.x2 | 0 | | |.__ -1 0 1 x
Parameters: LandVector a, LandVector b, LandFloat d, void * shared
This extrudes a triangle with points 0/a/b along a distance of d.
Parameters: LandVector a, LandVector b, LandVector c, LandVector d, void * shared
Parameters: int slices, int segments, LandFloat diameter, void * shared
slices is the longitude subdivisions, or how many “disks” the torus is cut into along its outer circle
segments is the "latitude" subdivisions, i.e. how many segments each individual disk has diameter is the size of the tube and must be greater than 0 (thin) and less than 1 (thick). The torus has radius of 1 around the origin and lies in the X/Y plane. The outer radius therefore is 1 + diameter / 2.
Parameters: LandCSGPolygon * p
Parameters: LandCSG * csg
Parameters: LandCSG * csg, double radius
FIXME: implement! The idea is to create a mesh from another mesh which is a voxelized version. Everything is cubes.