/// <summary> /// Evaluates the box volume at the given unitized parameters. /// <para>The box has idealized side length of 1x1x1.</para> /// </summary> /// <param name="x">Unitized parameter (between 0 and 1 is inside the box) along box X direction.</param> /// <param name="y">Unitized parameter (between 0 and 1 is inside the box) along box Y direction.</param> /// <param name="z">Unitized parameter (between 0 and 1 is inside the box) along box Z direction.</param> /// <returns>The point at (x,y,z).</returns> public Point3d PointAt(double x, double y, double z) { // David: This code is untested. x = m_dx.ParameterAt(x); y = m_dy.ParameterAt(y); z = m_dz.ParameterAt(z); return(m_plane.PointAt(x, y, z)); }
/// <summary> btnOrientView is a routine for orienting the view to the current drawing plane </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOrientView_Click(object sender, EventArgs e) { //set camera target to center of global drawing plane mRhinoDoc.Views.ActiveView.MainViewport.SetCameraLocations(plane1.PointAt(0, 0), plane1.PointAt(0, 0, 100)); //set camera vector to the reverse of the normal at that point //redraw view view3.Redraw(); }
public Point3d PointAt(double t) { return(m_plane.PointAt(Math.Cos(t) * m_radius, Math.Sin(t) * m_radius)); }
/// <summary> /// Gets the corner at the given index. /// </summary> /// <param name="index"> /// Index of corner, valid values are: /// <para>0 = lower left (min-x, min-y)</para> /// <para>1 = lower right (max-x, min-y)</para> /// <para>2 = upper right (max-x, max-y)</para> /// <para>3 = upper left (min-x, max-y)</para> /// </param> /// <returns>The point at the given corner index.</returns> public Point3d Corner(int index) { switch (index) { case 0: return(m_plane.PointAt(m_x.T0, m_y.T0)); case 1: return(m_plane.PointAt(m_x.T1, m_y.T0)); case 2: return(m_plane.PointAt(m_x.T1, m_y.T1)); case 3: return(m_plane.PointAt(m_x.T0, m_y.T1)); default: throw new IndexOutOfRangeException("Rectangle corner index must be between and including 0 and 3"); } }