Beispiel #1
0
 /** Sets the Point to a default, non-empty state. */
 void _setToDefault() {
   resizeAttributes(m_description._getTotalComponents());
   Point.attributeCopy(
       m_description._getDefaultPointAttributes(),
       m_attributes,
       m_description._getTotalComponents());
   m_attributes[0] = NumberUtils.NaN();
   m_attributes[1] = NumberUtils.NaN();
 }
Beispiel #2
0
  @Override
  public void copyTo(Geometry dst) {
    if (dst.getType() != Type.Point) throw new IllegalArgumentException();

    Point pointDst = (Point) dst;
    dst._touch();

    if (m_attributes == null) {
      pointDst.setEmpty();
      pointDst.m_attributes = null;
      pointDst.assignVertexDescription(m_description);
    } else {
      pointDst.assignVertexDescription(m_description);
      pointDst.resizeAttributes(m_description._getTotalComponents());
      attributeCopy(m_attributes, pointDst.m_attributes, m_description._getTotalComponents());
    }
  }