Class Draw


public class Draw extends MeshCollection
  • Field Details

    • PT_COORD

      private static final int PT_COORD
      See Also:
    • PT_IDENTIFIER

      private static final int PT_IDENTIFIER
      See Also:
    • PT_BITSET

      private static final int PT_BITSET
      See Also:
    • PT_MODEL_INDEX

      private static final int PT_MODEL_INDEX
      See Also:
    • PT_MODEL_BASED_POINTS

      private static final int PT_MODEL_BASED_POINTS
      See Also:
    • dmeshes

      DrawMesh[] dmeshes
    • thisMesh

      private DrawMesh thisMesh
    • ptList

      private javajs.util.P3[] ptList
    • offset

      private javajs.util.V3 offset
    • nPoints

      private int nPoints
    • diameter

      private int diameter
    • width

      private float width
    • newScale

      private float newScale
    • length

      private float length
    • isCurve

      private boolean isCurve
    • isArc

      private boolean isArc
    • isArrow

      private boolean isArrow
    • isLine

      private boolean isLine
    • isVector

      private boolean isVector
    • isCircle

      private boolean isCircle
    • isPerpendicular

      private boolean isPerpendicular
    • isCylinder

      private boolean isCylinder
    • isVertices

      private boolean isVertices
    • isPlane

      private boolean isPlane
    • isReversed

      private boolean isReversed
    • isRotated45

      private boolean isRotated45
    • isCrossed

      private boolean isCrossed
    • isValid

      private boolean isValid
    • noHead

      private boolean noHead
    • isBarb

      private boolean isBarb
    • indicatedModelIndex

      private int indicatedModelIndex
    • modelInfo

      private int[] modelInfo
    • makePoints

      private boolean makePoints
    • plane

      private javajs.util.P4 plane
    • bsAllModels

      private javajs.util.BS bsAllModels
    • polygon

      private javajs.util.Lst<Object> polygon
    • vData

      private javajs.util.Lst<Object[]> vData
    • intersectID

      private String intersectID
    • lineData

      private javajs.util.Lst<javajs.util.P3[]> lineData
    • defaultFontId0

      public int defaultFontId0
    • defaultFontId

      public int defaultFontId
    • thisFontID

      private int thisFontID
    • titleColor

      private Integer titleColor
    • slabData

      MeshSurface slabData
    • vAB

      private final javajs.util.V3 vAB
    • MAX_OBJECT_CLICK_DISTANCE_SQUARED

      private static final int MAX_OBJECT_CLICK_DISTANCE_SQUARED
      See Also:
    • ptXY

      private final javajs.util.P3i ptXY
    • defaultFontSize

      private float defaultFontSize
  • Constructor Details

    • Draw

      public Draw()
  • Method Details

    • allocMesh

      public void allocMesh(String thisID, Mesh m)
      Overrides:
      allocMesh in class MeshCollection
    • setPropertySuper

      private void setPropertySuper(String propertyName, Object value, javajs.util.BS bs)
    • initShape

      public void initShape()
      Overrides:
      initShape in class MeshCollection
    • setProperty

      public void setProperty(String propertyName, Object value, javajs.util.BS bs)
      Specified by:
      setProperty in class Shape
    • deleteModels

      private void deleteModels(int modelIndex)
    • deleteMeshElement

      private void deleteMeshElement(int i)
    • initDraw

      private void initDraw()
    • getPropertyData

      public boolean getPropertyData(String property, Object[] data)
      Overrides:
      getPropertyData in class Shape
      Parameters:
      property -
      data -
      Returns:
      true if serviced
    • getProperty

      public Object getProperty(String property, int index)
      Overrides:
      getProperty in class Shape
      Parameters:
      property -
      index -
      Returns:
      true if serviced
    • getSpinCenter

      private javajs.util.T3 getSpinCenter(String axisID, int vertexIndex, int modelIndex)
    • getSpinAxis

      private javajs.util.V3 getSpinAxis(String axisID, int modelIndex)
    • setDrawing

      private boolean setDrawing(int[] connections)
    • clean

      protected void clean()
      Overrides:
      clean in class MeshCollection
    • addPoints

      private void addPoints(int type, Object value)
    • addPoint

      private void addPoint(javajs.util.T3 newPt, int iModel)
    • setPoints

      private boolean setPoints(int iModel, int n)
    • setPolygon

      private void setPolygon(int nPoly)
    • scale

      private void scale(Mesh mesh, float newScale)
    • setAxes

      private static final void setAxes(DrawMesh m)
    • setModelVisibilityFlags

      public void setModelVisibilityFlags(javajs.util.BS bsModels)
      Overrides:
      setModelVisibilityFlags in class MeshCollection
      Parameters:
      bsModels -
    • checkObjectClicked

      public Map<String,Object> checkObjectClicked(int x, int y, int action, javajs.util.BS bsVisible, boolean drawPicking)
      Overrides:
      checkObjectClicked in class Shape
      Parameters:
      x -
      y -
      action -
      bsVisible -
      drawPicking - TODO
      Returns:
      Hashtable containing information about pt clicked
    • checkObjectHovered

      public boolean checkObjectHovered(int x, int y, javajs.util.BS bsVisible)
      Overrides:
      checkObjectHovered in class Shape
      Parameters:
      x -
      y -
      bsVisible -
      Returns:
      T/F
    • checkObjectDragged

      public boolean checkObjectDragged(int prevX, int prevY, int x, int y, int dragAction, javajs.util.BS bsVisible)
      Overrides:
      checkObjectDragged in class Shape
      Parameters:
      prevX -
      prevY -
      x -
      y -
      dragAction -
      bsVisible -
      Returns:
      T/F
    • move2D

      private void move2D(DrawMesh mesh, int[] vertexes, int iVertex, int x, int y, boolean moveAll)
    • findPickedObject

      private boolean findPickedObject(int x, int y, boolean isPicking, javajs.util.BS bsVisible)
      Parameters:
      x -
      y -
      isPicking - IGNORED
      bsVisible -
      Returns:
      true if found
    • getCommand

      private String getCommand(Mesh mesh)
    • getCommand2

      private String getCommand2(Mesh mesh, int iModel)
    • isPolygonDisplayable

      public static boolean isPolygonDisplayable(Mesh mesh, int i)
    • getVertexList

      private static String getVertexList(DrawMesh mesh, int iModel, int nVertices)
    • getShapeDetail

      public Object getShapeDetail()
      Overrides:
      getShapeDetail in class Shape
    • getShapeState

      public String getShapeState()
      Specified by:
      getShapeState in class Shape
    • randomPoint

      public static javajs.util.P3 randomPoint()