Ejemplo n.º 1
0
 public void DrawParticles(Rhino.Geometry.ParticleSystem particles, DisplayBitmap bitmap)
 {
   particles.UpdateDrawCache();
   IntPtr pBitmap = bitmap.NonConstPointer();
   UnsafeNativeMethods.CRhinoDisplayPipeline_DrawParticles1(m_ptr, pBitmap, particles.m_points.Length, particles.m_points, particles.m_sizes, particles.m_colors_argb, particles.DisplaySizesInWorldUnits);
 }
Ejemplo n.º 2
0
 public void DrawSprites(DisplayBitmap bitmap, DisplayBitmapDrawList items, float size, Vector3d translation, bool sizeInWorldSpace)
 {
   Vector3d camera_direction = new Vector3d();
   UnsafeNativeMethods.CRhinoDisplayPipeline_GetCameraDirection(m_ptr, ref camera_direction);
   int[] indices = items.Sort(camera_direction);
   IntPtr pBitmap = bitmap.NonConstPointer();
   UnsafeNativeMethods.CRhinoDisplayPipeline_DrawBitmaps(m_ptr, pBitmap, items.m_points.Length, items.m_points, items.m_colors_argb.Length, items.m_colors_argb, indices, size, translation, sizeInWorldSpace);
 }
Ejemplo n.º 3
0
 public void DrawSprite(DisplayBitmap bitmap, Point3d worldLocation, float size, System.Drawing.Color blendColor, bool sizeInWorldSpace)
 {
   IntPtr pBitmap = bitmap.NonConstPointer();
   UnsafeNativeMethods.CRhinoDisplayPipeline_DrawBitmap(m_ptr, pBitmap, worldLocation, size, blendColor.ToArgb(), sizeInWorldSpace);
 }
Ejemplo n.º 4
0
 public void DrawSprite(DisplayBitmap bitmap, Point2d screenLocation, float size, System.Drawing.Color blendColor)
 {
   IntPtr pBitmap = bitmap.NonConstPointer();
   UnsafeNativeMethods.CRhinoDisplayPipeline_DrawBitmap2(m_ptr, pBitmap, screenLocation, size, blendColor.ToArgb());
 }
 /// <summary>
 /// Draws a bitmap in screen coordinates
 /// </summary>
 /// <param name="bitmap">bitmap to draw</param>
 /// <param name="left">where top/left corner of bitmap should appear in screen coordinates</param>
 /// <param name="top">where top/left corner of bitmap should appear in screen coordinates</param>
 /// <param name="maskColor">mask color to apply to bitmap for transparent regions</param>
 public void DrawBitmap(DisplayBitmap bitmap, int left, int top, System.Drawing.Color maskColor)
 {
   IntPtr ptr_bitmap = bitmap.NonConstPointer();
   int argb = maskColor.ToArgb();
   UnsafeNativeMethods.CRhinoDisplayPipeline_DrawBitmap3(m_ptr, ptr_bitmap, left, top, argb);
 }