static void OnDrawRhinoObjectProc(Guid am_id, IntPtr pConstRhinoObject, IntPtr pRhinoDisplayPipeline) { VisualAnalysisMode mode = FindLocal(am_id); if (mode != null) { var rhobj = Pixel.Rhino.DocObjects.RhinoObject.CreateRhinoObjectHelper(pConstRhinoObject); DisplayPipeline dp = new DisplayPipeline(pRhinoDisplayPipeline); try { Pixel.Rhino.DocObjects.BrepObject brep = rhobj as Pixel.Rhino.DocObjects.BrepObject; if (brep != null) { mode.DrawBrepObject(brep, dp); return; } Pixel.Rhino.DocObjects.CurveObject curve = rhobj as Pixel.Rhino.DocObjects.CurveObject; if (curve != null) { mode.DrawCurveObject(curve, dp); return; } Pixel.Rhino.DocObjects.MeshObject mesh = rhobj as Pixel.Rhino.DocObjects.MeshObject; if (mesh != null) { mode.DrawMeshObject(mesh, dp); return; } Pixel.Rhino.DocObjects.PointCloudObject pointcloud = rhobj as Pixel.Rhino.DocObjects.PointCloudObject; if (pointcloud != null) { mode.DrawPointCloudObject(pointcloud, dp); return; } Pixel.Rhino.DocObjects.PointObject pointobj = rhobj as Pixel.Rhino.DocObjects.PointObject; if (pointobj != null) { mode.DrawPointObject(pointobj, dp); return; } } catch (Exception) { } } }
/// <summary> /// Draws one point cloud. Override this method to add your custom behavior. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="pointCloud">A point cloud object.</param> /// <param name="pipeline">The current display pipeline.</param> protected virtual void DrawPointCloudObject(Pixel.Rhino.DocObjects.PointCloudObject pointCloud, DisplayPipeline pipeline) { }