Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::Extrusions Class Reference

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

#include <Extrusions.hpp>

Inheritance diagram for vl::Extrusions:
vl::Object

List of all members.

Public Member Functions

 Extrusions ()
 Constructor.
vl::ref< vl::Geometryextrude (bool compatibilityProfile=true)
 Performs the actual extrusion.
void setSilhouettes (const std::vector< unsigned int > &silhouettes)
 Sets the number of points in each silhouette.
const std::vector< unsigned int > & silhouettes () const
 Return the number of points in each silhouette.
std::vector< unsigned int > & silhouettes ()
 Return the number of points in each silhouette.
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< unsigned int > mSilhouettes
std::vector< vl::fvec2mSilhouette
std::vector< vl::fvec3mPositionPath
std::vector< float > mScalingPath
std::vector< float > mRotationPath
std::vector< vl::fvec4mColorPath
ESilhouetteMode mSilhouetteMode
bool mSmooth
bool mFillBottom
bool mFillTop

Detailed Description

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

See also:
pagGuideExtrusion3.jpg

Definition at line 53 of file Extrusions.hpp.


Constructor & Destructor Documentation

vl::Extrusions::Extrusions ( ) [inline]

Constructor.

Definition at line 59 of file Extrusions.hpp.

References vl::SilhouetteClosed, and VL_DEBUG_SET_OBJECT_NAME.


Member Function Documentation

ref< Geometry > Extrusions::extrude ( bool  compatibilityProfile = true)
void vl::Extrusions::setSilhouettes ( const std::vector< unsigned int > &  silhouettes) [inline]

Sets the number of points in each silhouette.

Definition at line 72 of file Extrusions.hpp.

const std::vector<unsigned int>& vl::Extrusions::silhouettes ( ) const [inline]

Return the number of points in each silhouette.

Definition at line 74 of file Extrusions.hpp.

Referenced by extrude().

std::vector<unsigned int>& vl::Extrusions::silhouettes ( ) [inline]

Return the number of points in each silhouette.

Definition at line 76 of file Extrusions.hpp.

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

Sets the silhouette to be extruded.

Definition at line 79 of file Extrusions.hpp.

const std::vector<vl::fvec2>& vl::Extrusions::silhouette ( ) const [inline]

Returns the silhouette to be extruded.

Definition at line 81 of file Extrusions.hpp.

Referenced by extrude().

std::vector<vl::fvec2>& vl::Extrusions::silhouette ( ) [inline]

Returns the silhouette to be extruded.

Definition at line 83 of file Extrusions.hpp.

void vl::Extrusions::setSilhouetteMode ( ESilhouetteMode  mode) [inline]

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

Definition at line 86 of file Extrusions.hpp.

ESilhouetteMode vl::Extrusions::silhouetteMode ( ) const [inline]

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

Definition at line 88 of file Extrusions.hpp.

Referenced by extrude().

void vl::Extrusions::setSmooth ( bool  smooth) [inline]

If true the normals of the geometry are smoothed.

Definition at line 91 of file Extrusions.hpp.

bool vl::Extrusions::smooth ( ) const [inline]

If true the normals of the geometry are smoothed.

Definition at line 93 of file Extrusions.hpp.

Referenced by extrude().

void vl::Extrusions::setFillBottom ( bool  fill) [inline]

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

Definition at line 96 of file Extrusions.hpp.

bool vl::Extrusions::fillBottom ( ) const [inline]

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

Definition at line 98 of file Extrusions.hpp.

Referenced by extrude().

void vl::Extrusions::setFillTop ( bool  fill) [inline]

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

Definition at line 101 of file Extrusions.hpp.

bool vl::Extrusions::fillTop ( ) const [inline]

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

Definition at line 103 of file Extrusions.hpp.

Referenced by extrude().

const std::vector<vl::fvec3>& vl::Extrusions::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.

Definition at line 107 of file Extrusions.hpp.

Referenced by extrude().

std::vector<vl::fvec3>& vl::Extrusions::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.

Definition at line 110 of file Extrusions.hpp.

const std::vector<float>& vl::Extrusions::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.

Definition at line 114 of file Extrusions.hpp.

Referenced by extrude().

std::vector<float>& vl::Extrusions::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.

Definition at line 118 of file Extrusions.hpp.

const std::vector<float>& vl::Extrusions::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.

Definition at line 122 of file Extrusions.hpp.

Referenced by extrude().

std::vector<float>& vl::Extrusions::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.

Definition at line 126 of file Extrusions.hpp.

const std::vector<vl::fvec4>& vl::Extrusions::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.

Definition at line 130 of file Extrusions.hpp.

Referenced by extrude().

std::vector<vl::fvec4>& vl::Extrusions::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.

Definition at line 134 of file Extrusions.hpp.


Member Data Documentation

std::vector<unsigned int> vl::Extrusions::mSilhouettes [protected]

Definition at line 137 of file Extrusions.hpp.

std::vector<vl::fvec2> vl::Extrusions::mSilhouette [protected]

Definition at line 138 of file Extrusions.hpp.

std::vector<vl::fvec3> vl::Extrusions::mPositionPath [protected]

Definition at line 139 of file Extrusions.hpp.

std::vector<float> vl::Extrusions::mScalingPath [protected]

Definition at line 140 of file Extrusions.hpp.

std::vector<float> vl::Extrusions::mRotationPath [protected]

Definition at line 141 of file Extrusions.hpp.

std::vector<vl::fvec4> vl::Extrusions::mColorPath [protected]

Definition at line 142 of file Extrusions.hpp.

Definition at line 143 of file Extrusions.hpp.

bool vl::Extrusions::mSmooth [protected]

Definition at line 144 of file Extrusions.hpp.

bool vl::Extrusions::mFillBottom [protected]

Definition at line 145 of file Extrusions.hpp.

bool vl::Extrusions::mFillTop [protected]

Definition at line 146 of file Extrusions.hpp.


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

Visualization Library 2011.09.1160 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 2 2013 13:41:27.
Permission is granted to use this page to write and publish articles regarding Visualization Library.