GetPointR, RealToString
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2012 at 02:31, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : C++ ;---------
hiI don't know what my problem is
obj is Ocube.
const Vector *padr= ToPoint(obj)->GetPointR();
GePrint(RealToString(padr[0].x)); <--- crash pointthen, Crash....
what is problem? ..
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2012 at 03:53, xxxxxxxx wrote:
Hi,
obj should be PointObject and not BaseObject !
Use IsInstanceOf() to test this. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2012 at 04:04, xxxxxxxx wrote:
Exactly. A little addition:
To get your hands on the resulting point object, use the cache (obj->GetCache()). And if cache is NULL for some reason, try the modeling command MCOMMAND_CURRENTSTATETOOBJECT. In both cases, the result will be a point object (presumed, of course, that obj is a generator that creates point objects).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2012 at 06:06, xxxxxxxx wrote:
An even smaller addition:
Always check allocations and anything that returns a pointer for NULL as an error condition. It can let you know (if you use GePrint()) that something isn't doing what you expect without crashing.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2012 at 12:59, xxxxxxxx wrote:
Thank you very much, all
GetCache is useful for me.