- Joined
- Apr 24, 2008
- Messages
- 15
- Reaction score
- 0
- Points
- 0
I'm trying to wrap my head around how the meshes and such are handled.
Lets say I have a VC mesh to start from, this mesh is just the basic mesh everything will be built upon. Now I have some switches that I'd like to add a visual representation of. They all look the same, but they're in different places. I would like to use oapiLoadMeshGlobal to load the mesh file only once. Then I'd like to AddMesh these switches at their different places. The problem I'm stumbling on is how I go about manipulating these different instances so they are oriented correctly.
I believe I'll need to use clbkVisualCreated and clbkVisualDestroyed, but I'm not exactly sure how those are getting called and how I should use them.
Right now I'm trying to understand how the vessels meshids, VISHANDLE, and MESHHANDLES are related.
When clbkVisualCreated is called, should I store off the VISHANDLE, and when clbkVisualDestroyed is called, should I clear this variable? Then as long as VISHANDLE exists, I can do my manipulations elsewhere?
Also is clbkLoadVC called before or after the VC visual has been created?
The reason for this question is I want to know if I can add the Meshes while I'm registering all the click areas in clbkLoadVC, or if I have to wait until after its been initialized.
Lets say I have a VC mesh to start from, this mesh is just the basic mesh everything will be built upon. Now I have some switches that I'd like to add a visual representation of. They all look the same, but they're in different places. I would like to use oapiLoadMeshGlobal to load the mesh file only once. Then I'd like to AddMesh these switches at their different places. The problem I'm stumbling on is how I go about manipulating these different instances so they are oriented correctly.
I believe I'll need to use clbkVisualCreated and clbkVisualDestroyed, but I'm not exactly sure how those are getting called and how I should use them.
Right now I'm trying to understand how the vessels meshids, VISHANDLE, and MESHHANDLES are related.
When clbkVisualCreated is called, should I store off the VISHANDLE, and when clbkVisualDestroyed is called, should I clear this variable? Then as long as VISHANDLE exists, I can do my manipulations elsewhere?
Also is clbkLoadVC called before or after the VC visual has been created?
The reason for this question is I want to know if I can add the Meshes while I'm registering all the click areas in clbkLoadVC, or if I have to wait until after its been initialized.