DriveInterface

from panda3d.core import DriveInterface
class DriveInterface

Bases: MouseInterfaceNode

This is a TFormer, similar to Trackball, that moves around a transform matrix in response to mouse input. The basic motion is on a horizontal plane, as if driving a vehicle.

Inheritance diagram

Inheritance diagram of DriveInterface

__init__(*args, **kwargs)
forceDgraph()

C++ Interface: force_dgraph(const DriveInterface self)

/**
  • This is a special kludge for DriveInterface to allow us to avoid the one-

  • frame latency after a collision. It forces an immediate partial data flow

  • for all data graph nodes below this node, causing all data nodes that

  • depend on this matrix to be updated immediately.

*/

force_dgraph()

C++ Interface: force_dgraph(const DriveInterface self)

/**
  • This is a special kludge for DriveInterface to allow us to avoid the one-

  • frame latency after a collision. It forces an immediate partial data flow

  • for all data graph nodes below this node, causing all data nodes that

  • depend on this matrix to be updated immediately.

*/

getClassType()

C++ Interface: get_class_type()

getForceMouse()

C++ Interface: get_force_mouse(DriveInterface self)

/**
  • Returns the current setting of the force_mouse flag. See

  • set_force_mouse().

*/

getForwardSpeed()

C++ Interface: get_forward_speed(DriveInterface self)

/**
  • Returns the speed of full forward motion, when the mouse is at the very top

  • of the window. This is in units (e.g. feet) per second.

*/

getH()

C++ Interface: get_h(DriveInterface self)

getHorizontalDeadZone()

C++ Interface: get_horizontal_dead_zone(DriveInterface self)

/**
  • Returns the size of the vertical bar in the center of the screen that

  • represents the “dead zone” of horizontal motion: the region in which the

  • mouse does not report horizontal motion. This is in a fraction of the

  • window width, so 0.5 will set a dead zone as large as half the screen.

*/

getHorizontalRampDownTime()

C++ Interface: get_horizontal_ramp_down_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time a left or

  • right arrow key is released and the time it registers no motion.

*/

getHorizontalRampUpTime()

C++ Interface: get_horizontal_ramp_up_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time a left or

  • right arrow key is pressed and the time it registers full rotation.

*/

getHpr()

C++ Interface: get_hpr(DriveInterface self)

/**
  • Returns the driver’s orientation.

*/

getIgnoreMouse()

C++ Interface: get_ignore_mouse(DriveInterface self)

/**
  • Returns the current setting of the ignore_mouse flag. See

  • set_ignore_mouse().

*/

getMat()

C++ Interface: get_mat(const DriveInterface self)

/**
  • Returns the current transform.

*/

getP()

C++ Interface: get_p(DriveInterface self)

getPos()

C++ Interface: get_pos(DriveInterface self)

/**
  • Returns the driver’s position.

*/

getR()

C++ Interface: get_r(DriveInterface self)

getReverseSpeed()

C++ Interface: get_reverse_speed(DriveInterface self)

/**
  • Returns the speed of full reverse motion, when the mouse is at the very

  • bottom of the window. This is in units (e.g. feet) per second.

*/

getRotSpeed()

C++ Interface: get_rot_speed(DriveInterface self)

/**
  • Returns the rot_speed of the previous update in units/sec

*/

getRotateSpeed()

C++ Interface: get_rotate_speed(DriveInterface self)

/**
  • Returns the maximum rate at which the user can rotate left or right, when

  • the mouse is at the very edge of the window. This is in degrees per

  • second.

*/

getSpeed()

C++ Interface: get_speed(DriveInterface self)

/**
  • Returns the speed of the previous update in units/sec

*/

getStopThisFrame()

C++ Interface: get_stop_this_frame(DriveInterface self)

/**
  • Returns the current setting of the stop_this_frame flag. See

  • set_stop_this_frame().

*/

getVerticalDeadZone()

C++ Interface: get_vertical_dead_zone(DriveInterface self)

/**
  • Returns the size of the horizontal bar in the center of the screen that

  • represents the “dead zone” of vertical motion: the region in which the

  • mouse does not report vertical motion. This is in a fraction of the window

  • height, so 0.5 will set a dead zone as large as half the screen.

*/

getVerticalRampDownTime()

C++ Interface: get_vertical_ramp_down_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time an up or

  • down arrow key is released and the time it registers no motion.

*/

getVerticalRampUpTime()

C++ Interface: get_vertical_ramp_up_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time an up or

  • down arrow key is pressed and the time it registers full forward or

  • backward motion.

*/

getX()

C++ Interface: get_x(DriveInterface self)

getY()

