Physical¶
-
class Physical¶
Bases:
TypedReferenceCountDefines a set of physically modeled attributes. If you want physics applied to your class, derive it from this.
Inheritance diagram
digraph inheritancec5d2c4b980 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Physical" [URL="acron.physics.Physical.html#acron.physics.Physical",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "Physical" [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=""]; "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=""]; }- Physical.__init__()¶
Default Constructor The idea here is that most physicals will NOT be collections of sets (i.e. particle systems and whatever else). Because of this, the default constructor, unless otherwise specified, will automatically allocate and initialize one PhysicalObject. This makes it easier for high-level work.
pre-alloc is ONLY for multiple-object physicals, and if true, fills the physics_object vector with dead nodes, pre-allocating for the speed end of the speed-vs-overhead deal.
copy constructor (note- does deep copy of pn’s) but does NOT attach itself to its template’s physicsmanager.
- Physical.add_angular_force()¶
Adds an angular force to the force list
- Physical.add_linear_force()¶
Adds a linear force to the force list
- Physical.add_physics_object()¶
Adds an object to the physics object vector
- Physical.clear_angular_forces()¶
Erases the angular force list
- Physical.clear_linear_forces()¶
Erases the linear force list
- Physical.clear_physics_objects()¶
Erases the object list
- Physical.get_angular_force()¶
- static Physical.get_class_type()¶
- Physical.get_linear_force()¶
- Physical.get_num_angular_forces()¶
- Physical.get_num_linear_forces()¶
- Physical.get_objects()¶
- Physical.get_phys_body()¶
- Physical.get_physical_node()¶
- Physical.get_physical_node_path()¶
- Physical.get_physics_manager()¶
helpers
- Physical.get_viscosity()¶
Get the local viscosity.
- Physical.output()¶
Write a string representation of this instance to <out>.
- Physical.remove_angular_force()¶
removes an angular force from the force list
- Physical.remove_linear_force()¶
removes a linear force from the force list
- Physical.set_viscosity()¶
Set the local viscosity.
- Physical.write()¶
Write a string representation of this instance to <out>.
- Physical.write_angular_forces()¶
Write a string representation of this instance to <out>.
- Physical.write_linear_forces()¶
Write a string representation of this instance to <out>.
- Physical.write_physics_objects()¶
Write a string representation of this instance to <out>.