CG_Labs
2021.2
|
Functions | |
bonobo::mesh_data | createQuad (float const width, float const height, unsigned int const horizontal_split_count=0u, unsigned int const vertical_split_count=0u) |
Create a quad a given tesselation level and make it available to OpenGL. More... | |
bonobo::mesh_data | createSphere (float const radius, unsigned int const longitude_split_count, unsigned int const latitude_split_count) |
Create a sphere for a given tesselation level and make it available to OpenGL. More... | |
bonobo::mesh_data | createTorus (float const major_radius, float const minor_radius, unsigned int const major_split_count, unsigned int const minor_split_count) |
Create a torus for a given tesselation level and make it available to OpenGL. More... | |
bonobo::mesh_data | createCircleRing (float const radius, float const spread_length, unsigned int const circle_split_count, unsigned int const spread_split_count) |
Create a circle ring for a given tesselation level and make it available to OpenGL. More... | |
bonobo::mesh_data parametric_shapes::createCircleRing | ( | float const | radius, |
float const | spread_length, | ||
unsigned int const | circle_split_count, | ||
unsigned int const | spread_split_count | ||
) |
radius | radius from the centre to the middle of the cross-section |
spread_length | length of the cross-section |
circle_split_count | the number of times the angle for the circle should be split: 0 means each line going around the circle consist of a single edge spanning the full 360°, with 1 you get two edges (each spanning 180°); 2 is the minimum for getting a 3-D shape. |
spread_split_count | the number of times the lines going out from the centre should be split: 0 means each line going out consists of a single edge spanning the full spread, with 1 you get two edges (each spanning half the spread). |
bonobo::mesh_data parametric_shapes::createQuad | ( | float const | width, |
float const | height, | ||
unsigned int const | horizontal_split_count = 0u , |
||
unsigned int const | vertical_split_count = 0u |
||
) |
width | the width of the quad |
height | the height of the quad |
horizontal_split_count | the number of times horizontal edges should be split: 0 means each horizontal line consist of a single edge, 1 gives you two edges, and so on. |
vertical_split_count | the number of times vertical edges should be split: 0 means each vertical line consist of a single edge, 1 gives you two edges, and so on. |
bonobo::mesh_data parametric_shapes::createSphere | ( | float const | radius, |
unsigned int const | longitude_split_count, | ||
unsigned int const | latitude_split_count | ||
) |
radius | radius of the sphere |
longitude_split_count | the number of times the longitude angle should be split: 0 means each longitudinal line consist of a single edge spanning the full 360°, with 1 you get two edges (each spanning 180°); 2 is the minimum for getting a 3-D shape. |
latitude_split_count | the number of times the latitude angle should be split: 0 means each latitudinal line consist of a single edge spanning the full 180°, with 1 you get two edges (each spanning 90°); 1 is the minimum for getting a 3-D shape. |
bonobo::mesh_data parametric_shapes::createTorus | ( | float const | major_radius, |
float const | minor_radius, | ||
unsigned int const | major_split_count, | ||
unsigned int const | minor_split_count | ||
) |
major_radius | radius from the centre to the middle of the cross-section |
minor_radius | radius of the cross-section (giving the torus its thickness) |
major_split_count | the number of times the angle for the major ring should be split: 0 means each line going around the major ring consist of a single edge spanning the full 360°, with 1 you get two edges (each spanning 180°); 2 is the minimum for getting a 3-D shape. |
minor_split_count | the number of times the angle for the minor ring should be split: 0 means each line going around the minor ring consist of a single edge spanning the full 360°, with 1 you get two edges (each spanning 180°); 2 is the minimum for getting a 3-D shape. |