NEURON
rot3band.h
Go to the documentation of this file.
1
#ifndef rot3band_h
2
#define rot3band_h
3
4
/*
5
3-D rubberband
6
On the button press a globe appears centered at the mouse location
7
Dragging the mouse causes the globe to rotate as though the mouse
8
was always at the same location on the globe. If the mouse is dragged
9
off the globe, the mouse is treated as though it is on the edge. The mouse
10
is always treated as though it is on the front hemisphere.
11
12
Well, maybe someday.
13
Can type x, y, z to get immediate rotations in which axes are out of screen.
14
15
Multiple invocations of the Rotate3Band accumulate rotations.
16
*/
17
18
#include "
rubband.h
"
19
#include "
rotate3d.h
"
20
21
class
Rotate3Band
:
public
Rubberband
{
22
public
:
23
Rotate3Band
(
Rotation3d
* =
NULL
,
RubberAction
* =
NULL
,
Canvas
* =
NULL
);
24
virtual
~Rotate3Band
();
25
26
virtual
void
press
(
Event
&);
27
virtual
void
drag
(
Event
&);
28
virtual
void
draw
(
Coord
,
Coord
);
29
30
virtual
bool
event
(
Event
&);
// looks for x, y, z press
31
Rotation3d
*
rotation
();
32
virtual
void
help
();
33
private
:
34
Rotation3d
*
rot_
;
35
float
x_old_
,
y_old_
;
36
};
37
38
#endif
rotate3d.h
Rotate3Band
Definition:
rot3band.h:21
Coord
#define Coord
Definition:
_defines.h:19
rubband.h
Rotate3Band::help
virtual void help()
Rotate3Band::~Rotate3Band
virtual ~Rotate3Band()
Rotate3Band::x_old_
float x_old_
Definition:
rot3band.h:35
Rotate3Band::drag
virtual void drag(Event &)
Rotation3d
Definition:
rotate3d.h:6
Canvas
#define Canvas
Definition:
_defines.h:65
Rubberband
Definition:
rubband.h:36
Rotate3Band::press
virtual void press(Event &)
Rotate3Band::draw
virtual void draw(Coord, Coord)
RubberAction
Definition:
rubband.h:20
Rubberband::event
const Event & event() const
Definition:
rubband.h:47
Event
#define Event
Definition:
_defines.h:107
Rotate3Band::Rotate3Band
Rotate3Band(Rotation3d *=NULL, RubberAction *=NULL, Canvas *=NULL)
Rotate3Band::rot_
Rotation3d * rot_
Definition:
rot3band.h:34
Rotate3Band::y_old_
float y_old_
Definition:
rot3band.h:35
Rotate3Band::rotation
Rotation3d * rotation()
NULL
return NULL
Definition:
cabcode.cpp:461
src
nrniv
rot3band.h