Trackball¶
from acron.core import Trackball
- class Trackball¶
Bases:
Bases:
MouseInterfaceNodeTrackball acts like Performer in trackball mode. It can either spin around a piece of geometry directly, or it can spin around a camera with the inverse transform to make it appear that the whole world is spinning.
The Trackball object actually just places a transform in the data graph; parent a
Transform2SGnode under it to actually transform objects (or cameras) in the world.Inheritance diagram
digraph inheritancea2dda571f5 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "AcronNode" [URL="acron.core.AcronNode.html#acron.core.AcronNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "AcronNode" [arrowsize=0.75,style=""]; "Namable" -> "AcronNode" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "DataNode" [URL="acron.core.DataNode.html#acron.core.DataNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "AcronNode" -> "DataNode" [arrowsize=0.75,style=""]; "MouseInterfaceNode" [URL="acron.core.MouseInterfaceNode.html#acron.core.MouseInterfaceNode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DataNode" -> "MouseInterfaceNode" [arrowsize=0.75,style=""]; "Namable" [URL="acron.core.Namable.html#acron.core.Namable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Namable" [arrowsize=0.75,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "Trackball" [URL="acron.core.Trackball.html#acron.core.Trackball",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "MouseInterfaceNode" -> "Trackball" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }-
enum ControlMode¶
-
enumerator CM_default = 0¶
-
enumerator CM_truck = 1¶
Normally mouse 1
-
enumerator CM_pan = 2¶
Normally mouse 2
-
enumerator CM_dolly = 3¶
Normally mouse 3
-
enumerator CM_roll = 4¶
Normally mouse 2 + 3
-
enumerator CM_default = 0¶
- __init__()¶
- static get_class_type()¶
- get_control_mode()¶
Returns the control mode. See
set_control_mode().
- get_coordinate_system()¶
Returns the coordinate system of the Trackball. See
set_coordinate_system().
- get_forward_scale()¶
Returns the scale factor applied to forward and backward motion. See
set_forward_scale().
- get_h()¶
- get_hpr()¶
Return the trackball’s orientation.
- get_invert()¶
Returns the invert flag. When this is set, the inverse matrix is generated, suitable for joining to a camera, instead of parenting the scene under it.
- get_mat()¶
Returns the matrix represented by the trackball rotation.
- get_origin()¶
Returns the current center of rotation.
- get_p()¶
- get_pos()¶
Return the offset from the center of rotation.
- get_r()¶
- get_rel_to()¶
Returns the
NodePaththat all trackball manipulations are relative to, or the empty path.
- get_trans_mat()¶
Returns the actual transform that will be applied to the scene graph. This is the same as
get_mat(), unless invert is in effect.
- get_x()¶
- get_y()¶
- get_z()¶
- move_origin()¶
Moves the center of rotation by the given amount.
- reset()¶
Reinitializes all transforms to identity.
- reset_origin_here()¶
Reposition the center of rotation to coincide with the current translation offset. Future rotations will be about the current origin.
- set_control_mode()¶
Sets the control mode. Normally this is CM_default, which means each mouse button serves its normal function. When it is CM_truck, CM_pan, CM_dolly, or CM_roll, all of the mouse buttons serve the indicated function instead of their normal function. This can be used in conjunction with some external way of changing modes.
- set_coordinate_system()¶
Sets the coordinate system of the Trackball. Normally, this is the default coordinate system. This changes the axes the Trackball manipulates so that the user interface remains consistent across different coordinate systems.
- set_forward_scale()¶
Changes the scale factor applied to forward and backward motion. The larger this number, the faster the model will move in response to dollying in and out.
- set_h()¶
- set_hpr()¶
Directly set the mover’s orientation.
- set_invert()¶
Sets the invert flag. When this is set, the inverse matrix is generated, suitable for joining to a camera, instead of parenting the scene under it.
- set_mat()¶
Stores the indicated transform in the trackball. This is a transform in global space, regardless of the rel_to node.
- set_origin()¶
Directly sets the center of rotation.
- set_p()¶
- set_pos()¶
Directly set the offset from the rotational origin.
- set_r()¶
- set_rel_to()¶
Sets the
NodePaththat all trackball manipulations are to be assumed to be relative to. For instance, set your camera node here to make the trackball motion camera relative. The default is the empty path, which means trackball motion is in global space.
- set_x()¶
- set_y()¶
- set_z()¶
-
enum ControlMode¶