37 explicit Trackball(
const std::string &name);
42 PN_stdfloat get_forward_scale()
const;
43 void set_forward_scale(PN_stdfloat fwdscale);
47 const LPoint3 &get_pos()
const;
48 PN_stdfloat get_x()
const;
49 PN_stdfloat get_y()
const;
50 PN_stdfloat get_z()
const;
51 void set_pos(
const LVecBase3 &vec);
52 void set_pos(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
53 void set_x(PN_stdfloat x);
54 void set_y(PN_stdfloat y);
55 void set_z(PN_stdfloat z);
59 LVecBase3 get_hpr()
const;
60 PN_stdfloat get_h()
const;
61 PN_stdfloat get_p()
const;
62 PN_stdfloat get_r()
const;
63 void set_hpr(
const LVecBase3 &hpr);
64 void set_hpr(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r);
65 void set_h(PN_stdfloat h);
66 void set_p(PN_stdfloat p);
67 void set_r(PN_stdfloat r);
71 void reset_origin_here();
72 void move_origin(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
74 LPoint3 get_origin()
const;
75 void set_origin(
const LVecBase3 &origin);
87 void set_control_mode(ControlMode control_mode);
88 ControlMode get_control_mode()
const;
90 void set_invert(
bool flag);
91 bool get_invert()
const;
93 void set_rel_to(
const NodePath &rel_to);
96 void set_coordinate_system(CoordinateSystem cs);
97 CoordinateSystem get_coordinate_system()
const;
99 void set_mat(
const LMatrix4 &mat);
100 const LMatrix4 &get_mat()
const;
101 const LMatrix4 &get_trans_mat()
const;
105 void apply(
double x,
double y,
int button);
111 PN_stdfloat _lastx, _lasty;
113 PN_stdfloat _rotscale;
114 PN_stdfloat _fwdscale;
117 LPoint3 _translation;
118 LMatrix4 _mat, _orig;
121 CoordinateSystem _cs;
122 ControlMode _control_mode;
135 int _transform_output;
143 static void init_type() {
144 MouseInterfaceNode::init_type();
146 MouseInterfaceNode::get_class_type());
149 return get_class_type();
151 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...