类 Line


  • public class Line
    extends java.lang.Object
    class to construct a line with parametric form Line = p + aV (a point and a direction vector on the line) ported from C++ code by Song Ho Ahn (song.ahn@gmail.com)
    • 构造器概要

      构造器 
      构造器 说明
      Line()
      Constructor
      Line​(float slope, float intercept)
      Constructor
      Line​(org.joml.Vector3f direction, org.joml.Vector3f point)
      Constructor
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      org.joml.Vector3f getDirection()
      Get line direction
      org.joml.Vector3f getPoint()
      Get line point
      org.joml.Vector3f intersect​(Line line)
      find the intersection point with the other line.
      boolean isIntersected​(Line line)
      determine if it intersects with the other line
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • Line

        public Line()
        Constructor
      • Line

        public Line​(float slope,
                    float intercept)
        Constructor
        参数:
        slope - Line slope
        intercept - Line intercept
      • Line

        public Line​(org.joml.Vector3f direction,
                    org.joml.Vector3f point)
        Constructor
        参数:
        direction - Line direction
        point - Lint point
    • 方法详细资料

      • getDirection

        public org.joml.Vector3f getDirection()
        Get line direction
        返回:
        Line direction
      • getPoint

        public org.joml.Vector3f getPoint()
        Get line point
        返回:
        Line point
      • intersect

        public org.joml.Vector3f intersect​(Line line)
        find the intersection point with the other line. If no intersection, return a point with NaN in it.
        参数:
        line - Other line
        返回:
        Intersect point
      • isIntersected

        public boolean isIntersected​(Line line)
        determine if it intersects with the other line
        参数:
        line - Other line
        返回:
        Intersect or not