# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vlut Namespace Reference

Visualization Library utility namespace. More...

## Classes
class | Applet
| The Applet class is an utilitly UIEventListener that features a ghost manipulator, trackball manipulator, an FPS counter and a simple rendering pipeline. More...
## Enumerations
enum | ECapsuleCap { CC_FlatCap, CC_RoundedCap, CC_NoCap }
## Functions
vl::fvec4 | makeColor (unsigned int color)
vl::ref< vl::Geometry > | makeIcosphere (const vl::vec3 &pos, vl::Real radius=1, int detail=2, bool remove_doubles=true)
| Creates a sphere by iteratively subdividing an icosahedron.
vl::ref< vl::Geometry > | makeCylinder (const vl::vec3 &origin, vl::Real diameter=1, vl::Real height=1, int phi=20, int theta=2, bool top=true, bool bottom=true)
| Creates a cylinder.
vl::ref< vl::Geometry > | makeUVSphere (const vl::vec3 &origin, vl::Real diameter=1, int phi=20, int theta=20)
| Creates a uv sphere.
vl::ref< vl::Geometry > | makeTorus (const vl::vec3 &origin, vl::Real diameter=1, vl::Real thickness=0.2, int phi=10, int theta=10)
| Creates torus.
vl::ref< vl::Geometry > | makeCone (const vl::vec3 &origin, vl::Real diameter=1, vl::Real height=1, int phi=10, bool bottom=true)
| Creates a cone.
vl::ref< vl::Geometry > | makePyramid (const vl::vec3 &origin, vl::Real side=1, vl::Real height=1)
| Creates a pyramid.
vl::ref< vl::Geometry > | makeBox (const vl::vec3 &origin, vl::Real xside=1, vl::Real yside=1, vl::Real zside=1, bool tex_coords=true)
| Creates a box.
vl::ref< vl::Geometry > | makeBox (const vl::vec3 &min, const vl::vec3 &max, bool tex_coords=true)
| Creates a box.
vl::ref< vl::Geometry > | makeBox (const vl::AABB &aabb, bool tex_coords=true)
| Creates a box.
vl::ref< vl::Geometry > | makeGrid (const vl::vec3 &origin, vl::Real xside, vl::Real zside, int x, int z, bool gen_texcoords=false, vl::fvec2 uv0=vl::fvec2(), vl::fvec2 uv1=vl::fvec2())
| Creates a 2D grid.
vl::ref< vl::Geometry > | makeIcosahedron (const vl::vec3 &origin, vl::Real diameter)
| Creates an icosahedron.
vl::ref< vl::Geometry > | makePoints (const std::vector< vl::vec3 > &pos, const vl::fvec4 &color=vlut::white)
| Creates a Geometry representing a set of points.
vl::ref< vl::Geometry > | makeCircle (vl::vec3 origin, vl::Real radius, int slices=60)
| Creates a 2D circle.
vl::ref< vl::Geometry > | makeCapsule (float radius, float height, int segments, ECapsuleCap top_cap, ECapsuleCap bottom_cap, const vl::fvec4 &top_col, const vl::fvec4 &bottom_col)
| Creates a 3d capsule with rounded, flat or no caps.

## Detailed Description

Visualization Library utility namespace.

## Enumeration Type Documentation

enum vlut::ECapsuleCap

Enumerator:

  CC_FlatCap |
  CC_RoundedCap |
  CC_NoCap |

## Function Documentation

vl::fvec4 vlut::makeColor | ( | unsigned int | color | ) | `[inline]`

vl::ref<vl::Geometry> vlut::makeIcosphere | ( | const vl::vec3 & | pos,
|  | vl::Real | radius = `1`,
|  | int | detail = `2`,
|  | bool | remove_doubles = `true` |
| ) |  |  |

Creates a sphere by iteratively subdividing an icosahedron.

vl::ref<vl::Geometry> vlut::makeCylinder | ( | const vl::vec3 & | origin,
|  | vl::Real | diameter = `1`,
|  | vl::Real | height = `1`,
|  | int | phi = `20`,
|  | int | theta = `2`,
|  | bool | top = `true`,
|  | bool | bottom = `true` |
| ) |  |  |

Creates a cylinder.

vl::ref<vl::Geometry> vlut::makeUVSphere | ( | const vl::vec3 & | origin,
|  | vl::Real | diameter = `1`,
|  | int | phi = `20`,
|  | int | theta = `20` |
| ) |  |  |

Creates a uv sphere.

vl::ref<vl::Geometry> vlut::makeTorus | ( | const vl::vec3 & | origin,
|  | vl::Real | diameter = `1`,
|  | vl::Real | thickness = `0.2`,
|  | int | phi = `10`,
|  | int | theta = `10` |
| ) |  |  |

Creates torus.

vl::ref<vl::Geometry> vlut::makeCone | ( | const vl::vec3 & | origin,
|  | vl::Real | diameter = `1`,
|  | vl::Real | height = `1`,
|  | int | phi = `10`,
|  | bool | bottom = `true` |
| ) |  |  |

Creates a cone.

vl::ref<vl::Geometry> vlut::makePyramid | ( | const vl::vec3 & | origin,
|  | vl::Real | side = `1`,
|  | vl::Real | height = `1` |
| ) |  |  |

Creates a pyramid.

vl::ref<vl::Geometry> vlut::makeBox | ( | const vl::vec3 & | origin,
|  | vl::Real | xside = `1`,
|  | vl::Real | yside = `1`,
|  | vl::Real | zside = `1`,
|  | bool | tex_coords = `true` |
| ) |  |  |

Creates a box.

ref< Geometry > vlut::makeBox | ( | const vl::vec3 & | min,
|  | const vl::vec3 & | max,
|  | bool | tex_coords = `true` |
| ) |  |  |

Creates a box.

ref< Geometry > vlut::makeBox | ( | const vl::AABB & | aabb,
|  | bool | tex_coords = `true` |
| ) |  |  |

Creates a box.

vl::ref<vl::Geometry> vlut::makeGrid | ( | const vl::vec3 & | origin,
|  | vl::Real | xside,
|  | vl::Real | zside,
|  | int | x,
|  | int | z,
|  | bool | gen_texcoords = `false`,
|  | vl::fvec2 | uv0 = `vl::fvec2()`,
|  | vl::fvec2 | uv1 = `vl::fvec2()` |
| ) |  |  |

Creates a 2D grid.

vl::ref<vl::Geometry> vlut::makeIcosahedron | ( | const vl::vec3 & | origin,
|  | vl::Real | diameter |
| ) |  |  |

Creates an icosahedron.

vl::ref<vl::Geometry> vlut::makePoints | ( | const std::vector< vl::vec3 > & | pos,
|  | const vl::fvec4 & | color = `vlut::white` |
| ) |  |  |

Creates a Geometry representing a set of points.

vl::ref<vl::Geometry> vlut::makeCircle | ( | vl::vec3 | origin,
|  | vl::Real | radius,
|  | int | slices = `60` |
| ) |  |  |

Creates a 2D circle.

vl::ref<vl::Geometry> vlut::makeCapsule | ( | float | radius,
|  | float | height,
|  | int | segments,
|  | ECapsuleCap | top_cap,
|  | ECapsuleCap | bottom_cap,
|  | const vl::fvec4 & | top_col,
|  | const vl::fvec4 & | bottom_col |
| ) |  |  |

Creates a 3d capsule with rounded, flat or no caps.

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 29 11:12:00 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.