PDA

View Full Version : Markerstate


lc0277
27 Jan 2007, 07:59
It took me some time to figure out what are marker states and how they works since the documentation isn't very explicit on that. The simulation variables "Marker State" is missing in the SDK, but is needed to build appropriate data definitions.

So how it works:

SimConnect_AddToDataDefinition(hSimConnect, DATA_ID, "Marker State", NULL, SIMCONNECT_DATATYPE_MARKERSTATE);
SIMCONNECT_DATA_MARKERSTATE ms;
strncpy(ms.szMarkerName, "Wheel", 64);
ms.dwMarkerState = 1;
SimConnect_SetDataOnSimObject(hSimConnect, DATA_ID, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_DATA_SET_FLAG_DEFAULT, 1, sizeof(SIMCONNECT_DATA_MARKERSTATE), &ms);


And the result:
http://lc0277.nerim.net/screens/marker.jpg

Various model elements are available (wheel, center of gravity, wing tips, engines, etc)

ziporama
27 Jan 2007, 08:49
Very nice investigative work!

Probably the same method used to draw the boxes around objects.

rhysa
30 Jan 2007, 06:39
I wrote an article on this in the wiki (http://www.fsdeveloper.com/wiki/index.php?title=Using_Marker_States) some time ago. I've listed my observations on the limitations of the feature in the article, maybe you could add any you noticed.

lc0277
30 Jan 2007, 07:03
Thanks rhysa ! I didn't notice your article. That would have saved me some brainstorming. :o

rhysa
30 Jan 2007, 19:55
Its a very useful feature for developers. I have written an addon dll that adds a simple menu interface for the marker state functionality.