com.supermap.data
类 Plane

java.lang.Object
  继承者 com.supermap.data.Plane

public class Plane
extends java.lang.Object

平面对象类。此平面为数学意义上无限延展的平面,主要用于三维模型进行截面投影和平面投影。


构造方法摘要
Plane()
          构造一个新的 Plane 对象。
Plane(double cutA, double cutB, double cutC)
          截距式
Plane(double A, double B, double C, double D)
          一般式 Ax+By+Cz+D=0
Plane(Plane pPlane, java.lang.Boolean cloneable)
          根据给定的 Plane 对象构造一个与其完全相同的新对象。
Plane(PlaneType type)
          根据指定的平面类型常量构造一个 Plane 的新对象。
Plane(Point3D normal, double distance)
          由方向量和面距原点的距离构建面.
Plane(Point3D normal, Point3D point)
          点法式
Plane(Point3D point0, Point3D point1, Point3D point2)
          根据三个不重合的三维点构造平面
 
方法摘要
 void dispose()
          释放对象所占的资源。
 double getDistance()
          获取面距离原点的距离
 double getDistance(Point3D vPoint)
          获取指定的点到该平面的距离值。
 Point3D getNormal()
          获取面的法向量.
 void normalize()
          对面进行标准化.
 boolean ptInPlane(Point3D point)
          判断空间点是否在该平面上。
 void setDistance(double distance)
          设置面距离原点的距离.
 void setNormal(Point3D normal)
          设置面的法向量.
 void setType(PlaneType type)
          设置平面类型。
 void translate(double offset)
          平面沿着法线移动.
 boolean valid()
          判断平面是否有效。
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Plane

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


Plane

public Plane(Plane pPlane,
             java.lang.Boolean cloneable)
根据给定的 Plane 对象构造一个与其完全相同的新对象。

参数:
pPlane - 指定的平面对象.
cloneable - 指定是否可克隆.

Plane

public Plane(PlaneType type)
根据指定的平面类型常量构造一个 Plane 的新对象。

参数:
type - 平面类型

Plane

public Plane(Point3D normal,
             double distance)
由方向量和面距原点的距离构建面.

参数:
normal - 指定的三维点。
distance - 方向量和面距原点的距离。

Plane

public Plane(Point3D normal,
             Point3D point)
点法式

参数:
normal - 定义Plane对象的法线.
point - 法线在Plane上的垂足所对应的三维点.

Plane

public Plane(Point3D point0,
             Point3D point1,
             Point3D point2)
根据三个不重合的三维点构造平面

参数:
point0 - 第一个三维点
point1 - 第二个三维点
point2 - 第三个三维点

Plane

public Plane(double cutA,
             double cutB,
             double cutC)
截距式

参数:
cutA - 与坐标轴相交的平面,在X轴上的值。
cutB - 与坐标轴相交的平面,在Y轴上的值。
cutC - 与坐标轴相交的平面,在Z轴上的值。

Plane

public Plane(double A,
             double B,
             double C,
             double D)
一般式 Ax+By+Cz+D=0

参数:
A - 一般方程式x的系数。
B - 一般方程式y的系数。
C - 一般方程式z的系数。
D - 一般方程式的常数。
方法详细信息

valid

public boolean valid()
判断平面是否有效。

返回:
true 表示平面有效,false 表示平面无效。

setType

public void setType(PlaneType type)
设置平面类型。

参数:
type - 平面类型。

ptInPlane

public boolean ptInPlane(Point3D point)
判断空间点是否在该平面上。

参数:
point - 指定的三维点。
返回:
true 表示指定的三维点在平面上,false 表示指定的三维点不在平面上。

translate

public void translate(double offset)
平面沿着法线移动.

参数:
offset - 平面沿着法线移动的距离。

getDistance

public double getDistance(Point3D vPoint)
获取指定的点到该平面的距离值。

参数:
vPoint - 指定的三维点
返回:
指定的点到该平面的距离值。

normalize

public void normalize()
对面进行标准化.


getNormal

public Point3D getNormal()
获取面的法向量.

返回:

setNormal

public void setNormal(Point3D normal)
设置面的法向量.

参数:
normal -

getDistance

public double getDistance()
获取面距离原点的距离

返回:
面距离原点的距离.

setDistance

public void setDistance(double distance)
设置面距离原点的距离.

参数:
distance - 面距离原点的距离.

dispose

public void dispose()
释放对象所占的资源。