BulletSim/ScriptFunctions
From OpenSimulator
Misterblue (Talk | contribs) (add axis code description) |
Misterblue (Talk | contribs) (add PHYS_PARAM_USE_LINEAR_FRAMEA, rest of AXIS constants) |
||
Line 82: | Line 82: | ||
|- | |- | ||
|PHYS_PARAM_TRANSMOTOR_MAXVEL | |PHYS_PARAM_TRANSMOTOR_MAXVEL | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |PHYS_PARAM_USE_LINEAR_FRAMEA | ||
| | | | ||
| | | | ||
Line 120: | Line 124: | ||
{| class="wikitable" | {| class="wikitable" | ||
! axisCode | ! axisCode | ||
+ | ! constant | ||
! meaning | ! meaning | ||
|- | |- | ||
|0 | |0 | ||
+ | |PHYS_AXIS_LINEAR_X | ||
|X linear axis | |X linear axis | ||
|- | |- | ||
|1 | |1 | ||
+ | |PHYS_AXIS_LINEAR_Y | ||
|Y linear axis | |Y linear axis | ||
|- | |- | ||
|2 | |2 | ||
+ | |PHYS_AXIS_LINEAR_Z | ||
|Z linear axis | |Z linear axis | ||
|- | |- | ||
|3 | |3 | ||
+ | |PHYS_AXIS_ANGULAR_X | ||
|X angular axis | |X angular axis | ||
|- | |- | ||
|4 | |4 | ||
+ | |PHYS_AXIS_ANGULAR_Y | ||
|Y angular axis | |Y angular axis | ||
|- | |- | ||
|5 | |5 | ||
+ | |PHYS_AXIS_ANGULAR_Z | ||
|Z angular axis | |Z angular axis | ||
|- | |- | ||
− | | | + | | -1 |
+ | |PHYS_AXIS_ALL | ||
|(-1) make changes to all axis | |(-1) make changes to all axis | ||
+ | |- | ||
+ | | -2 | ||
+ | |PHYS_AXIS_LINEAR_ALL | ||
+ | |all linear axis (X, Y, Z) | ||
+ | |- | ||
+ | | -3 | ||
+ | |PHYS_AXIS_ANGULAR_ALL | ||
+ | |all angular axis (X, Y, Z) | ||
|- | |- | ||
|} | |} |
Revision as of 07:28, 27 August 2013
OpenSimulator => BulletSim => Script Functions
BulletSim Script Functions
Contents |
Physics engines have an extension interface enabling extended functions. BulletSim adds script functions which call the extension interface and add control of physics parameters and new functionality.
This feature requires the mod_invoke feature to be enabled on the region the script is running on.
Information
string physGetEngineType()
string physGetPhysicsParameter(string parameterName)
void physSetPhysicsParameter(string parameterName, string value)
Physics Parameters
PHYS_LINKSET_TYPE_CONSTRAINT = 0
PHYS_LINKSET_TYPE_COMPOUND = 1
PHYS_LINKSET_TYPE_MANUAL = 2
void physSetLinksetType(integer linksetTypeCode)
void physSetCenterOfMass(vector centerOfMassDisplacement)
Extended Linksets
void physChangeLinkParams(integer linkNum, list parms)
Flag | Description | Usage |
---|---|---|
PHYS_PARAM_LINK_TYPE | ||
PHYS_PARAM_FRAMEINA_LOC | ||
PHYS_PARAM_FRAMEINA_ROT | ||
PHYS_PARAM_FRAMEINB_LOC | ||
PHYS_PARAM_FRAMEINA_ROT | ||
PHYS_PARAM_LINEAR_LIMIT_LOW | ||
PHYS_PARAM_LINEAR_LIMIT_HIGH | ||
PHYS_PARAM_ANGULAR_LIMIT_LOW | ||
PHYS_PARAM_ANGULAR_LIMIT_HIGH | ||
PHYS_PARAM_USE_FRAME_OFFSET | ||
PHYS_PARAM_ENABLE_TRANSMOTOR | ||
PHYS_PARAM_TRANSMOTOR_MAXVEL | ||
PHYS_PARAM_USE_LINEAR_FRAMEA | ||
PHYS_PARAM_TRANSMOTOR_MAXFORCE | ||
PHYS_PARAM_CFM | ||
PHYS_PARAM_ERP | ||
PHYS_PARAM_SOLVER_ITERATIONS | ||
PHYS_PARAM_SPRING_AXIS_ENABLE | [PHYS_PARAM_SPRING_AXIS_ENABLE, int axisCode, bool flag] | |
PHYS_PARAM_SPRING_DAMPING | [PHYS_PARAM_SPRING_DAMPING, int axisCode, float damping] | |
PHYS_PARAM_SPRING_STIFFNESS | [PHYS_PARAM_SPRING_STIFFNESS, int axisCode, float stiffness] |
Axis Specification
Some of the parameters specify a constraint axis. The axis values mean:
axisCode | constant | meaning |
---|---|---|
0 | PHYS_AXIS_LINEAR_X | X linear axis |
1 | PHYS_AXIS_LINEAR_Y | Y linear axis |
2 | PHYS_AXIS_LINEAR_Z | Z linear axis |
3 | PHYS_AXIS_ANGULAR_X | X angular axis |
4 | PHYS_AXIS_ANGULAR_Y | Y angular axis |
5 | PHYS_AXIS_ANGULAR_Z | Z angular axis |
-1 | PHYS_AXIS_ALL | (-1) make changes to all axis |
-2 | PHYS_AXIS_LINEAR_ALL | all linear axis (X, Y, Z) |
-3 | PHYS_AXIS_ANGULAR_ALL | all angular axis (X, Y, Z) |