CAD.net WorldToEye and EyeToWorld
Private Function EyeToWorld(view As ViewportTableRecord) As Matrix3d
Return Matrix3d.Rotation(-view.ViewTwist, view.ViewDirection, view.Target) * Matrix3d.Displacement(view.Target - Point3d.Origin) * Matrix3d.PlaneToWorld(view.ViewDirection)
End Function
Private Function WorldToEye(view As ViewportTableRecord) As Matrix3d
Return Me.EyeToWorld(view).Inverse()
End Function
Please follow WeChat's public account ByCAD