VTK
Project Point On Line And Plane By Special Direction
We have to calculate the vector on the special direction firstly. void CalculateVecComponent(PointStruct originVec, PointStruct &axis0, PointStruct &vecOnAxis) { double cosTheta = originVec.Dot( axis0 ); return axis0*cosTheta; } Project point on line Point GetProjectPtOnDir(Point pt, Point dir, Point startPt) { dir.Unit(); Point ptVector = pt – startPt; double cosTheta = Read more…