Jump to content

[SOLVED] IG GetInternalType ?


photo

Recommended Posts

Posted

Hello, and happy to new year to all!

For a start, a quick and hpefully simple question: what is the difference (if any) between Unigine::Plugins::IG::Entity::getType() and Unigine::Plugins::IG::Entity::getInternalType()

In my tests, I see no difference between the two (CIGI & DIS tested), but maybe I'm missing something crucial here. Maybe there is a difference at certain time?

Which one should be used when querying ig->getConfig()->getEntityTypes() hashmap?

Thanks!

Posted

Happy New Year!

getType will return the same value witch was installed in setType
getInternalType return real type. it can be different value according to DIS entity substitution rules.
i.e. you have 3dmodel and description only for type 1.2.3.4.0.0.0.0 but you set type 1.2.3.4.5.6.7.8. 
in this case getType will return 1.2.3.4.5.6.7.8 (packed in int64) and getInternalType will return 1.2.3.4.0.0.0.0 - the actual type that was chosen.

 

Posted

Ok, that makes sense. Could you explicitly say that in the doc?

In this case, I guess ig->getConfig()->getEntityTypes() should be queried with InternalType. Am I right?

Posted
Quote

In this case, I guess ig->getConfig()->getEntityTypes() should be queried with InternalType. Am I right?

yes, cause getType may be absent in config.

Quote

Ok, that makes sense. Could you explicitly say that in the doc?

yes, we will add an explanation to the documentation. Thank you for your time

  • silent changed the title to [SOLVED] IG GetInternalType ?
×
×
  • Create New...