Editing User:Clouddrift/GSoC2014/Midterm
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 26: | Line 26: | ||
In general, it's a classical representation for NMG structure. But they are redundant in BRL-CAD. There have been similar concepts here called '''combination''' which can hold several primitives as a whole. So some reorganization is necessary that these two structs ('''model''' and '''nmgregion''') are replaced by the BRL-CAD inner '''combination''' to fit new NMG philosophy. | In general, it's a classical representation for NMG structure. But they are redundant in BRL-CAD. There have been similar concepts here called '''combination''' which can hold several primitives as a whole. So some reorganization is necessary that these two structs ('''model''' and '''nmgregion''') are replaced by the BRL-CAD inner '''combination''' to fit new NMG philosophy. | ||
− | To achieve this target | + | To achieve this target. we should move some important members from '''model''' and '''nmgregion''' to new '''shell''' to keep existing function, then take the new '''shell''' as the top level of new NMG structure. Details as following: |
− | * '''char *manifolds''': Describe the meaning of a | + | * '''char *manifolds''': Describe the meaning of a nmg structure. |
− | * '''long maxindex''': Record the element(nmg structure of various levels) count of a | + | * '''long maxindex''': Record the element(nmg structure of various levels) count of a nmg structure. It is important in MAKE and IMPORT/EXPORT part such as deciding how big memory should be allocated. |
Then, let's check the definition of old '''shell''': | Then, let's check the definition of old '''shell''': | ||
Line 46: | Line 46: | ||
</pre> | </pre> | ||
− | Obviously, some members should be changed to | + | Obviously, some members should be changed to fix new nmg philosophy: |
* '''struct nmgregion *r_p''': Can be removed since there is no '''nmgregion''' concept any more. | * '''struct nmgregion *r_p''': Can be removed since there is no '''nmgregion''' concept any more. | ||
* '''struct bu_list l''': We don't need this backward point which points to '''shell''' 'superior level structure. But a new member '''uint32_t magic''' is still necessary. | * '''struct bu_list l''': We don't need this backward point which points to '''shell''' 'superior level structure. But a new member '''uint32_t magic''' is still necessary. | ||
Line 66: | Line 66: | ||
</pre> | </pre> | ||
− | == | + | == Fix Debugs == |
− | + | Due to the change of core NMG data structure, thousands of compiling errors are coming. I spend most time in these weeks to fix and test them properly. | |
− | + | 28 functions in raytrace.h are removed because they are no longer necessary. The detailed list is as following: | |
* struct model *'''nmg_mmr'''(void); | * struct model *'''nmg_mmr'''(void); | ||
Line 100: | Line 100: | ||
* void '''nmg_visit_region'''(struct nmgregion *r, const struct nmg_visit_handlers *htab, genptr_t state); | * void '''nmg_visit_region'''(struct nmgregion *r, const struct nmg_visit_handlers *htab, genptr_t state); | ||
* void '''nmg_visit_model'''(struct model *model, const struct nmg_visit_handlers *htab, genptr_t state); | * void '''nmg_visit_model'''(struct model *model, const struct nmg_visit_handlers *htab, genptr_t state); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Conclusion == | == Conclusion == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− |