1412104980 2 2 12 libp3deadrec 4 FP4V 14 panda3d.direct 54 60 11 SmoothMover 0 4 114 24 SmoothMover::SmoothMover 0 1 1 224 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::Constructor // Access: Published // Description: //////////////////////////////////////////////////////////////////// 31 SmoothMover::SmoothMover(void); 61 12 ~SmoothMover 0 4 114 25 SmoothMover::~SmoothMover 0 0 223 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::Destructor // Access: Published // Description: //////////////////////////////////////////////////////////////////// 32 SmoothMover::~SmoothMover(void); 62 7 set_pos 0 4 114 20 SmoothMover::set_pos 0 2 2 3 2649 // These methods are used to specify each position update. Call the // appropriate set_* function(s), as needed, and then call // mark_position(). The return value of each function is true if // the parameter value has changed, or false if it remains the same // as last time. // These methods are used to specify each position update. Call the // appropriate set_* function(s), as needed, and then call // mark_position(). The return value of each function is true if // the parameter value has changed, or false if it remains the same // as last time. // Filename: smoothMover.I // Created by: drose (19Oct01) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos // Access: Published // Description: Specifies the position of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos(), or false if they // are the same. //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos // Access: Published // Description: Specifies the position of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 117 inline bool SmoothMover::set_pos(LVecBase3f const &pos); inline bool SmoothMover::set_pos(float x, float y, float z); 63 5 set_x 0 4 114 18 SmoothMover::set_x 0 1 4 259 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_x // Access: Published // Description: Sets the X position only. See set_pos(). //////////////////////////////////////////////////////////////////// 40 inline bool SmoothMover::set_x(float x); 64 5 set_y 0 4 114 18 SmoothMover::set_y 0 1 5 259 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_y // Access: Published // Description: Sets the Y position only. See set_pos(). //////////////////////////////////////////////////////////////////// 40 inline bool SmoothMover::set_y(float y); 65 5 set_z 0 4 114 18 SmoothMover::set_z 0 1 6 259 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_z // Access: Published // Description: Sets the Z position only. See set_pos(). //////////////////////////////////////////////////////////////////// 40 inline bool SmoothMover::set_z(float z); 66 7 set_hpr 0 4 114 20 SmoothMover::set_hpr 0 2 7 8 1608 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_hpr // Access: Published // Description: Specifies the orientation of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_hpr // Access: Published // Description: Specifies the orientation of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 117 inline bool SmoothMover::set_hpr(LVecBase3f const &hpr); inline bool SmoothMover::set_hpr(float h, float p, float r); 67 5 set_h 0 4 114 18 SmoothMover::set_h 0 1 9 256 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_h // Access: Published // Description: Sets the heading only. See set_hpr(). //////////////////////////////////////////////////////////////////// 40 inline bool SmoothMover::set_h(float h); 68 5 set_p 0 4 114 18 SmoothMover::set_p 0 1 10 254 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_p // Access: Published // Description: Sets the pitch only. See set_hpr(). //////////////////////////////////////////////////////////////////// 40 inline bool SmoothMover::set_p(float p); 69 5 set_r 0 4 114 18 SmoothMover::set_r 0 1 11 253 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_r // Access: Published // Description: Sets the roll only. See set_hpr(). //////////////////////////////////////////////////////////////////// 40 inline bool SmoothMover::set_r(float r); 70 11 set_pos_hpr 0 4 114 24 SmoothMover::set_pos_hpr 0 2 12 13 1618 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos_hpr // Access: Published // Description: Specifies the position and orientation of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos_hpr // Access: Published // Description: Specifies the position of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 175 inline bool SmoothMover::set_pos_hpr(LVecBase3f const &pos, LVecBase3f const &hpr); inline bool SmoothMover::set_pos_hpr(float x, float y, float z, float h, float p, float r); 71 14 get_sample_pos 0 4 114 27 SmoothMover::get_sample_pos 0 1 14 508 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_sample_pos // Access: Published // Description: Returns the current position of the working sample // point. This position is updated periodically by // set_x(), set_y(), etc., and its current value is // copied to the sample point table when // mark_position() is called. //////////////////////////////////////////////////////////////////// 63 inline LPoint3f const &SmoothMover::get_sample_pos(void) const; 72 14 get_sample_hpr 0 4 114 27 SmoothMover::get_sample_hpr 0 1 15 514 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_sample_hpr // Access: Published // Description: Returns the current orientation of the working sample // point. This orientation is updated periodically by // set_h(), set_p(), etc., and its current value is // copied to the sample point table when // mark_position() is called. //////////////////////////////////////////////////////////////////// 65 inline LVecBase3f const &SmoothMover::get_sample_hpr(void) const; 73 19 set_phony_timestamp 0 4 114 32 SmoothMover::set_phony_timestamp 0 3 16 17 18 457 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_phony_timestamp // Access: Published // Description: Lies and specifies that the current position report // was received now. This is usually used for very old // position reports for which we're not sure of the // actual receipt time. //////////////////////////////////////////////////////////////////// 95 inline void SmoothMover::set_phony_timestamp(double timestamp = (0), bool period_adjust = (0)); 74 13 set_timestamp 0 4 114 26 SmoothMover::set_timestamp 0 1 19 414 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_timestamp // Access: Published // Description: Specifies the time that the current position report // applies. This should be called, along with set_pos() // and set_hpr(), before a call to mark_position(). //////////////////////////////////////////////////////////////////// 57 inline void SmoothMover::set_timestamp(double timestamp); 75 25 has_most_recent_timestamp 0 4 114 38 SmoothMover::has_most_recent_timestamp 0 1 20 294 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::has_most_recent_timestamp // Access: Published // Description: Returns true if we have most recently recorded timestamp //////////////////////////////////////////////////////////////////// 63 inline bool SmoothMover::has_most_recent_timestamp(void) const; 76 25 get_most_recent_timestamp 0 4 114 38 SmoothMover::get_most_recent_timestamp 0 1 21 278 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_most_recent_timestamp // Access: Published // Description: Returns most recently recorded timestamp //////////////////////////////////////////////////////////////////// 65 inline double SmoothMover::get_most_recent_timestamp(void) const; 77 13 mark_position 0 4 114 26 SmoothMover::mark_position 0 1 22 618 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::mark_position // Access: Published // Description: Stores the position, orientation, and timestamp (if // relevant) indicated by previous calls to set_pos(), // set_hpr(), and set_timestamp() in a new position // report. // // When compute_smooth_position() is called, it uses // these stored position reports to base its computation // of the known position. //////////////////////////////////////////////////////////////////// 38 void SmoothMover::mark_position(void); 78 15 clear_positions 0 4 114 28 SmoothMover::clear_positions 0 1 23 540 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::clear_positions // Access: Published // Description: Erases all the old position reports. This should be // done, for instance, prior to teleporting the avatar // to a new position; otherwise, the smoother might try // to lerp the avatar there. If reset_velocity is true, // the velocity is also reset to 0. //////////////////////////////////////////////////////////////////// 55 void SmoothMover::clear_positions(bool reset_velocity); 79 23 compute_smooth_position 0 4 114 36 SmoothMover::compute_smooth_position 0 2 24 25 1435 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_smooth_position // Access: Published // Description: Computes the smoothed position (and orientation) of // the mover at the indicated point in time, based on // the previous position reports. After this call has // been made, get_smooth_pos() etc. may be called to // retrieve the smoothed position. // // With no parameter, the function uses // ClockObject::get_frame_time() as the default time. //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_smooth_position // Access: Published // Description: Computes the smoothed position (and orientation) of // the mover at the indicated point in time, based on // the previous position reports. After this call has // been made, get_smooth_pos() etc. may be called to // retrieve the smoothed position. // // The return value is true if the value has changed (or // might have changed) since the last call to // compute_smooth_position(), or false if it remains the // same. //////////////////////////////////////////////////////////////////// 116 inline bool SmoothMover::compute_smooth_position(void); bool SmoothMover::compute_smooth_position(double timestamp); 80 19 get_latest_position 0 4 114 32 SmoothMover::get_latest_position 0 1 26 554 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_latest_position // Access: Published // Description: Updates the smooth_pos (and smooth_hpr, etc.) members // to reflect the absolute latest position known for // this avatar. This may result in a pop to the most // recent position. // // Returns true if the latest position is known, false // otherwise. //////////////////////////////////////////////////////////////////// 44 bool SmoothMover::get_latest_position(void); 81 14 get_smooth_pos 0 4 114 27 SmoothMover::get_smooth_pos 0 1 27 334 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_pos // Access: Published // Description: Returns the smoothed position as computed by a // previous call to compute_smooth_position(). //////////////////////////////////////////////////////////////////// 63 inline LPoint3f const &SmoothMover::get_smooth_pos(void) const; 82 14 get_smooth_hpr 0 4 114 27 SmoothMover::get_smooth_hpr 0 1 28 337 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_hpr // Access: Published // Description: Returns the smoothed orientation as computed by a // previous call to compute_smooth_position(). //////////////////////////////////////////////////////////////////// 65 inline LVecBase3f const &SmoothMover::get_smooth_hpr(void) const; 83 16 apply_smooth_pos 0 4 114 29 SmoothMover::apply_smooth_pos 0 1 29 532 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::apply_smooth_pos // Access: Published // Description: Applies the smoothed position to the indicated // NodePath. This is equivalent to calling // node.set_pos(smooth_mover->get_smooth_pos()). It // exists as an optimization only, to avoid the overhead // of passing the return value through Python. //////////////////////////////////////////////////////////////////// 64 inline void SmoothMover::apply_smooth_pos(NodePath &node) const; 84 20 apply_smooth_pos_hpr 0 4 114 33 SmoothMover::apply_smooth_pos_hpr 0 1 30 605 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::apply_smooth_pos_hpr // Access: Published // Description: Applies the smoothed position and orientation to the // indicated NodePath. This is equivalent to calling // node.set_pos_hpr(smooth_mover->get_smooth_pos(), // smooth_mover->get_smooth_hpr()). It exists as an // optimization only, to avoid the overhead of passing // the return value through Python. //////////////////////////////////////////////////////////////////// 92 inline void SmoothMover::apply_smooth_pos_hpr(NodePath &pos_node, NodePath &hpr_node) const; 85 16 apply_smooth_hpr 0 4 114 29 SmoothMover::apply_smooth_hpr 0 1 31 535 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::apply_smooth_hpr // Access: Published // Description: Applies the smoothed orientation to the indicated // NodePath. This is equivalent to calling // node.set_hpr(smooth_mover->get_smooth_hpr()). It // exists as an optimization only, to avoid the overhead // of passing the return value through Python. //////////////////////////////////////////////////////////////////// 64 inline void SmoothMover::apply_smooth_hpr(NodePath &node) const; 86 28 compute_and_apply_smooth_pos 0 4 114 41 SmoothMover::compute_and_apply_smooth_pos 0 1 32 406 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_and_apply_smooth_pos // Access: Published // Description: A further optimization to reduce Python calls. This // computes the smooth position and applies it to the // indicated node in one call. //////////////////////////////////////////////////////////////////// 70 inline void SmoothMover::compute_and_apply_smooth_pos(NodePath &node); 87 32 compute_and_apply_smooth_pos_hpr 0 4 114 45 SmoothMover::compute_and_apply_smooth_pos_hpr 0 1 33 491 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_and_apply_smooth_pos_hpr // Access: Published // Description: A further optimization to reduce Python calls. This // computes the smooth position and applies it to the // indicated node or nodes in one call. The pos_node // and hpr_node might be the same NodePath. //////////////////////////////////////////////////////////////////// 98 inline void SmoothMover::compute_and_apply_smooth_pos_hpr(NodePath &pos_node, NodePath &hpr_node); 88 28 compute_and_apply_smooth_hpr 0 4 114 41 SmoothMover::compute_and_apply_smooth_hpr 0 1 34 491 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_and_apply_smooth_pos_hpr // Access: Published // Description: A further optimization to reduce Python calls. This // computes the smooth position and applies it to the // indicated node or nodes in one call. The pos_node // and hpr_node might be the same NodePath. //////////////////////////////////////////////////////////////////// 74 inline void SmoothMover::compute_and_apply_smooth_hpr(NodePath &hpr_node); 89 27 get_smooth_forward_velocity 0 4 114 40 SmoothMover::get_smooth_forward_velocity 0 1 35 551 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_forward_velocity // Access: Published // Description: Returns the speed at which the avatar is moving, in // feet per second, along its own forward axis (after // applying the avatar's hpr). This will be a positive // number if the avatar is moving forward, and a // negative number if it is moving backward. //////////////////////////////////////////////////////////////////// 66 inline float SmoothMover::get_smooth_forward_velocity(void) const; 90 27 get_smooth_lateral_velocity 0 4 114 40 SmoothMover::get_smooth_lateral_velocity 0 1 36 545 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_lateral_velocity // Access: Published // Description: Returns the speed at which the avatar is moving, in // feet per second, along its own lateral axis (after // applying the avatar's hpr). This will be a positive // number if the avatar is moving right, and a // negative number if it is moving left. //////////////////////////////////////////////////////////////////// 66 inline float SmoothMover::get_smooth_lateral_velocity(void) const; 91 30 get_smooth_rotational_velocity 0 4 114 43 SmoothMover::get_smooth_rotational_velocity 0 1 37 481 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_rotational_velocity // Access: Published // Description: Returns the speed at which the avatar is rotating in // the horizontal plane (i.e. heading), in degrees per // second. This may be positive or negative, according // to the direction of rotation. //////////////////////////////////////////////////////////////////// 69 inline float SmoothMover::get_smooth_rotational_velocity(void) const; 92 16 get_forward_axis 0 4 114 29 SmoothMover::get_forward_axis 0 1 38 336 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_forward_axis // Access: Published // Description: Returns the smoothed position as computed by a // previous call to compute_smooth_position(). //////////////////////////////////////////////////////////////////// 67 inline LVecBase3f const &SmoothMover::get_forward_axis(void) const; 93 19 handle_wrt_reparent 0 4 114 32 SmoothMover::handle_wrt_reparent 0 1 39 330 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::handle_wrt_reparent // Access: Private // Description: Node is being wrtReparented, update recorded // sample positions to reflect new parent //////////////////////////////////////////////////////////////////// 82 void SmoothMover::handle_wrt_reparent(NodePath &old_parent, NodePath &new_parent); 94 15 set_smooth_mode 0 4 114 28 SmoothMover::set_smooth_mode 0 1 40 492 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_smooth_mode // Access: Published, Static // Description: Sets the smoothing mode of all SmoothMovers in the // world. If this is SM_off, no smoothing or prediction // will be performed, and get_smooth_pos() will simply // return the position last set by mark_position(). //////////////////////////////////////////////////////////////////// 71 inline void SmoothMover::set_smooth_mode(SmoothMover::SmoothMode mode); 95 15 get_smooth_mode 0 4 114 28 SmoothMover::get_smooth_mode 0 1 41 337 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_mode // Access: Published, Static // Description: Returns the smoothing mode of all SmoothMovers in the // world. See set_smooth_mode(). //////////////////////////////////////////////////////////////////// 66 inline SmoothMover::SmoothMode SmoothMover::get_smooth_mode(void); 96 19 set_prediction_mode 0 4 114 32 SmoothMover::set_prediction_mode 0 1 42 428 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_prediction_mode // Access: Published, Static // Description: Sets the predictioning mode of all SmoothMovers in the // world. If this is PM_off, no prediction will be // performed, but smoothing might still be performed. //////////////////////////////////////////////////////////////////// 79 inline void SmoothMover::set_prediction_mode(SmoothMover::PredictionMode mode); 97 19 get_prediction_mode 0 4 114 32 SmoothMover::get_prediction_mode 0 1 43 349 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_prediction_mode // Access: Published, Static // Description: Returns the predictioning mode of all SmoothMovers in the // world. See set_prediction_mode(). //////////////////////////////////////////////////////////////////// 74 inline SmoothMover::PredictionMode SmoothMover::get_prediction_mode(void); 98 9 set_delay 0 4 114 22 SmoothMover::set_delay 0 1 44 658 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_delay // Access: Published, Static // Description: Sets the amount of time, in seconds, to delay the // computed position of a SmoothMover. This is // particularly useful when the prediction mode is off, // because it can allow the apparent motion of an avatar // to appear smooth without relying on prediction, at // the cost of introducing additional lag in the // avatar's apparent position. //////////////////////////////////////////////////////////////////// 49 inline void SmoothMover::set_delay(double delay); 99 9 get_delay 0 4 114 22 SmoothMover::get_delay 0 1 45 353 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_delay // Access: Published, Static // Description: Returns the amount of time, in seconds, to delay the // computed position of a SmoothMover. See set_delay(). //////////////////////////////////////////////////////////////////// 43 inline double SmoothMover::get_delay(void); 100 21 set_accept_clock_skew 0 4 114 34 SmoothMover::set_accept_clock_skew 0 1 46 962 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_accept_clock_skew // Access: Published, Static // Description: Sets the 'accept clock skew' flag. When this flag is // true, clock skew from the other clients will be // tolerated by delaying each smooth mover's position an // additional amount, on top of that specified by // set_delay(), based on the measured average latency // for timestamp messages received by the client. // // In this way, if the other client has significant // clock skew with respect to our clock, it will be // evident as a large positive or negative average // latency for timestamps. By subtracting out this // average latency, we compensate for poor clock sync. //////////////////////////////////////////////////////////////////// 58 inline void SmoothMover::set_accept_clock_skew(bool flag); 101 21 get_accept_clock_skew 0 4 114 34 SmoothMover::get_accept_clock_skew 0 1 47 347 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_accept_clock_skew // Access: Published, Static // Description: Returns the current state of the 'accept clock skew' // flag. See set_accept_clock_skew(). //////////////////////////////////////////////////////////////////// 53 inline bool SmoothMover::get_accept_clock_skew(void); 102 20 set_max_position_age 0 4 114 33 SmoothMover::set_max_position_age 0 1 48 414 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_max_position_age // Access: Published, Static // Description: Sets the maximum amount of time a position is allowed // to remain unchanged before assuming it represents the // avatar actually standing still. //////////////////////////////////////////////////////////////////// 58 inline void SmoothMover::set_max_position_age(double age); 103 20 get_max_position_age 0 4 114 33 SmoothMover::get_max_position_age 0 1 49 417 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_max_position_age // Access: Published, Static // Description: Returns the maximum amount of time a position is // allowed to remain unchanged before assuming it // represents the avatar actually standing still. //////////////////////////////////////////////////////////////////// 54 inline double SmoothMover::get_max_position_age(void); 104 29 set_expected_broadcast_period 0 4 114 42 SmoothMover::set_expected_broadcast_period 0 1 50 539 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_expected_broadcast_period // Access: Published, Static // Description: Sets the interval at which we expect the SmoothNodes // to broadcast their position, in elapsed seconds. // This controls the length of time we assume the object // has truly stopped, when we receive a long sequence of // no updates. //////////////////////////////////////////////////////////////////// 70 inline void SmoothMover::set_expected_broadcast_period(double period); 105 29 get_expected_broadcast_period 0 4 114 42 SmoothMover::get_expected_broadcast_period 0 1 51 426 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_expected_broadcast_period // Access: Published, Static // Description: Returns the interval at which we expect the SmoothNodes // to broadcast their position, in elapsed seconds. See // set_expected_broadcast_period(). //////////////////////////////////////////////////////////////////// 63 inline double SmoothMover::get_expected_broadcast_period(void); 106 22 set_reset_velocity_age 0 4 114 35 SmoothMover::set_reset_velocity_age 0 1 52 611 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_reset_velocity_age // Access: Published, Static // Description: Sets the amount of time that should elapse after the // last position report before the velocity is reset to // 0. This is similar to max_position_age, but it is // only used to determine the resetting of the reported // velocity. It should always be greater than or equal // to max_position_age. //////////////////////////////////////////////////////////////////// 60 inline void SmoothMover::set_reset_velocity_age(double age); 107 22 get_reset_velocity_age 0 4 114 35 SmoothMover::get_reset_velocity_age 0 1 53 419 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_reset_velocity_age // Access: Published, Static // Description: Returns the amount of time that should elapse after // the last position report before the velocity is reset // to 0. See set_reset_velocity_age(). //////////////////////////////////////////////////////////////////// 56 inline double SmoothMover::get_reset_velocity_age(void); 108 24 set_directional_velocity 0 4 114 37 SmoothMover::set_directional_velocity 0 1 54 680 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_directional_velocity // Access: Published, Static // Description: Sets the flag that indicates whether the avatar's // direction is considered in computing the velocity. // When this is true, velocity is automatically // decomposed into a forward and a lateral velocity (and // both may be positive or negative); when it is false, // all velocity is always returned as forward velocity // (and it is always positive). //////////////////////////////////////////////////////////////////// 61 inline void SmoothMover::set_directional_velocity(bool flag); 109 24 get_directional_velocity 0 4 114 37 SmoothMover::get_directional_velocity 0 1 55 356 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_directional_velocity // Access: Published, Static // Description: Returns the current state of the 'directional // velocity' flag. See set_directional_velocity(). //////////////////////////////////////////////////////////////////// 56 inline bool SmoothMover::get_directional_velocity(void); 110 29 set_default_to_standing_still 0 4 114 42 SmoothMover::set_default_to_standing_still 0 1 56 608 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_default_to_standing_still // Access: Published, Static // Description: Sets the flag that indicates whether to assume that // the node stopped moving during periods when we don't // get enough position updates. If true, the object will // stand still momentarily. If false, the object will // continuously lerp between the position updates that // we did get. //////////////////////////////////////////////////////////////////// 66 inline void SmoothMover::set_default_to_standing_still(bool flag); 111 29 get_default_to_standing_still 0 4 114 42 SmoothMover::get_default_to_standing_still 0 1 57 371 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_default_to_standing_still // Access: Published, Static // Description: Returns the current state of the 'default to standing // still' flag. See set_default_to_standing_still(). //////////////////////////////////////////////////////////////////// 61 inline bool SmoothMover::get_default_to_standing_still(void); 112 6 output 0 4 114 19 SmoothMover::output 0 1 58 219 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::output // Access: Published // Description: //////////////////////////////////////////////////////////////////// 45 void SmoothMover::output(ostream &out) const; 113 5 write 0 4 114 18 SmoothMover::write 0 1 59 218 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::write // Access: Published // Description: //////////////////////////////////////////////////////////////////// 44 void SmoothMover::write(ostream &out) const; 59 1 14 Dtool_FP4VPfNd 0 7 2 117 61 14 Dtool_FP4VPfNd 224 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::Constructor // Access: Published // Description: //////////////////////////////////////////////////////////////////// 0 2 14 Dtool_FP4VO99C 0 6 4 121 0 14 Dtool_FP4VO99C 1287 // Filename: smoothMover.I // Created by: drose (19Oct01) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos // Access: Published // Description: Specifies the position of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 3 pos 1 118 3 14 Dtool_FP4V41r_ 0 6 4 121 0 14 Dtool_FP4V41r_ 800 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos // Access: Published // Description: Specifies the position of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 4 4 this 3 117 1 x 1 122 1 y 1 122 1 z 1 122 4 14 Dtool_FP4Vuc6s 0 6 5 121 0 14 Dtool_FP4Vuc6s 259 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_x // Access: Published // Description: Sets the X position only. See set_pos(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 1 x 1 122 5 14 Dtool_FP4VtcIJ 0 6 6 121 0 14 Dtool_FP4VtcIJ 259 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_y // Access: Published // Description: Sets the Y position only. See set_pos(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 1 y 1 122 6 14 Dtool_FP4VjcWl 0 6 7 121 0 14 Dtool_FP4VjcWl 259 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_z // Access: Published // Description: Sets the Z position only. See set_pos(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 1 z 1 122 7 14 Dtool_FP4VHbNI 0 6 8 121 0 14 Dtool_FP4VHbNI 803 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_hpr // Access: Published // Description: Specifies the orientation of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 3 hpr 1 118 8 14 Dtool_FP4V3N7D 0 6 8 121 0 14 Dtool_FP4V3N7D 803 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_hpr // Access: Published // Description: Specifies the orientation of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with hpr and // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 4 4 this 3 117 1 h 1 122 1 p 1 122 1 r 1 122 9 14 Dtool_FP4VXdap 0 6 9 121 0 14 Dtool_FP4VXdap 256 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_h // Access: Published // Description: Sets the heading only. See set_hpr(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 1 h 1 122 10 14 Dtool_FP4V7cKL 0 6 10 121 0 14 Dtool_FP4V7cKL 254 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_p // Access: Published // Description: Sets the pitch only. See set_hpr(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 1 p 1 122 11 14 Dtool_FP4V8cmD 0 6 11 121 0 14 Dtool_FP4V8cmD 253 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_r // Access: Published // Description: Sets the roll only. See set_hpr(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 1 r 1 122 12 14 Dtool_FP4VHRiL 0 6 12 121 0 14 Dtool_FP4VHRiL 816 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos_hpr // Access: Published // Description: Specifies the position and orientation of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 3 4 this 3 117 3 pos 1 118 3 hpr 1 118 13 14 Dtool_FP4VxWbC 0 6 12 121 0 14 Dtool_FP4VxWbC 800 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_pos_hpr // Access: Published // Description: Specifies the position of the SmoothMover at a // particular time in the past. When mark_position() is // called, this will be recorded (along with // timestamp) in a position report, which will then be // used along with all other position reports to // determine the smooth position at any particular // instant. // // The return value is true if any parameter has changed // since the last call to set_pos_hpr(), or false if they // are the same. //////////////////////////////////////////////////////////////////// 7 4 this 3 117 1 x 1 122 1 y 1 122 1 z 1 122 1 h 1 122 1 p 1 122 1 r 1 122 14 14 Dtool_FP4VzjDJ 0 6 13 125 0 14 Dtool_FP4VzjDJ 508 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_sample_pos // Access: Published // Description: Returns the current position of the working sample // point. This position is updated periodically by // set_x(), set_y(), etc., and its current value is // copied to the sample point table when // mark_position() is called. //////////////////////////////////////////////////////////////////// 1 4 this 3 123 15 14 Dtool_FP4VaB_1 0 6 14 118 0 14 Dtool_FP4VaB_1 514 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_sample_hpr // Access: Published // Description: Returns the current orientation of the working sample // point. This orientation is updated periodically by // set_h(), set_p(), etc., and its current value is // copied to the sample point table when // mark_position() is called. //////////////////////////////////////////////////////////////////// 1 4 this 3 123 16 14 Dtool_FP4VsgaB 0 4 15 129 0 14 Dtool_FP4VsgaB 457 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_phony_timestamp // Access: Published // Description: Lies and specifies that the current position report // was received now. This is usually used for very old // position reports for which we're not sure of the // actual receipt time. //////////////////////////////////////////////////////////////////// 3 4 this 3 117 9 timestamp 1 128 13 period_adjust 1 121 17 14 Dtool_FP4V6W_7 0 4 15 129 0 14 Dtool_FP4V6W_7 457 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_phony_timestamp // Access: Published // Description: Lies and specifies that the current position report // was received now. This is usually used for very old // position reports for which we're not sure of the // actual receipt time. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 9 timestamp 1 128 18 14 Dtool_FP4Vh7VW 0 4 15 129 0 14 Dtool_FP4Vh7VW 457 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_phony_timestamp // Access: Published // Description: Lies and specifies that the current position report // was received now. This is usually used for very old // position reports for which we're not sure of the // actual receipt time. //////////////////////////////////////////////////////////////////// 1 4 this 3 117 19 14 Dtool_FP4V6Ag7 0 4 16 129 0 14 Dtool_FP4V6Ag7 414 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_timestamp // Access: Published // Description: Specifies the time that the current position report // applies. This should be called, along with set_pos() // and set_hpr(), before a call to mark_position(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 9 timestamp 1 128 20 14 Dtool_FP4VpxGl 0 6 17 121 0 14 Dtool_FP4VpxGl 294 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::has_most_recent_timestamp // Access: Published // Description: Returns true if we have most recently recorded timestamp //////////////////////////////////////////////////////////////////// 1 4 this 3 123 21 14 Dtool_FP4VBwzh 0 6 18 128 0 14 Dtool_FP4VBwzh 278 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_most_recent_timestamp // Access: Published // Description: Returns most recently recorded timestamp //////////////////////////////////////////////////////////////////// 1 4 this 3 123 22 14 Dtool_FP4VFTFs 0 4 19 129 0 14 Dtool_FP4VFTFs 618 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::mark_position // Access: Published // Description: Stores the position, orientation, and timestamp (if // relevant) indicated by previous calls to set_pos(), // set_hpr(), and set_timestamp() in a new position // report. // // When compute_smooth_position() is called, it uses // these stored position reports to base its computation // of the known position. //////////////////////////////////////////////////////////////////// 1 4 this 3 117 23 14 Dtool_FP4V_lt8 0 4 20 129 0 14 Dtool_FP4V_lt8 540 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::clear_positions // Access: Published // Description: Erases all the old position reports. This should be // done, for instance, prior to teleporting the avatar // to a new position; otherwise, the smoother might try // to lerp the avatar there. If reset_velocity is true, // the velocity is also reset to 0. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 14 reset_velocity 1 121 24 14 Dtool_FP4VNhMU 0 6 21 121 0 14 Dtool_FP4VNhMU 665 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_smooth_position // Access: Published // Description: Computes the smoothed position (and orientation) of // the mover at the indicated point in time, based on // the previous position reports. After this call has // been made, get_smooth_pos() etc. may be called to // retrieve the smoothed position. // // With no parameter, the function uses // ClockObject::get_frame_time() as the default time. //////////////////////////////////////////////////////////////////// 1 4 this 3 117 25 14 Dtool_FP4VBIgu 0 6 21 121 0 14 Dtool_FP4VBIgu 768 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_smooth_position // Access: Published // Description: Computes the smoothed position (and orientation) of // the mover at the indicated point in time, based on // the previous position reports. After this call has // been made, get_smooth_pos() etc. may be called to // retrieve the smoothed position. // // The return value is true if the value has changed (or // might have changed) since the last call to // compute_smooth_position(), or false if it remains the // same. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 9 timestamp 1 128 26 14 Dtool_FP4Vp1_G 0 6 22 121 0 14 Dtool_FP4Vp1_G 554 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_latest_position // Access: Published // Description: Updates the smooth_pos (and smooth_hpr, etc.) members // to reflect the absolute latest position known for // this avatar. This may result in a pop to the most // recent position. // // Returns true if the latest position is known, false // otherwise. //////////////////////////////////////////////////////////////////// 1 4 this 3 117 27 14 Dtool_FP4V7_MU 0 6 23 125 0 14 Dtool_FP4V7_MU 334 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_pos // Access: Published // Description: Returns the smoothed position as computed by a // previous call to compute_smooth_position(). //////////////////////////////////////////////////////////////////// 1 4 this 3 123 28 14 Dtool_FP4VTcHB 0 6 24 118 0 14 Dtool_FP4VTcHB 337 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_hpr // Access: Published // Description: Returns the smoothed orientation as computed by a // previous call to compute_smooth_position(). //////////////////////////////////////////////////////////////////// 1 4 this 3 123 29 14 Dtool_FP4VJn_4 0 4 25 129 0 14 Dtool_FP4VJn_4 532 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::apply_smooth_pos // Access: Published // Description: Applies the smoothed position to the indicated // NodePath. This is equivalent to calling // node.set_pos(smooth_mover->get_smooth_pos()). It // exists as an optimization only, to avoid the overhead // of passing the return value through Python. //////////////////////////////////////////////////////////////////// 2 4 this 3 123 4 node 1 130 30 14 Dtool_FP4Vx4kD 0 4 26 129 0 14 Dtool_FP4Vx4kD 605 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::apply_smooth_pos_hpr // Access: Published // Description: Applies the smoothed position and orientation to the // indicated NodePath. This is equivalent to calling // node.set_pos_hpr(smooth_mover->get_smooth_pos(), // smooth_mover->get_smooth_hpr()). It exists as an // optimization only, to avoid the overhead of passing // the return value through Python. //////////////////////////////////////////////////////////////////// 3 4 this 3 123 8 pos_node 1 130 8 hpr_node 1 130 31 14 Dtool_FP4VYgpx 0 4 27 129 0 14 Dtool_FP4VYgpx 535 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::apply_smooth_hpr // Access: Published // Description: Applies the smoothed orientation to the indicated // NodePath. This is equivalent to calling // node.set_hpr(smooth_mover->get_smooth_hpr()). It // exists as an optimization only, to avoid the overhead // of passing the return value through Python. //////////////////////////////////////////////////////////////////// 2 4 this 3 123 4 node 1 130 32 14 Dtool_FP4VXkNP 0 4 28 129 0 14 Dtool_FP4VXkNP 406 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_and_apply_smooth_pos // Access: Published // Description: A further optimization to reduce Python calls. This // computes the smooth position and applies it to the // indicated node in one call. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 4 node 1 130 33 14 Dtool_FP4Vl8l_ 0 4 29 129 0 14 Dtool_FP4Vl8l_ 491 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_and_apply_smooth_pos_hpr // Access: Published // Description: A further optimization to reduce Python calls. This // computes the smooth position and applies it to the // indicated node or nodes in one call. The pos_node // and hpr_node might be the same NodePath. //////////////////////////////////////////////////////////////////// 3 4 this 3 117 8 pos_node 1 130 8 hpr_node 1 130 34 14 Dtool_FP4V98cK 0 4 30 129 0 14 Dtool_FP4V98cK 491 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::compute_and_apply_smooth_pos_hpr // Access: Published // Description: A further optimization to reduce Python calls. This // computes the smooth position and applies it to the // indicated node or nodes in one call. The pos_node // and hpr_node might be the same NodePath. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 8 hpr_node 1 130 35 14 Dtool_FP4VDxNc 0 6 31 122 0 14 Dtool_FP4VDxNc 551 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_forward_velocity // Access: Published // Description: Returns the speed at which the avatar is moving, in // feet per second, along its own forward axis (after // applying the avatar's hpr). This will be a positive // number if the avatar is moving forward, and a // negative number if it is moving backward. //////////////////////////////////////////////////////////////////// 1 4 this 3 123 36 14 Dtool_FP4VGnNw 0 6 32 122 0 14 Dtool_FP4VGnNw 545 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_lateral_velocity // Access: Published // Description: Returns the speed at which the avatar is moving, in // feet per second, along its own lateral axis (after // applying the avatar's hpr). This will be a positive // number if the avatar is moving right, and a // negative number if it is moving left. //////////////////////////////////////////////////////////////////// 1 4 this 3 123 37 14 Dtool_FP4VlTjX 0 6 33 122 0 14 Dtool_FP4VlTjX 481 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_rotational_velocity // Access: Published // Description: Returns the speed at which the avatar is rotating in // the horizontal plane (i.e. heading), in degrees per // second. This may be positive or negative, according // to the direction of rotation. //////////////////////////////////////////////////////////////////// 1 4 this 3 123 38 14 Dtool_FP4VOLUG 0 6 34 118 0 14 Dtool_FP4VOLUG 336 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_forward_axis // Access: Published // Description: Returns the smoothed position as computed by a // previous call to compute_smooth_position(). //////////////////////////////////////////////////////////////////// 1 4 this 3 123 39 14 Dtool_FP4VQ_DT 0 4 35 129 0 14 Dtool_FP4VQ_DT 330 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::handle_wrt_reparent // Access: Private // Description: Node is being wrtReparented, update recorded // sample positions to reflect new parent //////////////////////////////////////////////////////////////////// 3 4 this 3 117 10 old_parent 1 130 10 new_parent 1 130 40 14 Dtool_FP4V_UPz 0 4 38 129 0 14 Dtool_FP4V_UPz 492 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_smooth_mode // Access: Published, Static // Description: Sets the smoothing mode of all SmoothMovers in the // world. If this is SM_off, no smoothing or prediction // will be performed, and get_smooth_pos() will simply // return the position last set by mark_position(). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 4 mode 1 115 41 14 Dtool_FP4VjHbf 0 6 39 115 0 14 Dtool_FP4VjHbf 337 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_smooth_mode // Access: Published, Static // Description: Returns the smoothing mode of all SmoothMovers in the // world. See set_smooth_mode(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 42 14 Dtool_FP4V4I6v 0 4 40 129 0 14 Dtool_FP4V4I6v 428 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_prediction_mode // Access: Published, Static // Description: Sets the predictioning mode of all SmoothMovers in the // world. If this is PM_off, no prediction will be // performed, but smoothing might still be performed. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 4 mode 1 116 43 14 Dtool_FP4VsYHY 0 6 41 116 0 14 Dtool_FP4VsYHY 349 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_prediction_mode // Access: Published, Static // Description: Returns the predictioning mode of all SmoothMovers in the // world. See set_prediction_mode(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 44 14 Dtool_FP4VA_i_ 0 4 42 129 0 14 Dtool_FP4VA_i_ 658 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_delay // Access: Published, Static // Description: Sets the amount of time, in seconds, to delay the // computed position of a SmoothMover. This is // particularly useful when the prediction mode is off, // because it can allow the apparent motion of an avatar // to appear smooth without relying on prediction, at // the cost of introducing additional lag in the // avatar's apparent position. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 5 delay 1 128 45 14 Dtool_FP4V5AIs 0 6 43 128 0 14 Dtool_FP4V5AIs 353 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_delay // Access: Published, Static // Description: Returns the amount of time, in seconds, to delay the // computed position of a SmoothMover. See set_delay(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 46 14 Dtool_FP4VzWkf 0 4 44 129 0 14 Dtool_FP4VzWkf 962 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_accept_clock_skew // Access: Published, Static // Description: Sets the 'accept clock skew' flag. When this flag is // true, clock skew from the other clients will be // tolerated by delaying each smooth mover's position an // additional amount, on top of that specified by // set_delay(), based on the measured average latency // for timestamp messages received by the client. // // In this way, if the other client has significant // clock skew with respect to our clock, it will be // evident as a large positive or negative average // latency for timestamps. By subtracting out this // average latency, we compensate for poor clock sync. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 4 flag 1 121 47 14 Dtool_FP4VgmDB 0 6 45 121 0 14 Dtool_FP4VgmDB 347 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_accept_clock_skew // Access: Published, Static // Description: Returns the current state of the 'accept clock skew' // flag. See set_accept_clock_skew(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 48 14 Dtool_FP4V31KR 0 4 46 129 0 14 Dtool_FP4V31KR 414 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_max_position_age // Access: Published, Static // Description: Sets the maximum amount of time a position is allowed // to remain unchanged before assuming it represents the // avatar actually standing still. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 3 age 1 128 49 14 Dtool_FP4VA52x 0 6 47 128 0 14 Dtool_FP4VA52x 417 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_max_position_age // Access: Published, Static // Description: Returns the maximum amount of time a position is // allowed to remain unchanged before assuming it // represents the avatar actually standing still. //////////////////////////////////////////////////////////////////// 1 4 this 3 117 50 14 Dtool_FP4V3gi0 0 4 48 129 0 14 Dtool_FP4V3gi0 539 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_expected_broadcast_period // Access: Published, Static // Description: Sets the interval at which we expect the SmoothNodes // to broadcast their position, in elapsed seconds. // This controls the length of time we assume the object // has truly stopped, when we receive a long sequence of // no updates. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 6 period 1 128 51 14 Dtool_FP4VWa4z 0 6 49 128 0 14 Dtool_FP4VWa4z 426 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_expected_broadcast_period // Access: Published, Static // Description: Returns the interval at which we expect the SmoothNodes // to broadcast their position, in elapsed seconds. See // set_expected_broadcast_period(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 52 14 Dtool_FP4VCgwu 0 4 50 129 0 14 Dtool_FP4VCgwu 611 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_reset_velocity_age // Access: Published, Static // Description: Sets the amount of time that should elapse after the // last position report before the velocity is reset to // 0. This is similar to max_position_age, but it is // only used to determine the resetting of the reported // velocity. It should always be greater than or equal // to max_position_age. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 3 age 1 128 53 14 Dtool_FP4VcH9v 0 6 51 128 0 14 Dtool_FP4VcH9v 419 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_reset_velocity_age // Access: Published, Static // Description: Returns the amount of time that should elapse after // the last position report before the velocity is reset // to 0. See set_reset_velocity_age(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 54 14 Dtool_FP4V4PVA 0 4 52 129 0 14 Dtool_FP4V4PVA 680 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_directional_velocity // Access: Published, Static // Description: Sets the flag that indicates whether the avatar's // direction is considered in computing the velocity. // When this is true, velocity is automatically // decomposed into a forward and a lateral velocity (and // both may be positive or negative); when it is false, // all velocity is always returned as forward velocity // (and it is always positive). //////////////////////////////////////////////////////////////////// 2 4 this 3 117 4 flag 1 121 55 14 Dtool_FP4VTtnw 0 6 53 121 0 14 Dtool_FP4VTtnw 356 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_directional_velocity // Access: Published, Static // Description: Returns the current state of the 'directional // velocity' flag. See set_directional_velocity(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 56 14 Dtool_FP4VMwPG 0 4 54 129 0 14 Dtool_FP4VMwPG 608 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::set_default_to_standing_still // Access: Published, Static // Description: Sets the flag that indicates whether to assume that // the node stopped moving during periods when we don't // get enough position updates. If true, the object will // stand still momentarily. If false, the object will // continuously lerp between the position updates that // we did get. //////////////////////////////////////////////////////////////////// 2 4 this 3 117 4 flag 1 121 57 14 Dtool_FP4VyfyQ 0 6 55 121 0 14 Dtool_FP4VyfyQ 371 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::get_default_to_standing_still // Access: Published, Static // Description: Returns the current state of the 'default to standing // still' flag. See set_default_to_standing_still(). //////////////////////////////////////////////////////////////////// 1 4 this 3 117 58 14 Dtool_FP4VWhUX 0 4 56 129 0 14 Dtool_FP4VWhUX 219 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::output // Access: Published // Description: //////////////////////////////////////////////////////////////////// 2 4 this 3 123 3 out 1 132 59 14 Dtool_FP4VednE 0 4 57 129 0 14 Dtool_FP4VednE 218 //////////////////////////////////////////////////////////////////// // Function: SmoothMover::write // Access: Published // Description: //////////////////////////////////////////////////////////////////// 2 4 this 3 123 3 out 1 132 20 114 11 SmoothMover 0 26625 11 SmoothMover 11 SmoothMover 0 0 0 1 60 61 0 52 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 0 0 0 0 2 115 116 1068 //////////////////////////////////////////////////////////////////// // Class : SmoothMover // Description : This class handles smoothing of sampled motion points // over time, e.g. for smoothing the apparent movement // of remote avatars, whose positions are sent via // occasional telemetry updates. // // It can operate in any of three modes: off, in which // it does not smooth any motion but provides the last // position it was told; smoothing only, in which it // smooths motion information but never tries to // anticipate where the avatar might be going; or full // prediction, in which it smooths motion as well as // tries to predict the avatar's position in lead of the // last position update. The assumption is that all // SmoothMovers in the world will be operating in the // same mode together. //////////////////////////////////////////////////////////////////// 115 10 SmoothMode 0 794624 23 SmoothMover::SmoothMode 23 SmoothMover::SmoothMode 114 0 0 0 0 0 0 0 0 0 2 6 SM_off 19 SmoothMover::SM_off 0 5 SM_on 18 SmoothMover::SM_on 1 0 0 116 14 PredictionMode 0 794624 27 SmoothMover::PredictionMode 27 SmoothMover::PredictionMode 114 0 0 0 0 0 0 0 0 0 2 6 PM_off 19 SmoothMover::PM_off 0 5 PM_on 18 SmoothMover::PM_on 1 0 89 // We might conceivably add more kinds of smooth modes later, for // instance, SM_spline. 117 13 SmoothMover * 0 8576 13 SmoothMover * 13 SmoothMover * 0 0 114 0 0 0 0 0 0 0 0 0 0 118 18 LVecBase3f const * 0 8576 18 LVecBase3f const * 18 LVecBase3f const * 0 0 119 0 0 0 0 0 0 0 0 0 0 119 16 LVecBase3f const 0 8832 16 LVecBase3f const 16 LVecBase3f const 0 0 120 0 0 0 0 0 0 0 0 0 0 120 10 LVecBase3f 0 2048 10 LVecBase3f 10 LVecBase3f 0 0 0 0 0 0 0 0 0 0 0 0 754 // Filename: lvecBase3_src.h // Created by: drose (08Mar00) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Class : LVecBase3 // Description : This is the base class for all three-component // vectors and points. //////////////////////////////////////////////////////////////////// 121 4 bool 0 8194 4 bool 4 bool 0 4 0 0 0 0 0 0 0 0 0 0 0 122 5 float 0 8194 5 float 5 float 0 2 0 0 0 0 0 0 0 0 0 0 0 123 19 SmoothMover const * 0 8576 19 SmoothMover const * 19 SmoothMover const * 0 0 124 0 0 0 0 0 0 0 0 0 0 124 17 SmoothMover const 0 8832 17 SmoothMover const 17 SmoothMover const 0 0 114 0 0 0 0 0 0 0 0 0 0 125 16 LPoint3f const * 0 8576 16 LPoint3f const * 16 LPoint3f const * 0 0 126 0 0 0 0 0 0 0 0 0 0 126 14 LPoint3f const 0 8832 14 LPoint3f const 14 LPoint3f const 0 0 127 0 0 0 0 0 0 0 0 0 0 127 8 LPoint3f 0 2048 8 LPoint3f 8 LPoint3f 0 0 0 0 0 0 0 0 0 0 0 0 1083 // Filename: lpoint3_src.h // Created by: drose (25Sep99) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Class : LPoint3 // Description : This is a three-component point in space (as opposed // to a three-component vector, which represents a // direction and a distance). Some of the methods are // slightly different between LPoint3 and LVector3; in // particular, subtraction of two points yields a // vector, while addition of a vector and a point yields // a point. //////////////////////////////////////////////////////////////////// 128 6 double 0 8194 6 double 6 double 0 3 0 0 0 0 0 0 0 0 0 0 0 129 4 void 0 8194 4 void 4 void 0 6 0 0 0 0 0 0 0 0 0 0 0 130 10 NodePath * 0 8576 10 NodePath * 10 NodePath * 0 0 131 0 0 0 0 0 0 0 0 0 0 131 8 NodePath 0 2048 8 NodePath 8 NodePath 0 0 0 0 0 0 0 2 134 135 0 0 0 0 4938 // // A NodePath is the fundamental unit of high-level interaction with // the scene graph. It encapsulates the complete path down to a node // from some other node, usually the root of the scene graph. This is // used to resolve ambiguities associated with instancing. // // NodePath also contains a number of handy high-level methods for // common scene-graph manipulations, such as reparenting, and common // state changes, such as repositioning. // // There are also a number of NodePath methods for finding nodes deep // within the tree by name or by type. These take a path string, // which at its simplest consists of a series of node names separated // by slashes, like a directory pathname. // // Each component of the path string may optionally consist of one of // the following special names, instead of a node name: // // * -- matches exactly one node, with any name. // ** -- matches any sequence of zero or more nodes. // +typename -- matches any node that is or derives from the given type. // -typename -- matches any node that is the given type exactly. // =tag -- matches any node that has the indicated tag. // =tag=value -- matches any node whose tag matches the indicated value. // // Furthermore, a node name may itself contain standard filename // globbing characters, like *, ?, and [a-z], that will be accepted as // a partial match. (In fact, the '*' special name may be seen as // just a special case of this.) The globbing characters may not be // used with the typename matches or with tag matches, but they may // be used to match a tag's value in the =tag=value syntax. // // The special characters "@@", appearing at the beginning of a node // name, indicate a stashed node. Normally, stashed nodes are not // returned by a find (but see the special flags, below), but a // stashed node may be found if it is explicitly named with its // leading @@ characters. By extension, "@@*" may be used to identify // any stashed node. // // Examples: // // "room//graph" will look for a node named "graph", which is a child // of an unnamed node, which is a child of a node named "room", which // is a child of the starting path. // // "**/red*" will look for any node anywhere in the tree (below the // starting path) with a name that begins with "red". // // "**/+PartBundleNode/**/head" will look for a node named "head", // somewhere below a PartBundleNode anywhere in the tree. // // // The search is always potentially ambiguous, even if the special // wildcard operators are not used, because there may be multiple // nodes in the tree with the same name. In general, in the case of // an ambiguity, the shortest path is preferred; when a method (such // as extend_by) must choose only only one of several possible paths, // it will choose the shortest available; on the other hand, when a // method (such as find_all_matches) is to return all of the matching // paths, it will sort them so that the shortest paths appear first in // the output. // // // Special flags. The entire string may optionally be followed by the // ";" character, followed by one or more of the following special // control flags, with no intervening spaces or punctuation: // // -h Do not return hidden nodes. // +h Do return hidden nodes. // -s Do not return stashed nodes unless explicitly referenced with @@. // +s Return stashed nodes even without any explicit @@ characters. // -i Node name comparisons are not case insensitive: case must match // exactly. // +i Node name comparisons are case insensitive: case is not important. // This affects matches against the node name only; node type // and tag strings are always case sensitive. // // The default flags are +h-s-i. // //////////////////////////////////////////////////////////////////// // Class : NodePath // Description : NodePath is the fundamental system for disambiguating // instances, and also provides a higher-level interface // for manipulating the scene graph. // // A NodePath is a list of connected nodes from the root // of the graph to any sub-node. Each NodePath // therefore uniquely describes one instance of a node. // // NodePaths themselves are lightweight objects that may // easily be copied and passed by value. Their data is // stored as a series of NodePathComponents that are // stored on the nodes. Holding a NodePath will keep a // reference count to all the nodes in the path. // However, if any node in the path is removed or // reparented (perhaps through a different NodePath), // the NodePath will automatically be updated to reflect // the changes. //////////////////////////////////////////////////////////////////// 132 9 ostream * 0 8576 9 ostream * 9 ostream * 0 0 133 0 0 0 0 0 0 0 0 0 0 133 7 ostream 0 2048 7 ostream 7 ostream 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 134 0 0 101 9 get_nodes 13 get_num_nodes 8 get_node 135 0 0 101 13 get_ancestors 13 get_num_nodes 12 get_ancestor