Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Trackball Class Reference

#include <trackball.h>

Inheritance diagram for Trackball:

DataNode PandaNode TypedWritable Namable BoundedObject ReferenceCount TypedObject List of all members.

Public Member Functions

virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual void do_transmit_data (const DataNodeTransmit &input, DataNodeTransmit &output)

Private Member Functions

 ~Trackball ()
void reset ()
float get_forward_scale () const
void set_forward_scale (float fwdscale)
const LPoint3f & get_pos () const
 **** Translation ****

float get_x () const
float get_y () const
float get_z () const
void set_pos (const LVecBase3f &vec)
void set_pos (float x, float y, float z)
void set_x (float x)
void set_y (float y)
void set_z (float z)
LVecBase3f get_hpr () const
 **** Rotation ****

float get_h () const
float get_p () const
float get_r () const
void set_hpr (const LVecBase3f &hpr)
void set_hpr (float h, float p, float r)
void set_h (float h)
void set_p (float p)
void set_r (float r)
void reset_origin_here ()
 **** Origin of Rotation ****

void move_origin (float x, float y, float z)
LPoint3f get_origin () const
void set_origin (const LVecBase3f &origin)
void set_invert (bool flag)
 **** Misc ****

bool get_invert () const
void set_rel_to (const NodePath &_rel_to)
const NodePathget_rel_to () const
void set_coordinate_system (CoordinateSystem cs)
CoordinateSystem get_coordinate_system () const
void set_mat (const LMatrix4f &mat)
const LMatrix4f & get_mat () const
const LMatrix4f & get_trans_mat () const
void apply (double x, double y, int button)
void reextract ()
void recompute ()
 PT (EventStoreTransform) _transform

Private Attributes

PUBLISHED __pad0__: Trackball(const string &name)
float _lastx
float _lasty
float _rotscale
float _fwdscale
LMatrix4f _rotation
LPoint3f _translation
LMatrix4f _mat
LMatrix4f _orig
bool _invert
NodePath _rel_to
CoordinateSystem _cs
ModifierButtons _mods
int _pixel_xy_input
int _button_events_input
int _transform_output

Static Private Attributes

TypeHandle _type_handle

Constructor & Destructor Documentation

Trackball::~Trackball  )  [private]
 

Definition at line 73 of file trackball.cxx.


Member Function Documentation

void Trackball::apply double  x,
double  y,
int  button
[private]
 

Definition at line 435 of file trackball.cxx.

References _cs, _fwdscale, _rel_to, _rotation, _rotscale, _translation, B1_MASK, B2_MASK, B3_MASK, NodePath::is_empty(), recompute(), reextract(), x, and y.

Referenced by do_transmit_data().

void Trackball::do_transmit_data const DataNodeTransmit input,
DataNodeTransmit output
[protected, virtual]
 

Reimplemented from DataNode.

Definition at line 536 of file trackball.cxx.

References _button_events_input, _lastx, _lasty, _mat, _mods, _pixel_xy_input, _transform_output, apply(), B1_MASK, B2_MASK, B3_MASK, DCAST_INTO_V, EventStoreValue< Type >::get_value(), input, ModifierButtons::is_down(), MouseButton::one(), p, DataNodeTransmit::set_data(), MouseButton::three(), MouseButton::two(), ButtonEventList::update_mods(), x, and y.

virtual TypeHandle Trackball::force_init_type void   )  [inline, virtual]
 

Reimplemented from DataNode.

Definition at line 152 of file trackball.h.

References DataNode::get_class_type(), and DataNode::init_type().

TypeHandle Trackball::get_class_type void   )  [inline, static]
 

Reimplemented from DataNode.

Definition at line 141 of file trackball.h.

CoordinateSystem Trackball::get_coordinate_system  )  const [private]
 

Definition at line 379 of file trackball.cxx.

References _cs.

float Trackball::get_forward_scale  )  const [private]
 

Definition at line 96 of file trackball.cxx.

References _fwdscale.

float Trackball::get_h  )  const [private]
 

Definition at line 189 of file trackball.cxx.

References _rotation, decompose_matrix(), and scale.

LVecBase3f Trackball::get_hpr  )  const [private]
 

**** Rotation ****

Definition at line 182 of file trackball.cxx.

