com.supermap.data

类 Point3Ds



  • public class Point3Ds
    extends Object
    用于表示精度为 double 的三维点对象集合。

    此类管理三维线对象或三维线对象的子对象上的所有节点。由于三维线对象或三维线对象的子对象都是有向的,所以其三维点集合对象为有序的三维点的集合。

    • 构造器概要

      构造器 
      构造器和说明
      Point3Ds()
      构造一个新的 Point3Ds 对象。
      Point3Ds(Point3D[] points)
      根据指定的参数来构造一个 Point3Ds 的新对象。
      Point3Ds(Point3Ds points)
      根据给定的 Point3Ds 对象构造一个与其完全相同的新对象。
    • 方法概要

      所有方法 实例方法 具体方法 
      限定符和类型 方法和说明
      int add(Point3D pt)
      向集合中添加三维点对象,添加成功返回被添加对象的序号。
      int addRange(Point3D[] points)
      向集合中添加三维点对象(以数组的形式),返回成功添加的三维点对象的个数。
      void clear()
      清空集合中的三维点集合对象。
      Point3Ds clone()
      返回当前 Point3Ds 对象的一个拷贝。
      int getCount()
      返回三维点对象集合中对象的个数。
      Point3D getItem(int index)
      返回集合中指定索引的三维点对象。
      boolean insert(int index, Point3D pt)
      向集合中的指定序号处添加三维点对象,成功返回 true。
      int insertRange(int index, Point3D[] points)
      将指定的多个点对象添加到此点集合中,从指定的序号开始依次添加。
      boolean remove(int index)
      在集合中删除指定序号的三维点对象,成功返回 true。
      int removeRange(int index, int count)
      将此三维点集合对象中从指定序号开始的指定个数的多个三维点对象删除。
      void setItem(int index, Point3D point3D)
      设置集合中指定索引的三维点对象。
      Point3D[] toArray()
      将三维点集合对象转换为三维点对象数组。
      Point2Ds toPoint2Ds()
      将三维点集合对象转换为二维点集合对象,转换过程中每个三维点的 Z 值都将丢失。
    • 构造器详细资料

      • Point3Ds

        public Point3Ds()
        构造一个新的 Point3Ds 对象。
      • Point3Ds

        public Point3Ds(Point3Ds points)
        根据给定的 Point3Ds 对象构造一个与其完全相同的新对象。
        参数:
        points - 给定的 Point3Ds 对象。
      • Point3Ds

        public Point3Ds(Point3D[] points)
        根据指定的参数来构造一个 Point3Ds 的新对象。
        参数:
        points - 指定的三维点对象数组。
    • 方法详细资料

      • clone

        public Point3Ds clone()
        返回当前 Point3Ds 对象的一个拷贝。
        覆盖:
        clone 在类中 Object
        返回:
        通过克隆操作得到的 Point3Ds 对象。
      • getCount

        public int getCount()
        返回三维点对象集合中对象的个数。
        返回:
        三维点对象集合中对象的个数。
        默认值:
        默认值为 0。
      • getItem

        public Point3D getItem(int index)
        返回集合中指定索引的三维点对象。
        参数:
        index - 指定的索引。
        返回:
        集合中指定索引的三维点对象。
      • setItem

        public void setItem(int index,
                            Point3D point3D)
        设置集合中指定索引的三维点对象。
        参数:
        index - 指定的索引。
        point3D - 集合中指定索引的三维点对象。
      • add

        public int add(Point3D pt)
        向集合中添加三维点对象,添加成功返回被添加对象的序号。
        参数:
        point - 要添加到此三维点集合对象中的三维点对象。
        返回:
        添加的三维点对象的序号。
      • addRange

        public int addRange(Point3D[] points)
        向集合中添加三维点对象(以数组的形式),返回成功添加的三维点对象的个数。
        参数:
        points - 要添加到此三维点集合对象中的多个三维点对象。
        返回:
        添加的多个三维点对象的个数。
      • insert

        public boolean insert(int index,
                              Point3D pt)
        向集合中的指定序号处添加三维点对象,成功返回 true。
        参数:
        index - 要添加到的序号。
        point - 指定要添加的三维点对象。
        返回:
        添加成功,返回 true;否则,返回 false。
      • insertRange

        public int insertRange(int index,
                               Point3D[] points)
        将指定的多个点对象添加到此点集合中,从指定的序号开始依次添加。
        参数:
        index - 添加对象的起始序号。
        points - 要添加的多个三维点对象。
        返回:
        添加的三维点对象的个数。
      • remove

        public boolean remove(int index)
        在集合中删除指定序号的三维点对象,成功返回 true。
        参数:
        index - 要删除的三维点对象的序号。
        返回:
        删除成功,返回 true;否则返回 false。
      • removeRange

        public int removeRange(int index,
                               int count)
        将此三维点集合对象中从指定序号开始的指定个数的多个三维点对象删除。若成功,返回被删除的三维点对象的个数。
        参数:
        index - 删除对象的起始序号。
        count - 要删除的三维点对象的个数。
        返回:
        删除的三维点对象的个数。
      • clear

        public void clear()
        清空集合中的三维点集合对象。
      • toArray

        public Point3D[] toArray()
        将三维点集合对象转换为三维点对象数组。
        返回:
        此三维点集合对象转换得到的三维点对象的数组。
      • toPoint2Ds

        public Point2Ds toPoint2Ds()
        将三维点集合对象转换为二维点集合对象,转换过程中每个三维点的 Z 值都将丢失。
        返回:
        二维点集合对象。

Copyright © 2021–2024 SuperMap. All rights reserved.