Announcement

Collapse
No announcement yet.

SoQtExaminerViewer Feedback (Axis Cross)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • artmansoft
    replied
    Thanks Mike!

    Leave a comment:


  • mikeheck
    replied
    Simple axes geometry

    Originally posted by artmansoft View Post
    How can I create an axis cross similar to the axis cross of SoQtExaminerViewer (when we set feedback visibility to true) so that it rotates with a SoTransform instead of the camera?
    Here is some simple geometry, similar to the rotation axes displayed by the ExaminerViewer:
    Code:
    char *gnomonGeometry = "\
    #Inventor V2.1 ascii\n\
    \
    DEF GnomonGeom Separator { \
      PickStyle { style UNPICKABLE } \
      DrawStyle { style FILLED } \
      LightModel { model PHONG } \
      MaterialBinding { value OVERALL } \
      Complexity { value .2 } \
      ShapeHints { vertexOrdering COUNTERCLOCKWISE shapeType SOLID } \
      Font { name \"Arial : Bold\" size 15 } \
      Separator { \
        Material { \
          diffuseColor    [ 0.5 0 0 ] \
          emissiveColor   [ 0.5 0 0 ] \
        } \
        RotationXYZ { axis Z angle -1.570796327 } \
        Cylinder { height 2 radius .06 } \
        Translation { translation 0 1 0 } \
        Cone { bottomRadius .18 height .3 } \
        Translation { translation 0 .16 0 } \
        Text2 { string \"X\" } \
      } \
      Separator { \
        Material { \
          diffuseColor    [ 0 0.5 0 ] \
          emissiveColor   [ 0 0.5 0 ] \
        } \
        Cylinder { height 2 radius .06 } \
        Translation { translation 0 1 0 } \
        Cone { bottomRadius .18 height .3 } \
        Translation { translation 0 .16 0 } \
        Text2 { string \"Y\" } \
      } \
      Material { \
        diffuseColor    [ 0 0 0.5 ] \
        emissiveColor   [ 0 0 0.5 ] \
      } \
      RotationXYZ { axis X angle 1.570796327 } \
      Cylinder { height 2 radius .06 } \
      Translation { translation 0 1 0 } \
      Cone { bottomRadius .18 height .3 } \
      Translation { translation 0 .16 0 } \
      Text2 { string \"Z\" } \
    } ";
    This is from the "gnomon" example in the Resources section of the forum (click here).

    -Mike

    Leave a comment:


  • artmansoft
    replied
    Dear Damien,

    Where should I place the SoTransform before the axis while the axis cross is a built-in node in the viewer?

    Could you give me a sample code demonstrating the solution?

    Thanks,
    artmansoft

    Leave a comment:


  • ddallaro
    replied
    Originally posted by artmansoft View Post
    How can I create an axis cross similar to the axis cross of SoQtExaminerViewer (when we set feedback visibility to true) so that it rotates with a SoTransform instead of the camera?

    Thanks,
    artmansoft
    Hi,

    In order to remove the camera transformation in the scene graph just add a separator with an SoResetTransform node (which will remove the transformation from the camera and all the previous transforms). Then add a SoTransform node in order to control the axis then your axis scene graph.

    As mentioned in the documentation be careful with the SoResetTransform node which reset the bounding box in the current part of the scene graph and be aware that you won't be able to do picking on your axes.

    Regards,
    Damien

    Leave a comment:


  • artmansoft
    started a topic SoQtExaminerViewer Feedback (Axis Cross)

    SoQtExaminerViewer Feedback (Axis Cross)

    How can I create an axis cross similar to the axis cross of SoQtExaminerViewer (when we set feedback visibility to true) so that it rotates with a SoTransform instead of the camera?

    Thanks,
    artmansoft
Working...
X