Click or drag to resize

Line Structure

返回用户文档首页
表示三维空间中的一条直线
Inheritance Hierarchy
SystemObject
  SystemValueType
    LoongCAD.GeometryLine

Namespace: LoongCAD.Geometry
Assembly: LoongSDKCore (in LoongSDKCore.dll) Version: 2025.0.9.7 (2025.0.9.7)
Syntax
C#
[SerializableAttribute]
public struct Line

The Line type exposes the following members.

Constructors
 NameDescription
Public methodLine(Line) 根据已有的线段对象创建一个新的线段副本。
Public methodLine(Point, Point) 根据两个点创建一条线段。
Public methodLine(Vec3, Vec3) 根据两个点创建一条线段。
Top
Properties
 NameDescription
Public propertyDir 获取线段的方向向量。
Public propertyItem 获取线段的端点。
Public propertyLength 获取线段的长度。
Public propertyLengthSqr 获取线段长度的平方。
Public propertyNormalizedDir 获取归一化后的线段方向向量。
Public propertyPoint1 线段第一点,同V0
Public propertyPoint2 线段第二点,同V1
Top
Methods
 NameDescription
Public methodDist 计算给定点在线段上的投影点。
Public methodEquals 比较当前线段与另一个对象是否相等。
(Overrides ValueTypeEquals(Object))
Public methodGetHashCode 获取当前线段的哈希代码。
(Overrides ValueTypeGetHashCode)
Public methodHasIntersect 检查当前线段是否与另一个线段相交。当前版本有错误,有待修正!!!
Public methodIntersect(Line, Vec3, Vec3, Double) 计算当前直线与另一条直线的交点。
Public methodStatic memberIntersect(Line, Line, Vec3, Vec3, Double) 计算两条直线的交点(投影到各自直线上)
Public methodProj(Point) 计算给定点在线段上的投影点。
Public methodProj(Vec3) 计算给定点在线段上的投影点。
Public methodSample 根据给定的参数t,在线段上采样点。
Public methodT 计算点在线段上的参数t值。
Public methodToString 返回表示当前线段的字符串。
(Overrides ValueTypeToString)
Top
Operators
Fields
 NameDescription
Public fieldStatic memberNULL 无效直线
Public fieldV0 
Public fieldV1 
Top
See Also