References _rotation, decompose_matrix(), and scale.

bool Trackball::get_invert  )  const [private]
 

Definition at line 327 of file trackball.cxx.

References _invert.

const LMatrix4f & Trackball::get_mat  )  const [private]
 

Definition at line 410 of file trackball.cxx.

References _orig.

LPoint3f Trackball::get_origin  )  const [private]
 

Definition at line 291 of file trackball.cxx.

References _rotation.

float Trackball::get_p  )  const [private]
 

Definition at line 196 of file trackball.cxx.

References _rotation, decompose_matrix(), and scale.

const LPoint3f & Trackball::get_pos  )  const [private]
 

**** Translation ****

Definition at line 120 of file trackball.cxx.

References _translation.

float Trackball::get_r  )  const [private]
 

Definition at line 203 of file trackball.cxx.

References _rotation, decompose_matrix(), and scale.

const NodePath & Trackball::get_rel_to  )  const [private]
 

Definition at line 353 of file trackball.cxx.

References _rel_to.

const LMatrix4f & Trackball::get_trans_mat  )  const [private]
 

Definition at line 422 of file trackball.cxx.

References _mat.

virtual TypeHandle Trackball::get_type void   )  const [inline, virtual]
 

Reimplemented from DataNode.

Definition at line 149 of file trackball.h.

References DataNode::get_class_type().

float Trackball::get_x  )  const [private]
 

Definition at line 125 of file trackball.cxx.

References _translation.

float Trackball::get_y  )  const [private]
 

Definition at line 130 of file trackball.cxx.

References _translation.

float Trackball::get_z  )  const [private]
 

Definition at line 135 of file trackball.cxx.

References _translation.

void Trackball::init_type void   )  [inline, static]
 

Reimplemented from DataNode.

Definition at line 144 of file trackball.h.

References DataNode::get_class_type(), DataNode::init_type(), and register_type().

Referenced by ConfigureFn().

void Trackball::move_origin float  x,
float  y,
float  z
[private]
 

Definition at line 281 of file trackball.cxx.

References _rotation, x, y, and z.

Trackball::PT EventStoreTransform   )  [private]
 

void Trackball::recompute  )  [private]
 

Definition at line 505 of file trackball.cxx.

References _mat, _orig, _rel_to, _rotation, _translation, NodePath::get_mat(), invert, NodePath::is_empty(), and root.

Referenced by apply(), reset_origin_here(), set_h(), set_hpr(), set_p(), set_pos(), set_r(), set_x(), set_y(), and set_z().

void Trackball::reextract  )  [private]
 

Definition at line 485 of file trackball.cxx.

References _orig, _rel_to, _rotation, _translation, NodePath::is_empty(), and root.

Referenced by apply(), and set_mat().

void Trackball::reset  )  [private]
 

Definition at line 82 of file trackball.cxx.

References _mat, _orig, _rotation, and _translation.

void Trackball::reset_origin_here  )  [private]
 

**** Origin of Rotation ****

Definition at line 268 of file trackball.cxx.

References _orig, _rotation, _translation, and recompute().

void Trackball::set_coordinate_system CoordinateSystem  cs  )  [private]
 

Definition at line 368 of file trackball.cxx.

References _cs, and cs.

void Trackball::set_forward_scale float  fwdscale  )  [private]
 

Definition at line 109 of file trackball.cxx.

References _fwdscale.

void Trackball::set_h float  h  )  [private]
 

Definition at line 233 of file trackball.cxx.

References _rotation, compose_matrix(), decompose_matrix(), recompute(), and scale.

void Trackball::set_hpr float  h,
float  p,
float  r
[private]
 

Definition at line 224 of file trackball.cxx.

References _rotation, compose_matrix(), decompose_matrix(), p, r, recompute(), and scale.

void Trackball::set_hpr const LVecBase3f &  hpr  )  [private]
 

Definition at line 216 of file trackball.cxx.

References _rotation, compose_matrix(), decompose_matrix(), recompute(), and scale.

void Trackball::set_invert bool  flag  )  [private]
 

**** Misc ****

Definition at line 315 of file trackball.cxx.

References _invert.

void Trackball::set_mat const LMatrix4f &  mat  )  [private]
 

Definition at line 391 of file trackball.cxx.

References _mat, _orig, invert, and reextract().