C++ Interface: get_y(DriveInterface self)

getZ()

C++ Interface: get_z(DriveInterface self)

get_class_type()

C++ Interface: get_class_type()

get_force_mouse()

C++ Interface: get_force_mouse(DriveInterface self)

/**
  • Returns the current setting of the force_mouse flag. See

  • set_force_mouse().

*/

get_forward_speed()

C++ Interface: get_forward_speed(DriveInterface self)

/**
  • Returns the speed of full forward motion, when the mouse is at the very top

  • of the window. This is in units (e.g. feet) per second.

*/

get_h()

C++ Interface: get_h(DriveInterface self)

get_horizontal_dead_zone()

C++ Interface: get_horizontal_dead_zone(DriveInterface self)

/**
  • Returns the size of the vertical bar in the center of the screen that

  • represents the “dead zone” of horizontal motion: the region in which the

  • mouse does not report horizontal motion. This is in a fraction of the

  • window width, so 0.5 will set a dead zone as large as half the screen.

*/

get_horizontal_ramp_down_time()

C++ Interface: get_horizontal_ramp_down_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time a left or

  • right arrow key is released and the time it registers no motion.

*/

get_horizontal_ramp_up_time()

C++ Interface: get_horizontal_ramp_up_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time a left or

  • right arrow key is pressed and the time it registers full rotation.

*/

get_hpr()

C++ Interface: get_hpr(DriveInterface self)

/**
  • Returns the driver’s orientation.

*/

get_ignore_mouse()

C++ Interface: get_ignore_mouse(DriveInterface self)

/**
  • Returns the current setting of the ignore_mouse flag. See

  • set_ignore_mouse().

*/

get_mat()

C++ Interface: get_mat(const DriveInterface self)

/**
  • Returns the current transform.

*/

get_p()

C++ Interface: get_p(DriveInterface self)

get_pos()

C++ Interface: get_pos(DriveInterface self)

/**
  • Returns the driver’s position.

*/

get_r()

C++ Interface: get_r(DriveInterface self)

get_reverse_speed()

C++ Interface: get_reverse_speed(DriveInterface self)

/**
  • Returns the speed of full reverse motion, when the mouse is at the very

  • bottom of the window. This is in units (e.g. feet) per second.

*/

get_rot_speed()

C++ Interface: get_rot_speed(DriveInterface self)

/**
  • Returns the rot_speed of the previous update in units/sec

*/

get_rotate_speed()

C++ Interface: get_rotate_speed(DriveInterface self)

/**
  • Returns the maximum rate at which the user can rotate left or right, when

  • the mouse is at the very edge of the window. This is in degrees per

  • second.

*/

get_speed()

C++ Interface: get_speed(DriveInterface self)

/**
  • Returns the speed of the previous update in units/sec

*/

get_stop_this_frame()

C++ Interface: get_stop_this_frame(DriveInterface self)

/**
  • Returns the current setting of the stop_this_frame flag. See

  • set_stop_this_frame().

*/

get_vertical_dead_zone()

C++ Interface: get_vertical_dead_zone(DriveInterface self)

/**
  • Returns the size of the horizontal bar in the center of the screen that

  • represents the “dead zone” of vertical motion: the region in which the

  • mouse does not report vertical motion. This is in a fraction of the window

  • height, so 0.5 will set a dead zone as large as half the screen.

*/

get_vertical_ramp_down_time()

C++ Interface: get_vertical_ramp_down_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time an up or

  • down arrow key is released and the time it registers no motion.

*/

get_vertical_ramp_up_time()

C++ Interface: get_vertical_ramp_up_time(DriveInterface self)

/**
  • Returns the amount of time, in seconds, it takes between the time an up or

  • down arrow key is pressed and the time it registers full forward or

  • backward motion.

*/

get_x()

C++ Interface: get_x(DriveInterface self)

get_y()

C++ Interface: get_y(DriveInterface self)

get_z()

C++ Interface: get_z(DriveInterface self)

reset()

C++ Interface: reset(const DriveInterface self)

/**
  • Reinitializes the driver to the origin and resets any knowledge about

  • buttons being held down.

*/

setForceMouse()

C++ Interface: set_force_mouse(const DriveInterface self, bool force_mouse)

/**
  • Changes the state of the force_mouse flag. If this flag is true, the mouse

  • button need not be held down in order to drive the avatar around.

*/

setForceRoll()

C++ Interface: set_force_roll(const DriveInterface self, float force_roll)

/**
  • This function is no longer used and does nothing. It will be removed soon.

*/

setForwardSpeed()

C++ Interface: set_forward_speed(const DriveInterface self, float speed)

