What does GeMarker do?
-
On 05/12/2013 at 08:21, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform:
Language(s) : C++ ;---------
Hi,
I'm trying to figure out just what the heck the GeMarker class does.
The results I'm getting aren't making any sense to me.Example:
In this test. I create two of the same objects(two cubes, two spheres, etc..).
Then run the code below to compare their markersBaseObject *obj = doc->GetFirstObject(); if(!obj) return FALSE; BaseObject *next = obj->GetNext(); if(!obj) return FALSE; const GeMarker &objM = obj->GetMarker(); const GeMarker &nextM = next->GetMarker(); //Check if the markers have content in them Bool objEmpty = objM.Content(); Bool nextEmpty = nextM.Content(); //Check if the two markers are equal Bool eql = objM.IsEqual(nextM); GePrint("obj&next Markers Equal? = " + LongToString(eql)); //Compare the two markers(works like memcmp) LONG comp = objM.Compare(nextM); GePrint("Compare the obj&next Markers = " + LongToString(comp));
The result of this code is that no two objects are ever "equal". Which I think I understand.
But the results of the Compare() function are sometimes true, and sometimes false!?
What is it about certain objects that makes them return different true or false results like that?//None of these are "equal" //However...When using the Compare() function on them. Some are true and some are false! Why? //Cylinder compare = true //Disc compare = true //Plane compare = true //polygon compare = true //Oil Tank compare = true //Cone compare = false //Cube compare = false //Capsule compare = false //Figure compare = false //Landscape compare = false //Platonic compare = false //Pyramid compare = false //Relief compare = false //Sphere compare = false //Torus compare = false //Tube compare = false
To make two objects return true using IsEqual() function.
The only way I can do it is by creating a brand new marker. Then setting it to the same marker value of another object.//Create a new empty marker from scratch AutoAlloc<GeMarker> myMarker; //Make the new marker the same as the objM marker myMarker->Set(objM); Bool eql2 = objM.IsEqual(myMarker); LONG comp2 = objM.Compare(nextM); GePrint("New Marker Equal to obj Marker? = " + LongToString(eql2)); GePrint("New Marker Compare = " + LongToString(comp2));
Is there any way to make two objects have the same marker value without creating a new one from scratch?
Why do I even care about these markers?
What purpose do they serve in the grand scheme of things?-ScottA