VTK隐函数之vtkPlane

时间:2018-05-08 14:17:31   收藏:0   阅读:236
vtkPlane

 vtkPlane provides methods for various plane computations. These include projecting points onto a plane, evaluating the plane equation, and returning plane normal. vtkPlane is a concrete implementation of the abstract class vtkImplicitFunction.

成员函数:

 在成员函数中还定义了点、矢量向某个平面投影的功能函数,如ProjectPoint、ProjectVector等。

 隐函数的数学表达式为F(x,y,z)=w,平面的隐函数方程有点法式和一般式。在vtkPlane中采用的是点法式隐函数。
 点法式平面隐函数方程为:A(x-x0)+B(y-y0)+C(z-z0)=w, (A,B,C)为平面法向量,即vtkPlane中的Normal,(x0,y0,z0)为平面上一点,即vtkPlane中的Origin。
 平面的一般式方程为:Ax+By+Cz=w


EvaluateFunction(...)函数的源代码如下:  

double vtkPlane::EvaluateFunction( double x[3] )
{
  return ( this->Normal[0]*(x[0]-this->Origin[0]) +
           this->Normal[1]*(x[1]-this->Origin[1]) +
           this->Normal[2]*(x[2]-this->Origin[2]) );
}

原文:http://blog.51cto.com/weiyuqingcheng/2113936

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!