Module sublevel
This API is added by CC: Sable and allows CC: Tweaked computers to access information from Sable Sub-Levels.
This library also includes CC: Advanced Math which provides the quaternion API.
Functions
| isInPlotGrid () | Determines whether the computer is currently on a Sub-Level. |
| getUniqueId () | Gets the Sub-Level's Universally Unique Identifier (UUID). |
| getName () | Gets the Sub-Level's name. |
| setName (newName) | Sets the Sub-level's name. |
| getLogicalPose () | Gets the Sub-Level's logical pose of the Sub-Level. |
| getLastPose () | Gets the Sub-Level's last pose of the Sub-Level. |
| getVelocity () | Gets the Sub-Level's global velocity. |
| getLinearVelocity () | Gets the Sub-Level's latest linear velocity. |
| getAngularVelocity () | Gets the Sub-Level's latest angular velocity. |
| getCenterOfMass () | Gets the Sub-Level's center of mass. |
| getMass () | Gets the Sub-Level's mass. |
| getInverseMass () | Gets the Sub-Level's inverse mass. |
| getInertiaTensor () | Gets the Sub-Level's inertia tensor. |
| getInverseInertiaTensor () | Gets the Sub-Level's inverse inertia tensor. |
Functions
- isInPlotGrid ()
-
Determines whether the computer is currently on a Sub-Level.
Returns:
-
boolean
trueif the computer is on a Sub-Level,falseotherwise - getUniqueId ()
-
Gets the Sub-Level's Universally Unique Identifier (UUID).
Returns:
-
string
The Sub-Level UUID
Raises:
This method errors if there is no Sub-Level associated with the computer. - getName ()
-
Gets the Sub-Level's name.
Returns:
-
string
The Sub-Level name
Raises:
This method errors if there is no Sub-Level associated with the computer. - setName (newName)
-
Sets the Sub-level's name.
Parameters:
- newName string The new name for the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getLogicalPose ()
-
Gets the Sub-Level's logical pose of the Sub-Level.
Returns:
-
table
Pose information including position, orientation, scale, and rotation point
Raises:
This method errors if there is no Sub-Level associated with the computer. - getLastPose ()
-
Gets the Sub-Level's last pose of the Sub-Level.
Returns:
-
table
Pose information including position, orientation, scale, and rotation point
Raises:
This method errors if there is no Sub-Level associated with the computer. - getVelocity ()
-
Gets the Sub-Level's global velocity.
Returns:
-
vector
the global velocity of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getLinearVelocity ()
-
Gets the Sub-Level's latest linear velocity.
Returns:
-
vector
the latest linear velocity of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getAngularVelocity ()
-
Gets the Sub-Level's latest angular velocity.
Returns:
-
vector
the latest angular velocity of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getCenterOfMass ()
-
Gets the Sub-Level's center of mass.
Returns:
-
vector
the center of mass of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getMass ()
-
Gets the Sub-Level's mass.
Returns:
-
number
the mass of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getInverseMass ()
-
Gets the Sub-Level's inverse mass.
Returns:
-
number
the inverse mass of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getInertiaTensor ()
-
Gets the Sub-Level's inertia tensor.
Returns:
-
matrix
the inertia tensor of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer. - getInverseInertiaTensor ()
-
Gets the Sub-Level's inverse inertia tensor.
Returns:
-
matrix
the inverse inertia tensor of the Sub-Level
Raises:
This method errors if there is no Sub-Level associated with the computer.