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
    • Login

    ViewportSelect::GetNearestEdge() ?

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 568 Views
    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 Offline
      Helper
      last edited by

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

      On 04/03/2009 at 12:27, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R9.1+ 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Howdy,

      It seems that ViewportSelect::GetNearestEdge() only selects the nearest edge, even though there may be two edges within the given tool radius. I've tried checking the ViewportPixel's next parameter (vp->next) but it's always NULL;

      If one of the end points of the nearest edge is within the tool's radius, I can use the Neighbor class to find the edges that share that point, but how can I get all of the edges within the radius if none of the edges' endpoints are within that radius?

      Adios,
      Cactus Dan

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

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

        On 16/03/2009 at 07:19, xxxxxxxx wrote:

        Howdy,

        Any word on this?

        I can easily calculate the distance to all edges of the polygon, but this doesn't work in isoline editing mode.

        Is there another way to get the edges that are within the tools radius, that will also support isoline editing mode?

        Adios,
        Cactus Dan

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

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

          On 17/03/2009 at 04:54, xxxxxxxx wrote:

          Try

          ViewportPixel* GetPixelInfoPoint(LONG x, LONG y);
          ViewportPixel* GetPixelInfoPolygon(LONG x, LONG y);
          ViewportPixel* GetPixelInfoEdge(LONG x, LONG y);

          You can iterate over all pixels in the selection area and call these. Its quite fast so it shouldn't be the bottleneck, if your are worried about that.

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

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

            On 17/03/2009 at 06:50, xxxxxxxx wrote:

            Howdy,

            Hmmmm, I hadn't thought of that. Thanks Michael. ;o)

            Adios,
            Cactus Dan

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

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

              On 17/03/2009 at 07:50, xxxxxxxx wrote:

              Howdy,

              Well, that works good when the brush radius is 10, but when the radius is 50 it starts to get sluggish.

              Any other ideas on how to improve the performance when the brush radius is bigger?

              Adios,
              Cactus Dan

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

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

                On 17/03/2009 at 10:08, xxxxxxxx wrote:

                Howdy,

                Ah, OK. I've figured out something that works faster. Using the PointLineDistance() function I calculate a vector to the closest point of the neighboring edge, and then only sample the pixels along that vector (from 0 to tool radius). ;o)

                Adios,
                Cactus Dan

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

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

                  On 18/03/2009 at 10:50, xxxxxxxx wrote:

                  Howdy,

                  Well, the performance still isn't as good as I'd like to see. :o(

                  If the view is zoomed out so that the tool's brush radius encompasses more polygons than just the neighboring ones to the polygon under the mouse, some of them don't get selected. :o(

                  Any insights into how the live selection tool in Cinema 4D handles it?

                  Adios,
                  Cactus Dan

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