# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::Extrusion Class Reference

The Extrusion class generates a Geometry extruding a silhouette along a path. More...

`#include <Extrusion.hpp>`

Inheritance diagram for vl::Extrusion:

List of all members.

## Public Member Functions

| Extrusion ()
| Constructor.
vl::ref< vl::Geometry > | extrude ()
| Performs the actual extrusion.
void | setSilhouette (const std::vector< vl::fvec2 > &silhouette)
| Sets the silhouette to be extruded.
const std::vector< vl::fvec2 > & | silhouette () const
| Returns the silhouette to be extruded.
std::vector< vl::fvec2 > & | silhouette ()
| Returns the silhouette to be extruded.
void | setSilhouetteMode (ESilhouetteMode mode)
| Wether the silhouette is considered closed, i.e. a line-loop, or open.
ESilhouetteMode | silhouetteMode () const
| Wether the silhouette is considered closed, i.e. a line-loop, or open.
void | setSmooth (bool smooth)
| If true the normals of the geometry are smoothed.
bool | smooth () const
| If true the normals of the geometry are smoothed.
void | setFillBottom (bool fill)
| Whether a set of triangles should be generated to fill the beginning of the extrusion (default is `true`).
bool | fillBottom () const
| Whether a set of triangles should be generated to fill the beginning of the extrusion (default is `true`).
void | setFillTop (bool fill)
| Whether a set of triangles should be generated to fill the ending of the extrusion (default is `true`).
bool | fillTop () const
| Whether a set of triangles should be generated to fill the ending of the extrusion (default is `true`).
const std::vector< vl::fvec3 > & | positionPath () const
| The path along which the silhouette is extruded.
std::vector< vl::fvec3 > & | positionPath ()
| The path along which the silhouette is extruded.
const std::vector< float > & | scalingPath () const
| The scaling to be applied along the extrusion.
std::vector< float > & | scalingPath ()
| The scaling to be applied along the extrusion.
const std::vector< float > & | rotationPath () const
| The rotation to be applied along the extrusion.
std::vector< float > & | rotationPath ()
| The rotation to be applied along the extrusion.
const std::vector< vl::fvec4 > & | colorPath () const
| The color to be applied to the extrusion.
std::vector< vl::fvec4 > & | colorPath ()
| The color to be applied to the extrusion.

## Protected Attributes

std::vector< vl::fvec2 > | mSilhouette
std::vector< vl::fvec3 > | mPositionPath
std::vector< float > | mScalingPath
std::vector< float > | mRotationPath
std::vector< vl::fvec4 > | mColorPath
ESilhouetteMode | mSilhouetteMode
bool | mSmooth
bool | mFillBottom
bool | mFillTop

## Detailed Description

The Extrusion class generates a Geometry extruding a silhouette along a path.

See also:

- Extrusion Tutorial for a practical example of how to use extrusions.
- Interpolator, LinearInterpolator, CatmullRomInterpolator to generate silhouettes and extrusion paths.

## Constructor & Destructor Documentation

vl::Extrusion::Extrusion | ( |  | ) | `[inline]`

Constructor.

## Member Function Documentation

ref< Geometry > Extrusion::extrude | ( |  | ) |

Performs the actual extrusion.

void vl::Extrusion::setSilhouette | ( | const std::vector< vl::fvec2 > & | silhouette | ) | `[inline]`

Sets the silhouette to be extruded.

const std::vector<vl::fvec2>& vl::Extrusion::silhouette | ( |  | ) | const`[inline]`

Returns the silhouette to be extruded.

std::vector<vl::fvec2>& vl::Extrusion::silhouette | ( |  | ) | `[inline]`

Returns the silhouette to be extruded.

void vl::Extrusion::setSilhouetteMode | ( | ESilhouetteMode | mode | ) | `[inline]`

Wether the silhouette is considered closed, i.e. a line-loop, or open.

ESilhouetteMode vl::Extrusion::silhouetteMode | ( |  | ) | const`[inline]`

Wether the silhouette is considered closed, i.e. a line-loop, or open.

