1 #include <../../nrnconf.h>
5 #include <InterViews/canvas.h>
6 #include <IV-look/kit.h>
7 #include <InterViews/font.h>
8 #include <InterViews/polyglyph.h>
15 #define Rotate_ "Rotate3D PlotShape"
20 for (
i = 0;
i < 2; ++
i)
21 for (
j = 0;
j < 3; ++
j)
29 for (
i = 0;
i < 3; ++
i) {
30 for (
j = 0;
j < 3; ++
j) {
39 m.
a_[1][1] = m.
a_[2][2] =
cos(radian);
40 m.
a_[2][1] = -(m.
a_[1][2] =
sin(radian));
45 m.
a_[2][2] = m.
a_[0][0] =
cos(radian);
46 m.
a_[2][0] = -(m.
a_[0][2] =
sin(radian));
51 m.
a_[0][0] = m.
a_[1][1] =
cos(radian);
52 m.
a_[1][0] = -(m.
a_[0][1] =
sin(radian));
59 for (
i = 0;
i < 3; ++
i) {
60 for (
j = 0;
j < 3; ++
j) {
62 for (
k = 0;
k < 3; ++
k) {
67 for (
i = 0;
i < 3; ++
i) {
68 for (
j = 0;
j < 3; ++
j) {
85 for (
i = 0;
i < 3; ++
i) {
86 x[
i] = r[
i] -
o_[0][
i];
88 for (
i = 0;
i < 3; ++
i) {
89 tr[
i] =
a_[
i][0] * x[0] +
a_[
i][1] * x[1] +
a_[
i][2] * x[2] +
o_[1][
i];
119 for (
i = 0;
i < 3; ++
i) {
122 for (
i = 0;
i < 3; ++
i) {
123 r[
i] =
a_[0][
i] * x[0] +
a_[1][
i] * x[1] +
a_[2][
i] * x[2];
146 const float deg = 3.14159265358979323846 / 18.;
150 if (e.mapkey(
buf, 1) > 0)
237 const Font* f = WidgetKit::instance()->font();
250 r[0] =
sec->pt3d[
i].x;
251 r[1] =
sec->pt3d[
i].y;
252 r[2] =
sec->pt3d[
i].z;
254 c->move_to(r[0], r[1]);
256 r[0] =
sec->pt3d[
i].x;
257 r[1] =
sec->pt3d[
i].y;
258 r[2] =
sec->pt3d[
i].z;
260 c->line_to(r[0], r[1]);
277 c->character(f,
'x', f->width(
'x'),
color(), x0 +
x * w * 1.1, y0 +
y * w * 1.1);
283 c->character(f,
'y', f->width(
'y'),
color(), x0 +
x * w * 1.1, y0 +
y * w * 1.1);
289 c->character(f,
'z', f->width(
'z'),
color(), x0 +
x * w * 1.1, y0 +
y * w * 1.1);
static void help(const char *)
virtual void unref() const
virtual void press(Event &)
Rotate3Band(Rotation3d *=NULL, RubberAction *=NULL, Canvas *=NULL)
virtual void draw(Coord, Coord)
virtual void drag(Event &)
void offset(float x, float y)
void inverse_rotate(float *tr, float *r) const
void z_axis(float &x, float &y) const
void origin(float x, float y, float z)
void y_axis(float &x, float &y) const
void rotate(float x, float y, float z, float *tr) const
void rotate_x(float radians)
void rotate_z(float radians)
void post_multiply(Rotation3d &)
void x_axis(float &x, float &y) const
void rotate_y(float radians)
const Event & event() const
virtual void undraw(Coord x, Coord y)
static const Color * color()
const Transformer & transformer() const
static const Brush * brush()
static const Color * default_background()
virtual float arc_selected()
virtual float nearest(Coord, Coord)
virtual ShapeSection * selected()
int get_coord(double arc, Coord &, Coord &) const
Section * section() const
virtual Scene * scene() const
static XYView * current_pick_view()