Visualizer for draing a bounding box from bounds.
More...
#include <BoundingBox.h>
|
static void | draw (omni::Box const &_box) |
|
|
static void | vertex3 (QVector3D const &) |
| glVertex3f from QVector3D More...
|
|
static void | visualLine (QVector3D const &_from, QVector3D const &_to) |
| Draws a line. More...
|
|
static void | color (QColor _color, float _alpha=1.0) |
| glColor4f from QColor More...
|
|
Visualizer for draing a bounding box from bounds.
omni::visual::BoundingBox::BoundingBox |
( |
omni::Box const & |
_box | ) |
|
omni::Box const & box_
Definition: BoundingBox.h:42
void update()
Update geometry.
Definition: BoundingBox.cpp:36
omni::visual::BoundingBox::~BoundingBox |
( |
| ) |
|
void omni::visual::BoundingBox::draw |
( |
| ) |
const |
|
virtual |
Abstract method for visualing.
Implements omni::visual::Interface.
omni::Box const & box_
Definition: BoundingBox.h:42
void draw() const
Abstract method for visualing.
Definition: BoundingBox.cpp:133
void omni::visual::BoundingBox::draw |
( |
omni::Box const & |
_box | ) |
|
|
static |
41 float x = _box.min().x(), y = _box.min().y(), z = _box.min().z();
42 float xs = _box.max().x(), ys = _box.max().y(),
44 GLuint _visualMode = GL_LINE_LOOP;
49 glNormal3f(0.0, 1.0, 0.0);
53 glVertex3f(xs, ys, z);
55 glVertex3f(xs, ys, zs);
57 glVertex3f(x, ys, zs);
63 glNormal3f(0.0, -1.0, 0.0);
69 glVertex3f(xs, y, zs);
77 glNormal3f(0.0, 0.0, -1.0);
83 glVertex3f(xs, ys, z);
92 glNormal3f(0.0, 0.0, 1.0);
96 glVertex3f(xs, y, zs);
98 glVertex3f(xs, ys, zs);
100 glVertex3f(x, ys, zs);
103 glBegin(_visualMode);
106 glNormal3f(-1.0, 0.0, 0.0);
110 glVertex3f(x, y, zs);
112 glVertex3f(x, ys, zs);
114 glVertex3f(x, ys, z);
117 glBegin(_visualMode);
120 glNormal3f(1.0, 0.0, 0.0);
122 glVertex3f(xs, y, z);
124 glVertex3f(xs, y, zs);
126 glVertex3f(xs, ys, zs);
128 glVertex3f(xs, ys, z);
void omni::visual::BoundingBox::update |
( |
| ) |
|
|
virtual |
omni::Box const& omni::visual::BoundingBox::box_ |
|
private |
The documentation for this class was generated from the following files: