BulletHingeConstraint¶
from acron.bullet import BulletHingeConstraint
- class BulletHingeConstraint¶
Bases:
Bases:
BulletConstraintThe hinge constraint lets two bodies rotate around a given axis while adhering to specified limits. It’s motor can apply angular force to them.
Inheritance diagram
digraph inheritance1c576b16ce { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "BulletConstraint" [URL="acron.bullet.BulletConstraint.html#acron.bullet.BulletConstraint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "BulletConstraint" [arrowsize=0.75,style=""]; "BulletHingeConstraint" [URL="acron.bullet.BulletHingeConstraint.html#acron.bullet.BulletHingeConstraint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "BulletConstraint" -> "BulletHingeConstraint" [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=""]; "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=""]; "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=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }- __init__()¶
Creates a hinge constraint which connects one rigid body with some fixe dpoint in the world.
Constructs a hinge constraint which connects two rigid bodies.
Creates a hinge constraint in the same way as the other constructor, but uses the world as second body so that node_a is fixed to some point in mid- air for example.
Creates a hinge connecting node_a to node_b. The pivot point is the point at which the body is fixed to the constraint. In other words: It specifies where on each body the rotation axis should be. This axis is specified using axis_a and axis_b. Remember, everything is specified in the bodies own coordinate system!
- enable_angular_motor()¶
Applies an impulse to the constraint so that the angle changes at target_velocity where max_impulse is the maximum impulse that is used for achieving the specified velocity.
Note that the target_velocity is in radians/second, not degrees.
- enable_motor()¶
- property frame_a ConstPointerTo_TransformState¶
- property frame_b ConstPointerTo_TransformState¶
- get_angular_only()¶
- static get_class_type()¶
- get_frame_a()¶
- get_frame_b()¶
- get_hinge_angle()¶
Returns the angle between node_a and node_b in degrees.
- get_lower_limit()¶
Returns the lower angular limit in degrees.
- get_upper_limit()¶
Returns the upper angular limit in degrees.
- set_angular_only()¶
- set_axis()¶
Sets the hinge’s rotation axis in world coordinates.
- set_frames()¶
- set_limit()¶
Sets the lower and upper rotational limits in degrees.
- set_max_motor_impulse()¶
Sets the maximum impulse used to achieve the velocity set in
enable_angular_motor().
- set_motor_target()¶