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