SimulationTree.Transforms
0.3.9
Prefix Reserved
dotnet add package SimulationTree.Transforms --version 0.3.9
NuGet\Install-Package SimulationTree.Transforms -Version 0.3.9
<PackageReference Include="SimulationTree.Transforms" Version="0.3.9" />
<PackageVersion Include="SimulationTree.Transforms" Version="0.3.9" />
<PackageReference Include="SimulationTree.Transforms" />
paket add SimulationTree.Transforms --version 0.3.9
#r "nuget: SimulationTree.Transforms, 0.3.9"
#:package SimulationTree.Transforms@0.3.9
#addin nuget:?package=SimulationTree.Transforms&version=0.3.9
#tool nuget:?package=SimulationTree.Transforms&version=0.3.9
Transforms
For representing a hierarchy of objects in 3D space.
Behaviour
Entities with the IsTransform tag will have a LocalToWorld component calculated
using data from these components, relative to the parent:
PositionRotationScaleAnchorPivot
Modifying these components wont update the LocalToWorld component immediately,
requiring a system to do so with a TransformUpdate message.
Axis convention
This is only relevant for rotations when working with them manually:
- X axis is right (pitch)
- Y axis is up (yaw)
- Z axis is forward (roll)
Anchoring to corners
The Anchor component is able to describe both relative and absolute values. The example
below makes the child transform have a 10 pixel border inside the parent:
Transform parent = new(world);
parent.LocalScale = new(100, 100, 0);
parent.LocalPosition = new(50, 50, 0);
Transform child = new(world);
child.Anchor = new(10, 10, 0, 10, 10, 0, Anchor.Relativeness.X | Anchor.Relativeness.Y);
//after simulating, child will be at position (60, 60) with size (80, 80)
Reading world state
Accessing world position, rotation or scale is can be done through properties of a transform entity:
Transform a = ...
Vector3 position = a.WorldPosition;
Quaternion rotation = a.WorldRotation;
Vector3 scale = a.WorldScale;
And optionally, can be accessed directly through components. However, accessing
the world rotation is not possible through the LocalToWorld component and must
be done through WorldRotation:
uint a = ...
LocalToWorld ltw = world.GetComponent<LocalToWorld>(a);
Vector3 position = ltw.Position;
Vector3 scale = ltw.Scale;
Quaternion rotation = world.GetComponent<WorldRotation>(a).value;
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- SimulationTree.Worlds.Core (>= 0.3.9)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on SimulationTree.Transforms:
| Package | Downloads |
|---|---|
|
SimulationTree.Cameras
Package Description |
|
|
SimulationTree.Meshes.NineSliced
Package Description |
|
|
SimulationTree.UI
Package Description |
|
|
SimulationTree.UI.Systems
Package Description |
|
|
SimulationTree.Camera.Systems
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.9 | 311 | 9/24/2025 |