Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Pose, AffineTransform, RigidTransform... What???

Discussion in 'Scripting' started by RamType0, Aug 27, 2021.

  1. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    UnityEngine.Pose, UnityEngine.Animations.Rigging.AffineTransform, Unity.Mathematics.RigidTransform...
    Why are there 3 RigidTransform types are OFFICIALY provided???
    Why do we have PackageManager?
    Don't duplicate that, please...
     
    goncalo-vasconcelos likes this.
  2. orionsyndrome

    orionsyndrome

    Joined:
    May 4, 2014
    Posts:
    3,070
    You are crossing three different domains....
    Each of them having their own extensive and self-contained libraries.

    Pose is XR and has to do with the global transform of the device.
    Animations.Rigging is well, intended for animating rigs.
    Mathematics is a separate library as well.

    All of them are named in relation to their domain, and relatively consistently in their own namespace.
    I don't see where's the problem.

    P.S. They are not exact duplicates of each other.
     
  3. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    You are right as long as each struct is specialized for each purpose, but they are not.


    https://docs.unity3d.com/ScriptReference/Pose.html

    No XR related operations.(And really few general purpose operations)

    https://docs.unity3d.com/Packages/c...ngine.Animations.Rigging.AffineTransform.html

    No rigging related operations.(And some awesome general purpose operations)

    https://docs.unity3d.com/Packages/c...0.0/api/Unity.Mathematics.RigidTransform.html

    Ah, yeah, mathematics related operations;)
     
  4. orionsyndrome

    orionsyndrome

    Joined:
    May 4, 2014
    Posts:
    3,070
    I'm not sure what you're alluding to.
    As I said
    "This structure is used primarily in XR applications to describe the current "pose" of a device in 3D space."

    "UnityEngine.Animations.Rigging / AffineTransform"

    "Namespace: Unity.Mathematics"

    If you expected to see a dependency hell instead, then I'm sorry, but you don't know enough about the modern software or the ashes of the 90's it had to overcome. This is perfectly normal, and not just normal, it is perfectly acceptable and preferable for each particular domain to be self-contained and self-consistent. We don't have issues with limited memory any more, and modern APIs are more of a social construct, a paradigm, and a technological solution, than a technical fetish or some sort of an academic ideal.

    You know what? I have ray plane intersection in 4 different libraries, and I intend to redistribute some of my own math libraries into other libraries to tone down the stupid dependencies that have arisen in the meantime. For what? For keeping three numbers in a union or for providing basic modular arithmetic. Pfft

    That's exactly the same primitive service rigid transforms offer. It's merely a platter, but who cares when the actual product is hamburger with some fries and soda?
     
  5. orionsyndrome

    orionsyndrome

    Joined:
    May 4, 2014
    Posts:
    3,070
  6. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    So do you say that Unity thought that using package dependency makes dependency hell?
    Although Unity himself made UPM and they added dependency system to it and all of these packages are provided by Unity himself?