Menu

Proper operation of line drawing by Cadencerprogress when TGLHeightField is used

Help
Mostafa
2021-06-01
2021-06-03
  • Mostafa

    Mostafa - 2021-06-01

    Hi,
    I used TGLHeightField to display objects on the Scene. I want to draw a line on Scene by TGLCadencer but Not displayed correctly. I use the following code :

    procedure TForm1.cadProgress(Sender: TObject; const deltaTime, newTime: Double);
    var
        v: TVector;
        p: TPoint;
    begin
      if select <> nil then
        if (select <> nil) and (pick <> nil) and (select <> pick) then
          wire.Nodes[1].AsVector := pick.AbsolutePosition
        else begin
          p := screentoclient( mouse.CursorPos );
          GLSceneViewer1.Buffer.ScreenVectorIntersectWithPlaneXZ(vectormake( p.x, clientheight - p.y, 0), 0, v);
          wire.Nodes[1].AsVector := v;
          end;
    
    end;
    

    What is the solution to this problem?

     
  • M.a.

    M.a. - 2021-06-03

    Hi,
    Like some users such as Mostafa, I have trouble using functions when changing axes. For example, when the Z-axis is placed vertically.
    How can functions such as "ScreenVectorIntersectWithPlaneXZ" or "rotatearound" be used when the Z axis is set vertically or the "up" property is set to (0,0,1)? Are there alternative functions or is a way to use them correctly?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.