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

    PointInRange details please

    Cinema 4D SDK
    r20 c++
    2
    3
    372
    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.
    • C4DSC
      C4DS
      last edited by C4DS

      Hi
      About the PointInRange the documentation mentions:

      Checks if the screen point (x,y) is within a hit range of the world point p,
      i.e. if the screen point is close to the world points projection on the screen.
      

      It does not provide details about what the actual "range" represents. Nor does it indicate if (and how) this range can be controlled/adjusted.

      Is the current LiveSelection radius value used for this "range", something else, internally defined, ... ?
      Thanks in advance for the details.

      Edit:
      Allright, I can already confirm it is not the LiveSelection's radius ...

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        hi,

        seem to be hardcoded to SELECT_RANGE

        	Vector p = WS(po);
        	p.z = 0.0;
        	p.x -= (Float)x;
        	p.y -= (Float)y;
        	return p.GetSquaredLength() <= SELECT_RANGE * SELECT_RANGE;
        
        #define SELECT_RANGE   10 	// Range Radius
        

        But as you can see, this is pretty easy to create your own function, there's nothing fancy

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        C4DSC 1 Reply Last reply Reply Quote 0
        • C4DSC
          C4DS @Manuel
          last edited by

          @m_magalhaes said in PointInRange details please:

          But as you can see, this is pretty easy to create your own function, there's nothing fancy

          True, and I did.
          I just wanted to bring this up, as the documentation was rather ambiguous.

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