Zoom invariant / Position Invariant entity

Was this article helpful?
2 out of 2 found this helpful

Comments

6 comments
Date Votes
  • Hi Matteo,

    I tried your zoom invariant code, commenting out the position invariant code. What I want to achieve is something like the CoordinateSystemIcon to represent a local system of reference. It should be invariant to zooming operations, but should move in respect to the camera.

    I used your example code with the arrow positioned in (1, 0, 0). In the following to images you can see that the zooming moved the arrow in respect to the X axis.

     

    Zoom in

     

     

    This is the code used to create the entity:

    public void MyFunc(devDept.Eyeshot.Model m) {
       m.Viewports[0].Camera = new ZoomInvariantMesh.MyCamera(m.Viewports[0].Camera);
       Mesh arrow = Mesh.CreateArrow(0.2, 0.4, 0.4, 0.8, 16, Mesh.natureType.Smooth);
       arrow.ColorMethod = colorMethodType.byEntity;
       arrow.Color = Color.Blue;
       arrow.Rotate(Math.PI / 2, devDept.Geometry.Vector3D.AxisZ);
       arrow.Translate(new devDept.Geometry.Vector3D(0, 0, 0));
       ZoomInvariantMesh aArrow = new ZoomInvariantMesh(arrow);
       aArrow.m = m;

       aArrow.Translate(1, 0, 0);
       m.Entities.Add(aArrow);
    }

    Thanks,
    Stenio

    0
  • Hi Stenio,

    In Eyeshot 2020, you can add as many CoordinateSystemIcons you need and with different positions/orientations. Please check the Part1 sample.

    Alberto

    0
  • How to make the entity static too? i.e. entity doesn't rotate when the scene does.

    0
  • You probably need to override the DrawOverlay() method instead.

    0
  • Thank you.

    0
  • How can we make a Label object location invariant

    0

Please sign in to leave a comment.

Articles in this section

See more