Request GePrint(more_datatypes!)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/08/2005 at 06:30, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform:
Language(s) : C++ ;---------
Dear the lovely people at Maxon.Please, please include some more datatypes to be used with GePrint!
As you know, GePrint(), only supports the String datatype.
It would be useful if you could include the ability to print more datatypes as standard. I find it annoying having to include my own GePrint routines for every project I start work on.
For Example
String VectorToString(Vector v) { return "[" + RealToString(v.x) + "," + RealToString(v.y) + "," + RealToString(v.z) + "]"; } String MatrixToString(Matrix m) { String res; res = "OFF: " + VectorToString(m.off) + GeGetLineEnd() + "V1:" + VectorToString(m.v1) + GeGetLineEnd() + "V2:" + VectorToString(m.v2) + GeGetLineEnd() + "V3:" + VectorToString(m.v3) + GeGetLineEnd(); return res; } void GePrint(Matrix m) { GePrint(MatrixToString(m)); } void GePrint(Vector v) { GePrint(VectorToString(v)); }
Thanks
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/08/2005 at 09:46, xxxxxxxx wrote:
Hey, I have those too (nearly identical)!
I use a static class called Support (.cpp and .h) to include helper functions like these which is included with my projects. In my case, it's more like Support::GePrint(), so it's not automatic polymorphism, but that doesn't bother me as long as I can print.