Align () and setalignment () conjecture in M3G

Source: Internet
Author: User

I recently encountered some problems when I was studying M3G and reading the specifications of align () and setalignment. I also posted a post on various major forums, but I was not interested in it. So I read the API documentation, made full use of my rich imagination, and made a small guess. Of course, I have to share my questions with you first:

1.Setalignment(Node zref, int ztarget, node yref, int ytarget) there are four parameters. We can set zref and yref to different nodes, and neither ztarget nor ytarget is none, then we pass inAlign(Reference) What happens if reference is neither zref nor yref?

2.Setalignment() Clearly sets the relevant information of the two axes alignment (zref and yref are not the same node). Why is there only one parameter in align.

3.Setalignment() Why only set the Z and Y axes to be aligned and the X axis?

My guess is:

1. an exception should occur here. I set the alignment information clearly when setaignment (). The Z axis is related to zref, And the Y axis is related to yref. If align (reference) is input) the reference in is not one of zref and yref, so when align is aligned, we cannot know what axis of our Z axis is aligned with the reference, and the information of the corresponding Y axis is unknown. Therefore, we cannot find alignment information for our node, and we will not be able to align with the reference. Therefore, my conclusion is that reference must be one of zref and yref.

2. In conclusion 1, I encountered the second problem. For the second question, I guess we have set two nodes related to them, and then we can set the only coordinate system of the node. The API specification is very clear about how to calculate (first the Z axis is satisfied, and then the Y axis may be inaccurate ). If our zref and yref coordinate systems do not change, the determined coordinate systems will not change. On the contrary, as long as we change zref and yref, the determined coordinates will also change. Node alignment most applications only need to trace one node, so only one parameter is designed during API design. If you want to track two nodes, you can call align (null ).

3. when we rotate and transform, the three axes have a sequential relationship, first the Z axis, then the Y axis, and finally the X axis, to determine a coordinate system, we only need to know the two axes to determine the third axis (the direction of the third axis, depending on whether you are using the left-hand coordinate system or the right-hand coordinate system), so the X axis can be unnecessary. In my opinion, if you implement your ownSetalignment() You can select two axes from the three axes, as long as you like.

 

Haha, it's finished! The above is just some of my thoughts and guesses when I read the API documentation. I did not use M3G to write a code. Therefore, please help me with any errors.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.