-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
146 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Transform | ||
|
||
Various types of transforms are defined in [math.h](../src/core/math.h): | ||
|
||
* `LocalTransform` - single precision position, quaternion rotation, and uniform scale. | ||
* `LocalRigidTransform` - similar to `LocalTransform`, but without scale. | ||
* `Transform` - double precision position, quaternion rotation, and nonuniform scale. | ||
* `RigidTransform` - similar to `Transform`, but without scale. | ||
|
||
"Local" indicates single precision position, while "Rigid" indicates the absence of scale. | ||
|
||
## Entity transform | ||
|
||
Entities utilize `Transform`. Note that `Transform` is not equivalent to a matrix. Its components are applied in **SRT** order: scale, rotation, position: `pos + rot.rotate(value * scale)`. Consequently, it cannot represent skew. Additionally, the composition of two transforms does not behave like matrix multiplication if the scale is nonuniform. The scale is "lossy", i.e. when composing multiple transforms, "direction" of the original scale is lost. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.