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

    Angle dif. between a Matrix and a normal?

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 189 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/10/2008 at 09:57, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R11 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      I have a ray kollision between two objekts at an object.
      The ray send object allways looking at the Ray target object.
      And the target object have the same rotation like the start object.
      When I move the objects they are allways parallele.

      Inbetween the objects is the object I want to calculate the surface.
      For this I read the Phong normal.

      now I have the matrix of the ray send object.
      This is the same direction as the ray self have.

      I need the different of the angles.
      How can I calculate ?
      Do you have an code example ?

      In the SDK I found and use long time, to calculate position and rotation for objects. But everytime without normals 😞

      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 11/10/2008 at 05:16, xxxxxxxx wrote:

        You can not calculate a difference angle between a matrix and a vector. You can only calculate the angle between a vector and one of the vector components of a matrix, for instance V1, V2 or V3. Use the dot product to calculate the angle. It returns the cosine of the angle between two vectors.

        Dot Producton Wikipedia

        cheers,
        Matthias

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