Personal tools
You are here: Home cmgui Wiki Reordering elements by xi
Views
Using Cmgui >>

Reordering elements by xi

last edited 2 years ago by blackett

In cmgui you can reorder nodes and elements by any field, such as the x coordinate gfx change_identifier element_offset 1 sort_by coordinates.x.

If you want to use your xi directions to reorder then use computed fields to build up a new ordering from an xi_texture_coordinate field. Unfortunately you cannot use this to reorder your nodes, just your elements. To do this you start with a seed element from which the xi_texture_coordinates will spread out. This example is for 2D elements so there are 2 components. The weights in the second field are to ensure that xi2 varies faster than xi1 (There are 8 elements in the xi2 direction). :

  gfx define field renumber_1 xi_texture_coordinates seed_element 5;
  gfx define field renumber sum_components field renumber_1 weights 8 1;
  gfx change_id element_offset 1 sort_by renumber

Contributing to this site

Please add to the wiki any relevant information that you think might be useful to other users of this website. For example, you might like to contribute your experiences, questions and answers.

You are encouraged to contribute to this site regardless of your level of experience. Contributions are welcomed from new and regular visitors.

If you ask a question and receive an answer from a developer you should record it in the wiki. This information is extremely useful and can help other users overcome the same problem.

See how to add and edit pages for more information.