Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Converting Object Types

    SDK Help
    0
    3
    239
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 22/10/2005 at 22:19, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.503 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Ok, this may be a very basic question,
      but I am writing an expression tag and am trying to pass the BaseObject "op" to a function that asks for a PointObject. After checking that "op" is actually a PointObject with IsInstanceOf(), how can I convince the compiler too that it is not just a BaseObject? Is some sort of convertion required?

      Thanks in advance.

      Aaron

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 23/10/2005 at 06:41, xxxxxxxx wrote:

        you need a type cast:

        static_cast<PointObject*>(op);

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 23/10/2005 at 20:50, xxxxxxxx wrote:

          Ah! Brilliant.   Thankyou Katachi.
          I new there must be an easy way to do this. After a little searching and reading I now know all about type casts, well maybe not quite.
          I've now decided to create and store a second object that is a PointObject replica of the actual BaseObject regardless of its specific type. I'm using the SendModellingCommand() function with CURRENTSTATETOOBJECT. This is going to require me to learn something about allocation, which is new since I'm comming from COFFEE. If anybody has any suggestions or a better way to get a PointObject out of a primitive, please let me know.

          Thanks Again.

          Aaron M

          1 Reply Last reply Reply Quote 0
          • First post
            Last post