Space Engineers
|
Public Member Functions | |
MyGridSkeleton () | |
void | Reset () |
void | CopyTo (MyGridSkeleton target, Vector3I fromGridPosition, Vector3I toGridPosition) |
Copies part of skeleton to other skeleton, both positions are inclusive More... | |
void | CopyTo (MyGridSkeleton target, MatrixI transformationMatrix, MyCubeGrid targetGrid) |
void | FixBone (Vector3I gridPosition, Vector3I boneOffset, float gridSize, float minBoneDist=0.05f) |
Fixes bone in way that it won't be further than neighbour bones. This helps fix invalid triangles during rendering. More... | |
void | Serialize (List< BoneInfo > result, float boneRange, MyCubeGrid grid) |
void | Deserialize (List< BoneInfo > data, float boneRange, float gridSize, bool clear=false) |
void | SerializePart (Vector3I minBone, Vector3I maxBone, float boneRange, List< byte > result) |
void | DeserializePart (Vector3I minBone, Vector3I maxBone, float boneRange, List< byte > data) |
Vector3 | GetBone (Vector3I cubePos, Vector3I bonePos) |
void | GetBone (ref Vector3I pos, out Vector3 bone) |
bool | TryGetBone (ref Vector3I pos, out Vector3 bone) |
void | SetBone (ref Vector3I pos, ref Vector3 bone) |
void | SetOrClearBone (ref Vector3I pos, ref Vector3 bone) |
bool | ClearBone (ref Vector3I pos) |
Returns true when bone was really removed More... | |
bool | MultiplyBone (ref Vector3I pos, float factor, ref Vector3I cubePos, MyCubeGrid cubeGrid, float epsilon=0.005f) |
Returns true when bone was changed. When new bone offset length is smaller than epsilon, it will remove bone. Factor is used as t paramter in a lerp. This is because the default position for a bone may not be 0 More... | |
bool | IsDeformed (Vector3I cube, float ignoredDeformation, MyCubeGrid cubeGrid, bool checkBlockDefinition) |
float | MaxDeformation (Vector3I cube, MyCubeGrid cubeGrid) |
void | Wrap (ref Vector3I cube, ref Vector3I boneOffset) |
Bone offset is normally between 0 and BoneDensity (including) This function takes any other values and transforms it into cube and proper bone offset More... | |
void | GetAffectedCubes (Vector3I cube, Vector3I boneOffset, List< Vector3I > resultList, MyCubeGrid grid) |
Gets all cubes which are affected by bone. More... | |
void | GetCubeBox (Vector3I cubePos, out Vector3 lowerBone, out Vector3 upperBone, float?clampTo) |
void | MarkCubeRemoved (ref Vector3I pos) |
void | RemoveUnusedBones (MyCubeGrid grid) |
Vector3 | GetDefinitionOffsetWithNeighbours (Vector3I cubePos, Vector3I bonePos, MyCubeGrid grid) |
Static Public Member Functions | |
static float | GetMaxBoneError (float gridSize) |
Public Attributes | |
readonly Dictionary< Vector3I, Vector3 > | Bones = new Dictionary<Vector3I, Vector3>() |
const int | BoneDensity = 2 |
Density multiplier More... | |
readonly Vector3I[] | BoneOffsets |
Properties | |
Vector3 | this[Vector3I pos] [get, set] |
Definition at line 15 of file MyGridSkeleton.cs.
|
inline |
Definition at line 49 of file MyGridSkeleton.cs.
|
inline |
Returns true when bone was really removed
Definition at line 342 of file MyGridSkeleton.cs.
|
inline |
Copies part of skeleton to other skeleton, both positions are inclusive
Definition at line 71 of file MyGridSkeleton.cs.
|
inline |
Definition at line 98 of file MyGridSkeleton.cs.
|
inline |
Definition at line 242 of file MyGridSkeleton.cs.
|
inline |
Definition at line 276 of file MyGridSkeleton.cs.
|
inline |
Fixes bone in way that it won't be further than neighbour bones. This helps fix invalid triangles during rendering.
Definition at line 148 of file MyGridSkeleton.cs.
|
inline |
Gets all cubes which are affected by bone.
onlyExisting | Returns only cubes which were added to skeleton. |
Definition at line 489 of file MyGridSkeleton.cs.
Definition at line 303 of file MyGridSkeleton.cs.
Definition at line 313 of file MyGridSkeleton.cs.
|
inline |
Definition at line 511 of file MyGridSkeleton.cs.
|
inline |
Definition at line 628 of file MyGridSkeleton.cs.
|
inlinestatic |
Definition at line 44 of file MyGridSkeleton.cs.
|
inline |
Definition at line 407 of file MyGridSkeleton.cs.
|
inline |
Definition at line 529 of file MyGridSkeleton.cs.
|
inline |
Definition at line 442 of file MyGridSkeleton.cs.
|
inline |
Returns true when bone was changed. When new bone offset length is smaller than epsilon, it will remove bone. Factor is used as t paramter in a lerp. This is because the default position for a bone may not be 0
Definition at line 353 of file MyGridSkeleton.cs.
|
inline |
Definition at line 534 of file MyGridSkeleton.cs.
|
inline |
Definition at line 63 of file MyGridSkeleton.cs.
|
inline |
Definition at line 184 of file MyGridSkeleton.cs.
|
inline |
Definition at line 258 of file MyGridSkeleton.cs.
Definition at line 326 of file MyGridSkeleton.cs.
|
inline |
Definition at line 331 of file MyGridSkeleton.cs.
Definition at line 321 of file MyGridSkeleton.cs.
|
inline |
Bone offset is normally between 0 and BoneDensity (including) This function takes any other values and transforms it into cube and proper bone offset
Definition at line 478 of file MyGridSkeleton.cs.
const int Sandbox.Game.Entities.MyGridSkeleton.BoneDensity = 2 |
Density multiplier
Definition at line 36 of file MyGridSkeleton.cs.
readonly Vector3I [] Sandbox.Game.Entities.MyGridSkeleton.BoneOffsets |
Definition at line 38 of file MyGridSkeleton.cs.
readonly Dictionary<Vector3I, Vector3> Sandbox.Game.Entities.MyGridSkeleton.Bones = new Dictionary<Vector3I, Vector3>() |
Definition at line 17 of file MyGridSkeleton.cs.
Definition at line 382 of file MyGridSkeleton.cs.