/**
  • Sets the speed of full forward motion, when the mouse is at the very top of

  • the window. This is in units (e.g. feet) per second.

*/

setH()

C++ Interface: set_h(const DriveInterface self, float h)

setHorizontalDeadZone()

C++ Interface: set_horizontal_dead_zone(const DriveInterface self, float zone)

/**
  • Sets the size of the vertical bar in the center of the screen that

  • represents the “dead zone” of horizontal motion: the region in which the

  • mouse does not report horizontal motion. This is in a fraction of the

  • window width, so 0.5 will set a dead zone as large as half the screen.

*/

setHorizontalRampDownTime()

C++ Interface: set_horizontal_ramp_down_time(const DriveInterface self, float ramp_down_time)

/**
  • Sets the amount of time, in seconds, it takes between the time a left or

  • right arrow key is released and the time it registers no motion.

*/

setHorizontalRampUpTime()

C++ Interface: set_horizontal_ramp_up_time(const DriveInterface self, float ramp_up_time)

/**
  • Sets the amount of time, in seconds, it takes between the time a left or

  • right arrow key is pressed and the time it registers full rotation.

*/

setHpr()

C++ Interface: set_hpr(const DriveInterface self, const LVecBase3f hpr) set_hpr(const DriveInterface self, float h, float p, float r)

/**
  • Directly sets the driver’s orientation.

*/

setIgnoreMouse()

C++ Interface: set_ignore_mouse(const DriveInterface self, bool ignore_mouse)

/**
  • Changes the state of the ignore_mouse flag. If this flag is true, the

  • DriveInterface will ignore mouse down button events (but still recognize

  • mouse up button events); the user will not be able to start the

  • DriveInterface going again if it is stopped, but if the user is currently

  • holding down a mouse button it will not stop immediately until the user

  • eventually releases the button.

*/

setMat()

C++ Interface: set_mat(const DriveInterface self, const LMatrix4f mat)

/**
  • Stores the indicated transform in the DriveInterface.

*/

setP()

C++ Interface: set_p(const DriveInterface self, float p)

setPos()

C++ Interface: set_pos(const DriveInterface self, const LVecBase3f vec) set_pos(const DriveInterface self, float x, float y, float z)

/**
  • Directly sets the driver’s position.

*/

setR()

C++ Interface: set_r(const DriveInterface self, float r)

setReverseSpeed()

C++ Interface: set_reverse_speed(const DriveInterface self, float speed)

/**
  • Sets the speed of full reverse motion, when the mouse is at the very bottom

  • of the window. This is in units (e.g. feet) per second.

*/

setRotateSpeed()

C++ Interface: set_rotate_speed(const DriveInterface self, float speed)

/**
  • Sets the maximum rate at which the user can rotate left or right, when the

  • mouse is at the very edge of the window. This is in degrees per second.

*/

setStopThisFrame()

C++ Interface: set_stop_this_frame(const DriveInterface self, bool stop_this_frame)

/**
  • If stop_this_frame is true, the next time the frame is computed no motion

  • will be allowed, and then the flag is reset to false. This can be used to

  • prevent too much movement when we know a long time has artificially

  • elapsed, for instance when we take a screenshot, without munging the clock

  • for everything else.

*/

setVerticalDeadZone()

C++ Interface: set_vertical_dead_zone(const DriveInterface self, float zone)

/**
  • Sets the size of the horizontal bar in the center of the screen that

  • represents the “dead zone” of vertical motion: the region in which the

  • mouse does not report vertical motion. This is in a fraction of the window

  • height, so 0.5 will set a dead zone as large as half the screen.

*/

setVerticalRampDownTime()

C++ Interface: set_vertical_ramp_down_time(const DriveInterface self, float ramp_down_time)

/**
  • Sets the amount of time, in seconds, it takes between the time an up or

  • down arrow key is released and the time it registers no motion.

*/

setVerticalRampUpTime()

C++ Interface: set_vertical_ramp_up_time(const DriveInterface self, float ramp_up_time)

/**
  • Sets the amount of time, in seconds, it takes between the time an up or

  • down arrow key is pressed and the time it registers full forward or

  • backward motion.

*/

setX()

C++ Interface: set_x(const DriveInterface self, float x)

setY()

C++ Interface: set_y(const DriveInterface self, float y)

setZ()

C++ Interface: set_z(const DriveInterface self, float z)

set_force_mouse()

C++ Interface: set_force_mouse(const DriveInterface self, bool force_mouse)

/**
  • Changes the state of the force_mouse flag. If this flag is true, the mouse

  • button need not be held down in order to drive the avatar around.

*/

set_force_roll()

C++ Interface: set_force_roll(const DriveInterface self, float force_roll)

/**
  • This function is no longer used and does nothing. It will be removed soon.

*/

set_forward_speed()

C++ Interface: set_forward_speed(const DriveInterface self, float speed)

/**
  • Sets the speed of full forward motion, when the mouse is at the very top of

  • the window. This is in units (e.g. feet) per second.

*/

set_h()

C++ Interface: set_h(const DriveInterface self, float h)

set_horizontal_dead_zone()

C++ Interface: set_horizontal_dead_zone(const DriveInterface self, float zone)

/**
  • Sets the size of the vertical bar in the center of the screen that

  • represents the “dead zone” of horizontal motion: the region in which the

  • mouse does not report horizontal motion. This is in a fraction of the

  • window width, so 0.5 will set a dead zone as large as half the screen.

*/

set_horizontal_ramp_down_time()

C++ Interface: set_horizontal_ramp_down_time(const DriveInterface self, float ramp_down_time)

/**
  • Sets the amount of time, in seconds, it takes between the time a left or

  • right arrow key is released and the time it registers no motion.

*/

set_horizontal_ramp_up_time()

C++ Interface: set_horizontal_ramp_up_time(const DriveInterface self, float ramp_up_time)

/**
  • Sets the amount of time, in seconds, it takes between the time a left or

  • right arrow key is pressed and the time it registers full rotation.

*/

set_hpr()

C++ Interface: set_hpr(const DriveInterface self, const LVecBase3f hpr) set_hpr(const DriveInterface self, float h, float p, float r)

/**
  • Directly sets the driver’s orientation.

*/

set_ignore_mouse()

C++ Interface: set_ignore_mouse(const DriveInterface self, bool ignore_mouse)

/**
  • Changes the state of the ignore_mouse flag. If this flag is true, the

  • DriveInterface will ignore mouse down button events (but still recognize

  • mouse up button events); the user will not be able to start the

  • DriveInterface going again if it is stopped, but if the user is currently

  • holding down a mouse button it will not stop immediately until the user

  • eventually releases the button.

*/

set_mat()

C++ Interface: set_mat(const DriveInterface self, const LMatrix4f mat)

/**
  • Stores the indicated transform in the DriveInterface.

*/

set_p()

C++ Interface: set_p(const DriveInterface self, float p)

set_pos()

C++ Interface: set_pos(const DriveInterface self, const LVecBase3f vec) set_pos(const DriveInterface self, float x, float y, float z)

/**
  • Directly sets the driver’s position.

*/

set_r()

C++ Interface: set_r(const DriveInterface self, float r)

set_reverse_speed()

C++ Interface: set_reverse_speed(const DriveInterface self, float speed)

/**
  • Sets the speed of full reverse motion, when the mouse is at the very bottom

  • of the window. This is in units (e.g. feet) per second.

*/

set_rotate_speed()

C++ Interface: set_rotate_speed(const DriveInterface self, float speed)

/**
  • Sets the maximum rate at which the user can rotate left or right, when the

  • mouse is at the very edge of the window. This is in degrees per second.

*/

set_stop_this_frame()

C++ Interface: set_stop_this_frame(const DriveInterface self, bool stop_this_frame)

/**
  • If stop_this_frame is true, the next time the frame is computed no motion

  • will be allowed, and then the flag is reset to false. This can be used to

  • prevent too much movement when we know a long time has artificially

  • elapsed, for instance when we take a screenshot, without munging the clock

  • for everything else.

*/

set_vertical_dead_zone()

C++ Interface: set_vertical_dead_zone(const DriveInterface self, float zone)

/**
  • Sets the size of the horizontal bar in the center of the screen that

  • represents the “dead zone” of vertical motion: the region in which the

  • mouse does not report vertical motion. This is in a fraction of the window

  • height, so 0.5 will set a dead zone as large as half the screen.

*/

set_vertical_ramp_down_time()

C++ Interface: set_vertical_ramp_down_time(const DriveInterface self, float ramp_down_time)

/**
  • Sets the amount of time, in seconds, it takes between the time an up or

  • down arrow key is released and the time it registers no motion.

*/

set_vertical_ramp_up_time()

C++ Interface: set_vertical_ramp_up_time(const DriveInterface self, float ramp_up_time)

/**
  • Sets the amount of time, in seconds, it takes between the time an up or

  • down arrow key is pressed and the time it registers full forward or

  • backward motion.

*/

set_x()

C++ Interface: set_x(const DriveInterface self, float x)

set_y()

C++ Interface: set_y(const DriveInterface self, float y)

set_z()

C++ Interface: set_z(const DriveInterface self, float z)