1 #include <../../nrnconf.h> 2 #if HAVE_IV // to end of file 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)
for (j=0; j < 3; ++
j)
o_[i][j] = 0.;
27 for (i=0; i < 3; ++
i) {
28 for (j=0; j < 3; ++
j) {
37 m.
a_[1][1] = m.
a_[2][2] =
cos(radian);
38 m.
a_[2][1] = - (m.
a_[1][2] =
sin(radian));
43 m.
a_[2][2] = m.
a_[0][0] =
cos(radian);
44 m.
a_[2][0] = - (m.
a_[0][2] =
sin(radian));
49 m.
a_[0][0] = m.
a_[1][1] =
cos(radian);
50 m.
a_[1][0] = - (m.
a_[0][1] =
sin(radian));
57 for (i=0; i < 3; ++
i) {
58 for (j=0; j < 3; ++
j) {
60 for (k=0; k < 3; ++
k) {
65 for (i=0; i < 3; ++
i) {
66 for (j=0; j < 3; ++
j) {
74 r[0] = x; r[1] = y; r[2] = z;
82 for (i=0; i < 3; ++
i) {
83 x[
i] = r[
i] -
o_[0][
i];
85 for (i=0; i < 3; ++
i) {
86 tr[
i] =
a_[
i][0]*x[0] +
a_[
i][1]*x[1] +
a_[
i][2]*x[2] +
o_[1][
i];
117 for (i=0; i < 3; ++
i) {
120 for (i=0; i < 3; ++
i) {
121 r[
i] =
a_[0][
i]*x[0] +
a_[1][
i]*x[1] +
a_[2][
i]*x[2];
143 const float deg = 3.14159265358979323846/18.;
147 if (e.mapkey(buf, 1) > 0)
switch (buf[0]) {
234 const Font* f = WidgetKit::instance()->font();
245 ->shape_section_list();
257 c->move_to(r[0], r[1]);
263 c->line_to(r[0], r[1]);
278 c->line(x0, y0, x0+x*w, y0+y*w,
color(),
brush());
280 c->character(f,
'x', f->width(
'x'),
color(), x0+x*w*1.1, y0+y*w*1.1);
284 c->line(x0, y0, x0+x*w, y0+y*w,
color(),
brush());
286 c->character(f,
'y', f->width(
'y'),
color(), x0+x*w*1.1, y0+y*w*1.1);
290 c->line(x0, y0, x0+x*w, y0+y*w,
color(),
brush());
292 c->character(f,
'z', f->width(
'z'),
color(), x0+x*w*1.1, y0+y*w*1.1);
void y_axis(float &x, float &y) const
virtual Coord bottom() const
void offset(float x, float y)
int get_coord(double arc, Coord &, Coord &) const
virtual Coord top() const
static void help(const char *)
void origin(float x, float y, float z)
static philox4x32_key_t k
virtual void undraw(Coord x, Coord y)
Section * section() const
void x_axis(float &x, float &y) const
void z_axis(float &x, float &y) const
virtual float nearest(Coord, Coord)
void rotate_z(float radians)
void inverse_rotate(float *tr, float *r) const
static const Color * color()
virtual Coord left() const
virtual ShapeSection * selected()
virtual void drag(Event &)
virtual float arc_selected()
#define ForAllSections(sec)
virtual void press(Event &)
virtual void draw(Coord, Coord)
virtual void unref() const
const Event & event() const
Rotate3Band(Rotation3d *=NULL, RubberAction *=NULL, Canvas *=NULL)
virtual Scene * scene() const
static const Color * default_background()
void rotate(float x, float y, float z, float *tr) const
void rotate_x(float radians)
static const Brush * brush()
const Transformer & transformer() const
void post_multiply(Rotation3d &)
void rotate_y(float radians)
static XYView * current_pick_view()
virtual Coord right() const