• allegro5.a5_display
  • allegro5.a5_file
  • allegro5.a5_font
  • allegro5.a5_image
  • allegro5.a5_joystick
  • allegro5.a5_main
  • allegro5.a5_misc
  • allegro5.a5_opengl
  • allegro5.a5_shader
  • allegro5.a5_sound
  • allegro5.a5_thread
  • allegro5.a5_triangles
  • animation
  • array
  • atlas
  • buffer
  • color
  • common
  • csg.csg_aabb
  • csg.csg
  • csg.csg_octree
  • csg.csg_shapes
  • csg.csg_test
  • data
  • display
  • exception
  • file
  • font
  • glsl
  • grid
  • hash
  • image
  • image_op
  • index
  • ini
  • isometric
  • joystick
  • keyboard
  • land
  • layer
  • list
  • log
  • main
  • map
  • mem
  • mouse
  • net
  • noise
  • openglutil
  • perlin
  • pixelmask
  • plasma
  • pool
  • protobuf
  • queue
  • random
  • runner
  • shader
  • sound
  • sprite
  • thread
  • tilegrid
  • triangles
  • util2d
  • util3d
  • util
  • view
  • voronoi
  • widget.base
  • widget.board
  • widget.book
  • widget.box
  • widget.button
  • widget.checkbox
  • widget.container
  • widget.edit
  • widget.gul
  • widget.hbox
  • widget.layout
  • widget
  • widget.menu
  • widget.mover
  • widget.panel
  • widget.scrollbar
  • widget.scrolling
  • widget.sizer
  • widget.slider
  • widget.spin
  • widget.text
  • widget.theme
  • widget.vbox
  • widget.widget_list
  • yaml.external
  • yaml.internal
  • yaml
  • yaml.xml

land.csg.csg_shapes

csg_sphere

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°.

csg_tetrasphere

Parameters: int divisions, void * shared

Returns: LandCSG*

Make a sphere out of a repeatedly subdivided tetrahedron.

land_csg_icosphere

Parameters: int divisions, void * shared

Returns: LandCSG*

csg_cylinder

Parameters: int slices, void * shared

Returns: LandCSG*

csg_cut_cone_open

Parameters: int slices, bool opened, float top_radius, void * shared

Returns: LandCSG*

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.

csg_cylinder_open

Parameters: int slices, bool opened, void * shared

Returns: LandCSG*

csg_cone

Parameters: int slices, void * shared

Returns: LandCSG*

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.

csg_irregular_pyramid

Parameters: LandFloat top_x, LandFloat top_y, LandFloat top_z, void * shared

Returns: LandCSG*

Make a 4-sided pyramid with a side-length of 1 at the base. The top is at top_x/top_y/top_z.

csg_pyramid

Parameters: void * shared

Returns: LandCSG*

csg_cut_irregular_pyramid_open

Parameters: bool opened, LandFloat top_x, LandFloat top_y, LandFloat top_z, LandFloat top_w, LandFloat top_h, void * shared

Returns: LandCSG*

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.

csg_cut_pyramid_open

Parameters: bool opened, LandFloat top_x, LandFloat top_y, void * shared

Returns: LandCSG*

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.

csg_tetrahedron

Parameters: void * shared

Returns: LandCSG*

Make a tetrahedron.

csg_cube

Parameters: void * shared

Returns: LandCSG*

Make a cube from -1/-1/-1 to 1/1/1.

csg_block2

Parameters: int x, int y, int z, bool outside, void * shared

Returns: LandCSG*

csg_block

Parameters: int x, int y, int z, bool outside, void * shared

Returns: LandCSG*

csg_grid

Parameters: int x, int y, void * shared

Returns: LandCSG*

csg_prism

Parameters: int n, void * shared

Returns: LandCSG*

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.

csg_trapezoid

Parameters: LandFloat x1, LandFloat x2, void * shared

Returns: LandCSG*

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

csg_extrude_triangle

Parameters: LandVector a, LandVector b, LandFloat d, void * shared

Returns: LandCSG*

This extrudes a triangle with points 0/a/b along a distance of d.

csg_irregular_tetrahedron

Parameters: LandVector a, LandVector b, LandVector c, LandVector d, void * shared

Returns: LandCSG*

csg_torus

Parameters: int slices, int segments, LandFloat diameter, void * shared

Returns: LandCSG*

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.

land_csg_polygon_recalculate_normal

Parameters: LandCSGPolygon * p

land_csg_recalculate_smooth_normals

Parameters: LandCSG * csg

land_csg_voxelize

Parameters: LandCSG * csg, double radius

Returns: LandCSG*

FIXME: implement! The idea is to create a mesh from another mesh which is a voxelized version. Everything is cubes.


Generated: Thu 27 Feb 2020 10:49:37 PM EST