Problem writting char data
Hello guys, Can someone help me?
I am developping a COLLADA 1.5 exporter to OpenRAVE (Robot simulator) and I have some troubles to achieve this. The problem is that I wish to write down some sensor features and I want to use the setCharData method of the daeElement class to store this info.But I don't know how to activate the char data. I have seen that there is a hasCharData method that indicates that the object has char data. In my case It is always false. Here there is a sample of the source that I am writting:
domInstance_sensorRef element = daeSafeCast<domInstance_sensor>(domInstance_sensor ::create(*_collada.get()));
for (size_t i = 0; i < sensor->getContents().getCount(); i++)
RAVELOG_DEBUGA("Has Char Data\n");
RAVELOG_DEBUGA("Doesn't have Char Data\n");
RAVELOG_WARNA("Content %d Type ID %d Name %s:%s\n",
It always appears the message "Doesn't have Char Data\n" because the char data it is not allowed.
Any help good be wellcome...
Solved: Problem writting char data
I have found the solution to the problem with write parameters that are not part of the COLLADA specification. I write down the solution for help someone that will have the same problem.
// Gets the meta element of the parent tag that will contain the parameter
// sensor is the tag that represents a robot sensor
daeMetaElement* meta = sensor->getMeta();
// Allows to insert a parameter not present in the COLLADA specifications
// Adds sensor param to the COLLADA document
// 'param_name' is a const char* variable that contains the name of the param
// 'str_param_value' is a std::string variable that contains the value of the param
I hope that this may be useful to someone