Dear VXL Developers,
This is Ming-Ching Chang from Brown University. I have a question about vtol library in 3D. If you are an expert in vtol or you are currently working on it, please let me know your feedback. I appreciate your help.
I am working on vtol/vsol libraries on 3D applications. In a series of meeting with Prof. Joe L. Mundy and other developers in Brown University, we decide to improve the current vtol library to handle 3D applications better. However, we found that the current vtol hierarchy is mainly designed for 2D applications. To extend it to 3D, I need to make big changes. The first problem I have encountered is that the vtol_topology_object is currently inherented from vsol_spatial_object_2d, which is difficult to extend to 3D.
//                            vsol_spatial_object_2d
//                                      |
//                             vtol_topology_object
//                                      |
//             ---------------------------------------------------
//             |        |       |       |       |       |        |
//         vertex  zero_chain  edge  one_chain  face  two_chain  block
//             |                |               |
//        vertex_2d           edge_2d          face_2d
I have the dilemma of making multi-inheritance of 2d/3d classes or duplicate the classes like this (i.e. completely separate the 2D and 3D libraries):
           |            |            |            |        |           |          |
        vertex_2d  zero_chain_2d  edge_2d  one_chain_2d  face_2d  two_chain_2d  block_2d
           |            |            |            |        |           |          |
        vertex_3d  zero_chain_3d  edge_3d  one_chain_3d  face_3d  two_chain_3d  block_3d

Our current plan is to complete separate the 2D and 3D classes, so we can avoid the type casting issue. If I make the vtol_topology_object inherented from both 2d and 3d spatial_object, I will have compiling error on the type casting functions.
The other issue is, let's say the separation is the solution, how to minimize the duplication? In other words, many of the vtol functions are dimension-independent, we should avoid duplication in a nice way. That's why in the original design, vtol_vertex class is separated from vtol_vertex_2d class, I guess. Can I still keep those classes dimension-independent as far as I can?
If you have any idea of how to solve this problem in a nice way, please let me know. I appreciate your help very much.
If you are a developer of vtol, please tell me your opinion about those changes. If you an user of vtol and you don't like those changes, please let me know ASAP. I expect a big change on the code, even with the best plan.
Thank you for your attention.
Ming-Ching Chang
LEMS, Engineering
Brown University