void vl::Extrusion::setSmooth | ( | bool | smooth | ) | `[inline]`

If true the normals of the geometry are smoothed.

bool vl::Extrusion::smooth | ( |  | ) | const`[inline]`

If true the normals of the geometry are smoothed.

void vl::Extrusion::setFillBottom | ( | bool | fill | ) | `[inline]`

Whether a set of triangles should be generated to fill the beginning of the extrusion (default is `true`).

bool vl::Extrusion::fillBottom | ( |  | ) | const`[inline]`

Whether a set of triangles should be generated to fill the beginning of the extrusion (default is `true`).

void vl::Extrusion::setFillTop | ( | bool | fill | ) | `[inline]`

Whether a set of triangles should be generated to fill the ending of the extrusion (default is `true`).

bool vl::Extrusion::fillTop | ( |  | ) | const`[inline]`

Whether a set of triangles should be generated to fill the ending of the extrusion (default is `true`).

const std::vector<vl::fvec3>& vl::Extrusion::positionPath | ( |  | ) | const`[inline]`

The path along which the silhouette is extruded.

The path starts and ends with one extra control point on each side that define the orientation of the start/end extruded segments.

std::vector<vl::fvec3>& vl::Extrusion::positionPath | ( |  | ) | `[inline]`

The path along which the silhouette is extruded.

The path starts and ends with one extra control point on each side that define the orientation of the start/end extruded segments.

const std::vector<float>& vl::Extrusion::scalingPath | ( |  | ) | const`[inline]`

The scaling to be applied along the extrusion.

There must be one scaling control point for each position control point in the positionPath() with the exclusion of the starting and ending control points, i.e scalingPath().size() must be equal to positionPath().size()-2.

std::vector<float>& vl::Extrusion::scalingPath | ( |  | ) | `[inline]`

The scaling to be applied along the extrusion.

There must be one scaling control point for each position control point in the positionPath() with the exclusion of the starting and ending control points, i.e scalingPath().size() must be equal to positionPath().size()-2.

const std::vector<float>& vl::Extrusion::rotationPath | ( |  | ) | const`[inline]`

The rotation to be applied along the extrusion.

There must be one rotation control point for each position control point in the positionPath() with the exclusion of the starting and ending control points, i.e rotationPath().size() must be equal to positionPath().size()-2.

std::vector<float>& vl::Extrusion::rotationPath | ( |  | ) | `[inline]`

The rotation to be applied along the extrusion.

There must be one rotation control point for each position control point in the positionPath() with the exclusion of the starting and ending control points, i.e rotationPath().size() must be equal to positionPath().size()-2.

const std::vector<vl::fvec4>& vl::Extrusion::colorPath | ( |  | ) | const`[inline]`

The color to be applied to the extrusion.

There must be one color control point for each position control point in the positionPath() with the exclusion of the starting and ending control points, i.e colorPath().size() must be equal to positionPath().size()-2.

std::vector<vl::fvec4>& vl::Extrusion::colorPath | ( |  | ) | `[inline]`

The color to be applied to the extrusion.

There must be one color control point for each position control point in the positionPath() with the exclusion of the starting and ending control points, i.e colorPath().size() must be equal to positionPath().size()-2.

## Member Data Documentation

std::vector<vl::fvec2> vl::Extrusion::mSilhouette`[protected]`

std::vector<vl::fvec3> vl::Extrusion::mPositionPath`[protected]`

std::vector<float> vl::Extrusion::mScalingPath`[protected]`

std::vector<float> vl::Extrusion::mRotationPath`[protected]`

std::vector<vl::fvec4> vl::Extrusion::mColorPath`[protected]`

ESilhouetteMode vl::Extrusion::mSilhouetteMode`[protected]`

bool vl::Extrusion::mSmooth`[protected]`

bool vl::Extrusion::mFillBottom`[protected]`

bool vl::Extrusion::mFillTop`[protected]`

The documentation for this class was generated from the following files:

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Extrusion.hpp
- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Extrusion.cpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:35 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.