Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Maxon Developers Forum
    2. dex
    3. Posts
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 4
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: How to find the closest primitive in a mesh

      Thank you Ferdinand.
      I have everything working now. The #include <> brackets was just a copy paste thing from the docs. I just had to add the path as you pointed out "maxon/distancequery.h".
      One last question about the behavior of
      float distance = distanceQuery.GetClosestMeshPrimitive(p, info).

      Suppose the user have scaled the polygon mesh using the scale values under the attributes/coordinates. How will this be reflected as a result of the returned distance (assuming the point in the point mesh is first converted to global coordinates and then to local coordinates in the polygon node) like your example above? I see an issue here in my tests where the distance returned is unaffected by the scaling. Either I have done something wrong or the distanceQuery is done on the non "deformed/scaled" mesh.

      The point generator in this case is not transformed or deformed in any way.

      torus.png torus_scaled.png scale.pngscale.png

      posted in Cinema 4D SDK
      dexD
      dex
    • How to find the closest primitive in a mesh

      I was very happy to find this nice example. Thanks Ferdinand!
      However looking at the docs and If I have understood this correctly, I should be able to include <distancequery.h> to get access to the DistanceQueryInterface.
      My problem is that the <distancequery.h> source file is not found.
      All common frameworks are available to my build system.
      Any help or hint on what to look for would be much appreciated. I'm sure I have overlooked something trivial. 😃

      set(maxon_targetFrameworkDependencies
      asset.framework
      cinema.framework
      cinema_hybrid.framework
      crypt.framework
      core.framework
      corenodes.framework
      command.framework
      image.framework
      math.framework
      misc.framework
      mesh_misc.framework
      python.framework
      )

      posted in Cinema 4D SDK
      dexD
      dex
    • RE: C++ SDK Matrix object style distribution

      Thank you so much Ferdinand!
      I have a way forward now for my plugin using the EffectorData ModifyPoints() method.

      Kind regards
      Fredrik

      posted in Cinema 4D SDK
      dexD
      dex
    • C++ SDK Matrix object style distribution

      Hello!
      This is my first post here. See my bio for background.
      I have been studying the SDK docs the last two weeks and I'm taking my first steps trying to build plugins for Cinema4D. So I have a question and I'm looking for directions...

      Does C++ SDK allows you to create some sort of a custom Matrix Object style distribution?
      What I want to achieve is a generator/distribution that output point data that can be read by a cloner.
      It is important that the points encode position, orientation and size or scale and that the cloner can read that data and apply it to instances. Is this doable with the C++ SDK?
      If I have understood the SDK correctly, a point object can only encode position and possibly normals and that won't fulfill the requirements in my case.

      Any hint or help pointing me in the right direction would be much appreciated.

      Thanks in advance!
      /Fredrik

      posted in Cinema 4D SDK 2026 c++
      dexD
      dex