Visualization Library

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

vl::TransformHierarchy< Ttype > Class Template Reference

Adds parent/child management functions to the specified transform type. More...

#include <Transform.hpp>

Inheritance diagram for vl::TransformHierarchy< Ttype >:
vl::ITransform vl::Object

List of all members.

Public Member Functions

 TransformHierarchy ()
virtual size_t childrenCount () const
virtual ITransformgetChildren (size_t i)
virtual const ITransformgetChildren (size_t i) const
virtual const ITransformparent () const
virtual ITransformparent ()
const std::vector< ref< Ttype > > & children () const
 Returns the children Transforms.
void addChild (Ttype *child)
 Adds a child transform.
void addChildren (Ttype *const *children, size_t count)
 Adds count children transforms.
void addChildren (const ref< Ttype > *children, size_t count)
void addChildren (const std::vector< ref< Ttype > > &children)
void addChildren (const std::vector< Ttype * > &children)
 Adds the specified children transforms.
void setChild (int index, Ttype *child)
 Sets the index-th child.
Ttype * lastChild ()
 Returns the last child.
void eraseChild (Ttype *child)
 Removes the given child Ttype.
void eraseChildren (int index, int count)
 Removes count children Transforms starting at position index.
void eraseAllChildren ()
 Removes all the children of a Ttype.
void eraseAllChildrenRecursive ()
 Removes all the children of a Ttype recursively descending the hierarchy.
void shrink ()
 Minimizes the amount of memory used to store the children Transforms.
void shrinkRecursive ()
 Minimizes recursively the amount of memory used to store the children Transforms.
void reserveChildren (size_t count)
 Reserves space for count children.

Protected Attributes

std::vector< ref< Ttype > > mChildren
TransformHierarchymParent

Detailed Description

template<class Ttype>
class vl::TransformHierarchy< Ttype >

Adds parent/child management functions to the specified transform type.

Definition at line 185 of file Transform.hpp.


Constructor & Destructor Documentation

template<class Ttype>
vl::TransformHierarchy< Ttype >::TransformHierarchy (  ) [inline]

Definition at line 188 of file Transform.hpp.


Member Function Documentation

template<class Ttype>
virtual size_t vl::TransformHierarchy< Ttype >::childrenCount (  ) const [inline, virtual]

Implements vl::ITransform.

Definition at line 192 of file Transform.hpp.

template<class Ttype>
virtual ITransform* vl::TransformHierarchy< Ttype >::getChildren ( size_t  i ) [inline, virtual]

Implements vl::ITransform.

Definition at line 194 of file Transform.hpp.

template<class Ttype>
virtual const ITransform* vl::TransformHierarchy< Ttype >::getChildren ( size_t  i ) const [inline, virtual]

Implements vl::ITransform.

Definition at line 196 of file Transform.hpp.

template<class Ttype>
virtual const ITransform* vl::TransformHierarchy< Ttype >::parent (  ) const [inline, virtual]

Implements vl::ITransform.

Definition at line 198 of file Transform.hpp.

template<class Ttype>
virtual ITransform* vl::TransformHierarchy< Ttype >::parent (  ) [inline, virtual]

Implements vl::ITransform.

Definition at line 200 of file Transform.hpp.

template<class Ttype>
const std::vector< ref<Ttype> >& vl::TransformHierarchy< Ttype >::children (  ) const [inline]

Returns the children Transforms.

Definition at line 205 of file Transform.hpp.

Referenced by vl::TransformHierarchy< Transform >::addChildren().

template<class Ttype>
void vl::TransformHierarchy< Ttype >::addChild ( Ttype *  child ) [inline]

Adds a child transform.

Definition at line 208 of file Transform.hpp.

Referenced by vl::VolumePlot::setupLabels().

template<class Ttype>
void vl::TransformHierarchy< Ttype >::addChildren ( Ttype *const *  children,
size_t  count 
) [inline]

Adds count children transforms.

Definition at line 218 of file Transform.hpp.

Referenced by vl::TransformHierarchy< Transform >::addChildren().

template<class Ttype>
void vl::TransformHierarchy< Ttype >::addChildren ( const ref< Ttype > *  children,
size_t  count 
) [inline]

Definition at line 236 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::addChildren ( const std::vector< ref< Ttype > > &  children ) [inline]

Definition at line 254 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::addChildren ( const std::vector< Ttype * > &  children ) [inline]

Adds the specified children transforms.

Definition at line 261 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::setChild ( int  index,
Ttype *  child 
) [inline]

Sets the index-th child.

Definition at line 268 of file Transform.hpp.

template<class Ttype>
Ttype* vl::TransformHierarchy< Ttype >::lastChild (  ) [inline]

Returns the last child.

Definition at line 278 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::eraseChild ( Ttype *  child ) [inline]

Removes the given child Ttype.

Definition at line 284 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::eraseChildren ( int  index,
int  count 
) [inline]

Removes count children Transforms starting at position index.

Definition at line 298 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::eraseAllChildren (  ) [inline]

Removes all the children of a Ttype.

Definition at line 312 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::eraseAllChildrenRecursive (  ) [inline]

Removes all the children of a Ttype recursively descending the hierarchy.

Definition at line 320 of file Transform.hpp.

template<class Ttype>
void vl::TransformHierarchy< Ttype >::shrink (  ) [inline]

Minimizes the amount of memory used to store the children Transforms.

Definition at line 331 of file Transform.hpp.

Referenced by vl::TransformHierarchy< Transform >::shrinkRecursive().

template<class Ttype>
void vl::TransformHierarchy< Ttype >::shrinkRecursive (  ) [inline]

Minimizes recursively the amount of memory used to store the children Transforms.

Definition at line 338 of file Transform.hpp.

Referenced by vl::TransformHierarchy< Transform >::shrinkRecursive().

template<class Ttype>
void vl::TransformHierarchy< Ttype >::reserveChildren ( size_t  count ) [inline]

Reserves space for count children.

This function is very useful when you need to add one by one a large number of children transforms.

Note:
This function does not affect the number of children, it only reallocates the buffer used to store them so that it's large enough to eventually contain count of them. This will make subsequent calls to addChild() quicker as fewer or no reallocations of the buffer will be needed.

Definition at line 349 of file Transform.hpp.


Member Data Documentation

template<class Ttype>
std::vector< ref<Ttype> > vl::TransformHierarchy< Ttype >::mChildren [protected]
template<class Ttype>
TransformHierarchy* vl::TransformHierarchy< Ttype >::mParent [protected]

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

Visualization Library v2011.05.1142 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 26 2011 22:51:36.
Permission is granted to use this page to write and publish articles regarding Visualization Library.