| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/note.h>

Public Member Functions | |
| Note (const Vector ¢er=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) | |
| 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.
| 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 & | ) |
| virtual Bounds VRS::Note::boundingBox | ( | ) | const [virtual] |
| VRS::Note::VRS_SERIALIZABLE | ( | Note | ) |