A rigid body (like a chunk of connected blocks) during simulation.
More...
|
Cluster | Cluster |
| The cluster this chunk belongs to, or null if no cluster destruction manager present or the chunk doesn't exist. Get the SimBody from a Block if possible for good performance here. More...
|
|
bool | Static => Block.BlockEngine.GetBlockInfo<MassEntityStruct>(this).isStatic |
| Whether the body can be moved or static. More...
|
|
|
static T | GetInstance< T > (EGID egid, Func< EGID, T > constructor, Type type=null) |
| Returns a cached instance if there's an actively used instance of the object already. Objects still get garbage collected and then they will be removed from the cache. More...
|
|
static WeakDictionary< EGID, EcsObjectBase > | GetInstances (Type type) |
|
A rigid body (like a chunk of connected blocks) during simulation.
◆ SimBody() [1/3]
TechbloxModdingAPI.SimBody.SimBody |
( |
EGID |
id | ) |
|
|
inline |
◆ SimBody() [2/3]
TechbloxModdingAPI.SimBody.SimBody |
( |
uint |
id | ) |
|
|
inline |
◆ SimBody() [3/3]
TechbloxModdingAPI.SimBody.SimBody |
( |
uint |
id, |
|
|
uint |
clusterID |
|
) |
| |
|
inlinepackage |
◆ Equals() [1/3]
bool TechbloxModdingAPI.SimBody.Equals |
( |
EGID |
other | ) |
|
|
inline |
◆ Equals() [2/3]
override bool TechbloxModdingAPI.SimBody.Equals |
( |
object |
obj | ) |
|
|
inline |
◆ Equals() [3/3]
bool TechbloxModdingAPI.SimBody.Equals |
( |
SimBody |
other | ) |
|
|
inline |
◆ GetBlocks()
Block [] TechbloxModdingAPI.SimBody.GetBlocks |
( |
| ) |
|
|
inline |
The blocks that form this rigid body.
- Returns
◆ GetConnectedBodies()
SimBody [] TechbloxModdingAPI.SimBody.GetConnectedBodies |
( |
| ) |
|
|
inline |
The rigid bodies connected to this one via functional joints (broken ones don't count).
◆ GetHashCode()
override int TechbloxModdingAPI.SimBody.GetHashCode |
( |
| ) |
|
|
inline |
◆ GetInstance< T >()
static T TechbloxModdingAPI.EcsObjectBase.GetInstance< T > |
( |
EGID |
egid, |
|
|
Func< EGID, T > |
constructor, |
|
|
Type |
type = null |
|
) |
| |
|
inlinestaticpackageinherited |
Returns a cached instance if there's an actively used instance of the object already. Objects still get garbage collected and then they will be removed from the cache.
- Parameters
-
egid | The EGID of the entity |
constructor | The constructor to construct the object |
- Template Parameters
-
- Returns
◆ GetInstances()
|
inlinestaticpackageinherited |
◆ ToString()
override string TechbloxModdingAPI.SimBody.ToString |
( |
| ) |
|
|
inline |
◆ Cluster
Cluster TechbloxModdingAPI.SimBody.Cluster |
Initial value:=> cluster # clusterId == uint.MaxValue
? Block.BlockEngine.GetCluster(
Id.entityID)
: GetInstance(new EGID(clusterId, CommonExclusiveGroups.SIMULATION_CLUSTERS_GROUP),
The cluster this chunk belongs to, or null if no cluster destruction manager present or the chunk doesn't exist. Get the SimBody from a Block if possible for good performance here.
◆ InitData
◆ Static
bool TechbloxModdingAPI.SimBody.Static => Block.BlockEngine.GetBlockInfo<MassEntityStruct>(this).isStatic |
Whether the body can be moved or static.
◆ AngularVelocity
float3 TechbloxModdingAPI.SimBody.AngularVelocity |
|
getset |
◆ CenterOfMass
float3 TechbloxModdingAPI.SimBody.CenterOfMass |
|
get |
◆ CurrentHealth
float TechbloxModdingAPI.SimBody.CurrentHealth |
|
getset |
◆ HealthMultiplier
float TechbloxModdingAPI.SimBody.HealthMultiplier |
|
getset |
◆ Id
EGID TechbloxModdingAPI.EcsObjectBase.Id |
|
getinherited |
◆ InitialHealth
float TechbloxModdingAPI.SimBody.InitialHealth |
|
getset |
◆ Mass
float TechbloxModdingAPI.SimBody.Mass |
|
get |
◆ Position
float3 TechbloxModdingAPI.SimBody.Position |
|
getset |
The position of this body. When setting the position, update the position of the connected bodies as well, otherwise unexpected forces may arise.
◆ Rotation
float3 TechbloxModdingAPI.SimBody.Rotation |
|
getset |
◆ Velocity
float3 TechbloxModdingAPI.SimBody.Velocity |
|
getset |
◆ Volume
float TechbloxModdingAPI.SimBody.Volume |
|
get |
The documentation for this class was generated from the following file: