Inode in 3DS MAX SDK

Source: Internet
Author: User

Reprinted: http://www.winu.cn/thread-78384-1-1.html

The inode transformation matrix of the Max SDK and some common knowledge about the object Publisher: tomore released on:

 

Inode is an important part in the max SDK. Almost all things need to be accessed through inode: mesh camera and so on. next I will briefly introduce various inode-related TM. (transformation matrix ). it only indicates my understanding of the Max SDK recently. hope you can advise me. beginner's discussion. first, we will introduce node and object (mesh triobject ). the scene in Max is composed of inode, which contains many things. this node may be deform or not deform. For example, common editable mesh and cylinder types can be deform nodes, while camera cannot deform. The ry in a node (which can be converted to geomobject) that contains a geometric object is not the node itself. but the object in node. this object may be a derived object (indicating that this object is derived from other objects, usually derived from the result of the last modifier (modifier ). in addition, some modefier values are appended. Each modifer's Modification result is a deried object. the modifier similar to pyhsique applies to the derived object. therefore, to find a node with a pyhsique modifier, you need to get it through derived object. inode-> getobjectref () can get the object of this object. object-> superclassid () = gen_derived_class_id indicates that this object is a derived obje Ct. derivedobject-> getobjectref () to get this derived object is derived from that object .. use the above three functions. you can traverse a node from creation to formation of this node, all the derived objects that have passed through. if you want to obtain the final object state (objectstate. it contains the object of node ). you only need to call inode-> evalworldstate. Below. I will introduce several tm that are confusing in node. inode-> getnodetm ().: nodetm () only contains the TM of node. it is not the TM of an object. each node has a benchmark point ). the state of this vertex in the coordinates of the world is the TM of this node. objects attached to the node may have other transformations (such as flat and rotation) relative to the vertex point ). so. nodetm cannot be used to convert objects. inode-> getparenttm (). TM of the parent node. we have said that nodetm is in the coordinates of the world. Therefore, to obtain the TM of the node relative to the parent node, getnodetm () * inverse (getparenttm () is required ()). inode-> getobjecttm (). with this matrix, you can transform the objects in node to the world space. actually, getobjecttm () = nodetm () * (Object transformation relative to node ). inode-> getobjtmbeforewsm (): WSM means World Space modifer. there are two modifer types: object space. One is World Space. as the name implies: The World Space modifier must first transform the object to the world space. it is not in the object space. Therefore, if an object (object on node) is affected by World Space modifier. Then it has been transformed into the world coordinate system. Getobjecttm returns a matrix of units (otherwise, two world transformations are performed). But what should we do if we want to transform the object to a matrix of the World Space ?, The only method is getobjtmbeforewsm (). it returns a getobjecttm equivalent to the absence of WSM. inode-> getobjtmafterwsm (): I did not really think of the purpose of this TM. hope you can advise me. the above is my workshop. see the two sections of the node and object offset transformations geometry Pipeline System in the max SDK.

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.