version 3.3

VRS::Note Class Reference

#include <vrs/note.h>

Inheritance diagram for VRS::Note:

VRS::Shape VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 Note (const Vector &center=Vector(0, 0, 0), const std::string &text=std::string(), const Vector &shift=Vector(0, 0, 0), const Vector &scale=Vector(8, 12, 0))
void setCenter (const Vector &)
Vector getCenter () const
 Anchor point for the text.
void setText (const std::string &)
const std::string & getText () const
 Text, the contents of the note.
void setShift (const Vector &)
Vector getShift () const
void setSize (const Vector &)
Vector getSize () const
 Font size in pixel.
virtual Bounds boundingBox () const
 Shapes define their bounding box in model coordinates.
 VRS_TYPEINFO (Note, Shape)
 VRS_SERIALIZABLE (Note)


Constructor & Destructor Documentation

VRS::Note::Note ( const Vector center = Vector(0, 0, 0),
const std::string &  text = std::string(),
const Vector shift = Vector(0, 0, 0),
const Vector scale = Vector(8, 12, 0) 
)

`center' specifies the 3D point in the scene to which the note is attached. `text' is the text of the note. Only printable ASCII characters are allowed here. `scale' specifies the size of the characters in pixels. The x component is for the width, y is for the height, and z is ignored (obviously). `shift' is a bit complicated. If it is zero, the text will be centered around the `center'. The x and y components of `shift' are offsets, measured in pixels. So, if you want the note to always appear above `center' on the screen, shift if by several pixels in y direction. The height of the font as given by `scale' is a good offset here. The z coordinate of shift finally specifies a shift in z-direction. This shift is measured in object-coordinates. This might sound strange at first, but there really is no meaningful other coordinate system to use. IMPORTANT !! The display of this shape uses the current modelview, so it won't work correctly when it is cached and the modelview is modified afterwards. This infortunate fact can't be avoided, because the text has to be rotated so that it faces the viewer directly.


Member Function Documentation

void VRS::Note::setCenter ( const Vector  ) 

Vector VRS::Note::getCenter (  )  const [inline]

Anchor point for the text.

void VRS::Note::setText ( const std::string &   ) 

const std::string & VRS::Note::getText (  )  const [inline]

Text, the contents of the note.

void VRS::Note::setShift ( const Vector  ) 

Vector VRS::Note::getShift (  )  const [inline]

Offset in screen coordinates. Used to shift the projected anchor point.

void VRS::Note::setSize ( const Vector  ) 

Vector VRS::Note::getSize (  )  const [inline]

Font size in pixel.

virtual Bounds VRS::Note::boundingBox (  )  const [virtual]

Shapes define their bounding box in model coordinates.

Implements VRS::Shape.

VRS::Note::VRS_TYPEINFO ( Note  ,
Shape   
)

VRS::Note::VRS_SERIALIZABLE ( Note   ) 


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

Generated on Sun May 19 06:00:35 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact