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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    WorldToScreen and BaseDraw::Line2D

    SDK Help
    0
    2
    222
    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 11/02/2004 at 04:04, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.206 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,
      In the viewport I would like to draw a line from one vector to another vector.
      At first I used the BaseDraw::Line3D, but the thickness of the line is not stong enough and makes it hard to see over existing lines in the C4D viewport.
      So I have decided to write up my own line drawing routine, and use the Handle2D or Polygon3D method to plot the line points.
      The problem is I don't know how to convert a vector from world space onto the screen space. I thought using the supplied function BaseDraw::WS() would be it, but I get unexpected results from that.
      What I want to do is, get two points from an object. Convert those vectors into a suitable screen space, then use a 2D line drawing algorithm to draw a line from the two converted vectors. This is so I can highlight an edge of a polygon.

      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 11/02/2004 at 04:09, xxxxxxxx wrote:

        *sigh*
        Please ignore this post, I made a typo and was using BaseDraw::SW() and not BaseDraw::WS()
        It works now

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