Public Member Functions

sp::scene::ImageTreeNode< T > Class Template Reference

#include <spTreeNodeImage.hpp>

List of all members.

Public Member Functions

 ImageTreeNode ()
 ImageTreeNode (const dim::size2di &Size)
 ImageTreeNode (const dim::rect2di &Rect)
 ~ImageTreeNode ()
ImageTreeNode< T > * insert (T *Image)
void deleteChildren ()
 Deletes the children nodes.
void setRect (const dim::rect2di &Rect)
dim::rect2di getRect () const
T * getImage () const
ImageTreeNode< T > * getChildA () const
ImageTreeNode< T > * getChildB () const

Detailed Description

template<class T>
class sp::scene::ImageTreeNode< T >

The ImageTreeNode class is used to - as the name implies - store 2D images in rectangles. This tree node does not hold any information about its parent. Therefore only a traversal from parent to children is possible. This class is used in the lightmap generator and to generate font textures.

Template Parameters:
T,: This class must implement the following functions:

dim::size2di getSize() const;
void setupTreeNode(ImageTreeNode<T>* Node);
Since:
Version 3.2

Constructor & Destructor Documentation

template<class T>
sp::scene::ImageTreeNode< T >::ImageTreeNode (  )  [inline]
template<class T>
sp::scene::ImageTreeNode< T >::ImageTreeNode ( const dim::size2di Size  )  [inline]
template<class T>
sp::scene::ImageTreeNode< T >::ImageTreeNode ( const dim::rect2di Rect  )  [inline]
template<class T>
sp::scene::ImageTreeNode< T >::~ImageTreeNode (  )  [inline]

Member Function Documentation

template<class T>
void sp::scene::ImageTreeNode< T >::deleteChildren (  )  [inline]

Deletes the children nodes.

template<class T>
ImageTreeNode<T>* sp::scene::ImageTreeNode< T >::getChildA (  )  const [inline]
template<class T>
ImageTreeNode<T>* sp::scene::ImageTreeNode< T >::getChildB (  )  const [inline]
template<class T>
T* sp::scene::ImageTreeNode< T >::getImage (  )  const [inline]
template<class T>
dim::rect2di sp::scene::ImageTreeNode< T >::getRect (  )  const [inline]
template<class T>
ImageTreeNode<T>* sp::scene::ImageTreeNode< T >::insert ( T *  Image  )  [inline]

Tries to insert the given image into the tree node.

Parameters:
Image,: Pointer to the image object. This must not be null!
Returns:
Pointer to the final ImageTreeNode object which has been found to hold the given image. If no suitable tree node could be found the return value is null.
Note:
For the root tree node the rectangle must be set manual! All the other rectangles will be computed automatically.
template<class T>
void sp::scene::ImageTreeNode< T >::setRect ( const dim::rect2di Rect  )  [inline]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines