Interface Text

All Superinterfaces:
VisualizationItem<Text>

public interface Text extends VisualizationItem<Text>
Visualization item for visualizing text.
Since:
9.10.2
  • Method Summary

    Modifier and Type
    Method
    Description
    static Text
    create​(ARGBColor color, Vector3d normal, Vector3d up, Vector3d location, double horizontalScaling, double verticalScaling, String text, float size)
    Creates a text visualization without any affine transformation (identity transformation).
    Returns a point indicating the center position of this text.
    double
    Returns the horizontal scale factor of the displayed text.
    Returns a vector indicating where this text faces.
    float
    Returns the font size to visualize.
    Returns text to visualize.
    Returns a vector indicating the 'up' direction of this text's 2D content.
    double
    Returns the vertical scale factor of the displayed text.

    Methods inherited from interface com.solibri.smc.api.visualization.VisualizationItem

    getColor, withColor
  • Method Details

    • create

      static Text create(ARGBColor color, Vector3d normal, Vector3d up, Vector3d location, double horizontalScaling, double verticalScaling, String text, float size)
      Creates a text visualization without any affine transformation (identity transformation).
      Parameters:
      color - color of the displayed text with transparency
      normal - a vector indicating where the text faces in 3D space
      up - a vector whose orthogonal-to-normal (orthogonal to the facing direction given by normal) component indicates the 'up' direction of the text
      location - the center of the text in 3D space
      horizontalScaling - non-negative horizontal scaling to adjust the horizontal size of the text
      verticalScaling - non-negative vertical scaling to adjust the vertical size of the text
      text - the text to be displayed
      size - the font size of the displayed text
      Returns:
      a text visualization item. The text's positioning when displayed in 3D view is given by normal, up, location.
      Throws:
      IllegalArgumentException - if the horizontal or vertical scaling factors is negative
      Since:
      9.10.2
    • getText

      String getText()
      Returns text to visualize.
      Returns:
      the text
      Since:
      9.10.2
    • getSize

      float getSize()
      Returns the font size to visualize.
      Returns:
      the font size
      Since:
      9.10.2
    • getHorizontalScale

      double getHorizontalScale()
      Returns the horizontal scale factor of the displayed text. If this factor is 1.0, the horizontal size of the text is the horizontal original size. If the factor is 2.0, the horizontal size is twice the original horizontal size.
      Returns:
      the horizontal scale factor of the displayed text, indicating the ratio of this size and the original horizontal size
      Since:
      9.10.2
    • getVerticalScale

      double getVerticalScale()
      Returns the vertical scale factor of the displayed text. If this factor is 1.0, the vertical size of the text is the original vertical size. If the factor is 2.0, the vertical size is twice the original vertical size.
      Returns:
      the vertical scale factor of the displayed text, indicating the ratio of this size and the original vertical size
      Since:
      9.10.2
    • getNormal

      Vector3d getNormal()
      Returns a vector indicating where this text faces. Example: A text is placed on the xy-plane and faces up, towards the positive z-direction. Its normal is (0, 0, 1). This vector is orthogonal to getUp() if they are both non-zero vectors.
      Returns:
      a unit vector indicating where this text faces or a zero vector
      Since:
      9.12.0
    • getUp

      Vector3d getUp()
      Returns a vector indicating the 'up' direction of this text's 2D content. For example, a letter "T" lying in the xy-plane, facing up towards the positive z-direction with its bottom side parallel to the x-axis, has the y-axis as its 'up' direction. Its 'up' vector is then (0, 1, 0). This vector is orthogonal to getNormal() if they are both non-zero vectors.
      Returns:
      a unit vector indicating the 'up' direction of this text's 2D content or a zero vector
      Since:
      9.12.0
    • getCenter

      Vector3d getCenter()
      Returns a point indicating the center position of this text.
      Returns:
      a point indicating the position of this text in 3D space
      Since:
      9.12.0