void Trackball::set_origin const LVecBase3f &  origin  )  [private]
 

Definition at line 301 of file trackball.cxx.

References _rotation.

void Trackball::set_p float  p  )  [private]
 

Definition at line 242 of file trackball.cxx.

References _rotation, compose_matrix(), decompose_matrix(), p, recompute(), and scale.

void Trackball::set_pos float  x,
float  y,
float  z
[private]
 

Definition at line 152 of file trackball.cxx.

References _translation, recompute(), x, y, and z.

void Trackball::set_pos const LVecBase3f &  vec  )  [private]
 

Definition at line 146 of file trackball.cxx.

References _translation, and recompute().

void Trackball::set_r float  r  )  [private]
 

Definition at line 251 of file trackball.cxx.

References _rotation, compose_matrix(), decompose_matrix(), r, recompute(), and scale.

void Trackball::set_rel_to const NodePath _rel_to  )  [private]
 

Definition at line 342 of file trackball.cxx.

References _rel_to.

void Trackball::set_x float  x  )  [private]
 

Definition at line 158 of file trackball.cxx.

References _translation, recompute(), and x.

void Trackball::set_y float  y  )  [private]
 

Definition at line 164 of file trackball.cxx.

References _translation, recompute(), and y.

void Trackball::set_z float  z  )  [private]
 

Definition at line 170 of file trackball.cxx.

References _translation, recompute(), and z.


Member Data Documentation

PUBLISHED Trackball::__pad0__ [private]
 

Reimplemented from DataNode.

Definition at line 46 of file trackball.h.

int Trackball::_button_events_input [private]
 

Definition at line 133 of file trackball.h.

Referenced by do_transmit_data().

CoordinateSystem Trackball::_cs [private]
 

Definition at line 119 of file trackball.h.

Referenced by apply(), get_coordinate_system(), and set_coordinate_system().

float Trackball::_fwdscale [private]
 

Definition at line 112 of file trackball.h.

Referenced by apply(), get_forward_scale(), and set_forward_scale().

bool Trackball::_invert [private]
 

Definition at line 117 of file trackball.h.

Referenced by get_invert(), and set_invert().

float Trackball::_lastx [private]
 

Definition at line 109 of file trackball.h.

Referenced by do_transmit_data().

float Trackball::_lasty [private]
 

Definition at line 109 of file trackball.h.

Referenced by do_transmit_data().

LMatrix4f Trackball::_mat [private]
 

Definition at line 116 of file trackball.h.

Referenced by do_transmit_data(), get_trans_mat(), recompute(), reset(), and set_mat().

ModifierButtons Trackball::_mods [private]
 

Definition at line 122 of file trackball.h.

Referenced by do_transmit_data().

LMatrix4f Trackball::_orig [private]
 

Definition at line 116 of file trackball.h.

Referenced by get_mat(), recompute(), reextract(), reset(), reset_origin_here(), and set_mat().

int Trackball::_pixel_xy_input [private]
 

Definition at line 132 of file trackball.h.

Referenced by do_transmit_data().

NodePath Trackball::_rel_to [private]
 

Definition at line 118 of file trackball.h.

Referenced by apply(), get_rel_to(), recompute(), reextract(), and set_rel_to().

LMatrix4f Trackball::_rotation [private]
 

Definition at line 114 of file trackball.h.

Referenced by apply(), get_h(), get_hpr(), get_origin(), get_p(), get_r(), move_origin(), recompute(), reextract(), reset(), reset_origin_here(), set_h(), set_hpr(), set_origin(), set_p(), and set_r().

float Trackball::_rotscale [private]
 

Definition at line 111 of file trackball.h.

Referenced by apply().

int Trackball::_transform_output [private]
 

Definition at line 136 of file trackball.h.

Referenced by do_transmit_data().

LPoint3f Trackball::_translation [private]
 

Definition at line 115 of file trackball.h.

Referenced by apply(), get_pos(), get_x(), get_y(), get_z(), recompute(), reextract(), reset(), reset_origin_here(), set_pos(), set_x(), set_y(), and set_z().

TypeHandle Trackball::_type_handle [static, private]
 

Reimplemented from DataNode.

Definition at line 27 of file trackball.cxx.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:43 2003 for Panda by doxygen1.3