SPIN Framework
Public Member Functions

spin::Menu3D Class Reference

Provides a positionable 3D menu composed of TextNodes. More...

#include <Menu3D.h>

Inheritance diagram for spin::Menu3D:
spin::GroupNode spin::ReferencedNode

List of all members.

Public Member Functions

 Menu3D (SceneManager *sceneManager, const char *initID)
virtual void updateNodePath ()
void setEnabled (int i)
int getEnabled () const
void addItem (const char *itemText)
void removeItem (int itemIndex)
void removeItem (const char *itemID)
int doRemoveItem (osg::observer_ptr< TextNode > n)
void clearItems ()
void redraw ()
void setHighlighted (int itemIndex)
void setHighlighted (const char *itemID)
int doHighlight (osg::observer_ptr< TextNode > n)
const char * getHighlighted () const
void setHighlightColor (float r, float g, float b, float a)
osg::Vec4 getHighlightColor () const
void highlightNext ()
void highlightPrev ()
void select ()
void setItemOffset (float x, float y, float z)
osg::Vec3 getItemOffset () const
void setFont (const char *s)
void setBillboard (TextNode::billboardType t)
void setColor (float red, float green, float blue, float alpha)
virtual std::vector< lo_message > getState () const

Detailed Description

Provides a positionable 3D menu composed of TextNodes.


Member Function Documentation

void spin::Menu3D::addItem ( const char *  itemText)

Add an item (TextNode) to the list (server-side only)

void spin::Menu3D::clearItems ( )

Removes all text nodes from the menu.

int spin::Menu3D::doHighlight ( osg::observer_ptr< TextNode n)

This should be a private function.

int spin::Menu3D::doRemoveItem ( osg::observer_ptr< TextNode n)

This should be a private function.

int spin::Menu3D::getEnabled ( ) const [inline]

Returns a boolean (int) indicating whether this menu node is enabled or disabled.

osg::Vec4 spin::Menu3D::getHighlightColor ( ) const [inline]

Returns the color of the font in RGBA values when highlighted.

const char* spin::Menu3D::getHighlighted ( ) const [inline]

Returns the id of the currently highlighted menu item.

osg::Vec3 spin::Menu3D::getItemOffset ( ) const [inline]

Returns the Vector3 value used to offset successive menu entries.

std::vector< lo_message > spin::Menu3D::getState ( ) const [virtual]

For each subclass of ReferencedNode, we override the getState() method to fill the vector with the correct set of methods for this particular node

Reimplemented from spin::GroupNode.

void spin::Menu3D::highlightNext ( )

Highlights the item that follows the currently highlighted item.

void spin::Menu3D::highlightPrev ( )

Highlights the item previous to the currently highlighted item.

void spin::Menu3D::redraw ( )

Redraws the menu after items are removed to eliminate the space left by the recently removed item(s).

void spin::Menu3D::removeItem ( int  itemIndex)

Remove an item (textNode) from the list by its itemIndex.

void spin::Menu3D::removeItem ( const char *  itemID)

Remove an item (textNode) from the list by its ID.

void spin::Menu3D::setBillboard ( TextNode::billboardType  t)

wrapped from TextNode: types come from billboardType enum: RELATIVE, POINT_EYE, STAY_UP

void spin::Menu3D::setColor ( float  red,
float  green,
float  blue,
float  alpha 
)

wrapped from TextNode: sets color in RGBA values

void spin::Menu3D::setEnabled ( int  i)

Toggle whether this menu node is enabled or disabled.

void spin::Menu3D::setFont ( const char *  s)

wrapped from TextNode: sets font type

void spin::Menu3D::setHighlightColor ( float  r,
float  g,
float  b,
float  a 
)

Set the color of the font in RGBA values when highlighted

void spin::Menu3D::setHighlighted ( const char *  itemID)

Highlight an item from the list by its itemID.

void spin::Menu3D::setHighlighted ( int  itemIndex)

Highlight an item from the list by its itemIndex.

void spin::Menu3D::setItemOffset ( float  x,
float  y,
float  z 
)

Each successive menu item will appear at an offset from the previous

void spin::Menu3D::updateNodePath ( ) [virtual]

This should likely be a private function. TO_BE_VERIFIED.


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