.. _class_geom_lineSegment: geom_lineSegment ================ 创建一条线段 ------------ **图块代码** .. image:: img/geom_lineSegment.png ---- **javascript** .. code-block:: javascript jih_doc.geom_line_segment(start_x, start_y, start_z, end_x, end_y, end_z, color) ---- **python** .. code-block:: python jih_doc.geom_line_segment(start_x, start_y, start_z, end_x, end_y, end_z, color) ---- **npl** .. code-block:: lua jih_doc:geom_line_segment(start_x, start_y, start_z, end_x, end_y, end_z, color) ---- 参数 ---- +-----------+----------+-------------+--------+ | 参数 | 类型 | 默认值 | 说明 | +===========+==========+=============+========+ | start_x | number | 0 | | +-----------+----------+-------------+--------+ | start_y | number | 0 | | +-----------+----------+-------------+--------+ | start_z | number | 0 | | +-----------+----------+-------------+--------+ | end_x | number | 1 | | +-----------+----------+-------------+--------+ | end_y | number | 0 | | +-----------+----------+-------------+--------+ | end_z | number | 0 | | +-----------+----------+-------------+--------+ | color | string | "#ffc658" | | +-----------+----------+-------------+--------+ 示例 ---- .. tabs:: .. tab:: javascript .. code-block:: javascript jih_doc.geom_line_segment(0, 0, 0, 1, 0, 0, "#ffc658") .. tab:: python .. code-block:: python jih_doc.geom_line_segment(0, 0, 0, 1, 0, 0, "#ffc658") .. tab:: npl .. code-block:: lua jih_doc:geom_line_segment(0, 0, 0, 1, 0, 0, "#ffc658")