hi, I am trying to setup a serie of camera using line as input to define camera location and target. But I can’t find a way to setup the camera angle. I am interested with parallel projection. can someone help me on this?
thx
public void CreateCameraFromPath(Curve CamPath, string Name)
{
var camStart = CamPath.PointAtStart;
var camEnd = CamPath.PointAtEnd;
Rhino.Display.RhinoView view = Rhino.RhinoDoc.ActiveDoc.Views.ActiveView;
Rhino.Display.RhinoViewport vp = view.ActiveViewport;
vp.Name = Name;
//vp.SetProjection(Rhino.Display.DefinedViewportProjection.Front, Name, true);
vp.PushViewProjection();
vp.ChangeToParallelProjection(true);
vp.CameraUp = Rhino.Geometry.Vector3d.ZAxis;
vp.SetCameraLocation(camStart, false);
vp.SetCameraDirection(camEnd - camStart, true);
vp.SetCameraTarget(camEnd, true);
this._doc.NamedViews.Add(Name, vp.Id);
view.Redraw();
}