Exemplo n.º 1
0
        /// <summary>
        /// Add primitive plane and material.
        /// </summary>
        /// <param name="plane">Plane to add.</param>
        /// <param name="material">
        /// Material to add, may be null if not needed.
        /// </param>
        public void Add(PlaneSurface plane, RenderMaterial material)
        {
            var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
            var pointer          = NonConstPointer();

            UnsafeNativeMethods.Rdk_CustomMeshes_AddPlane(pointer, plane.ConstPointer(), material_pointer);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add mesh and material.
        /// </summary>
        /// <param name="mesh">Mesh to add.</param>
        /// <param name="material">
        /// Material to add, may be null if not needed.
        /// </param>
        public void Add(Mesh mesh, RenderMaterial material)
        {
            var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
            var pointer          = NonConstPointer();

            UnsafeNativeMethods.Rdk_CustomMeshes_AddMesh(pointer, mesh.ConstPointer(), material_pointer);
        }
 public void Add(Rhino.Geometry.Sphere sphere, RenderMaterial material)
 {
   UnsafeNativeMethods.Rdk_CustomMeshes_AddSphere(NonConstPointer(), sphere.Center, 
                                                  sphere.EquitorialPlane.XAxis, 
                                                  sphere.EquitorialPlane.YAxis, 
                                                  sphere.Radius, 
                                                  material.ConstPointer());
 }
 public void Add(Rhino.Geometry.Box box, RenderMaterial material)
 {
   UnsafeNativeMethods.Rdk_CustomMeshes_AddBox(NonConstPointer(), 
                                               box.Plane.Origin, 
                                               box.Plane.XAxis, 
                                               box.Plane.YAxis, 
                                               box.X.Min, box.X.Max, 
                                               box.Y.Min, box.Y.Max, 
                                               box.Z.Min, box.Z.Max, 
                                               material.ConstPointer());
 }
Exemplo n.º 5
0
        /// <summary>
        /// Add primitive sphere and material.
        /// </summary>
        /// <param name="sphere">Sphere to add.</param>
        /// <param name="material">
        /// Material to add, may be null if not needed.
        /// </param>
        public void Add(Sphere sphere, RenderMaterial material)
        {
            var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
            var pointer          = NonConstPointer();

            UnsafeNativeMethods.Rdk_CustomMeshes_AddSphere(pointer,
                                                           sphere.Center,
                                                           sphere.EquitorialPlane.XAxis,
                                                           sphere.EquitorialPlane.YAxis,
                                                           sphere.Radius,
                                                           material_pointer);
        }
 public void Add(Rhino.Geometry.Cone cone, Rhino.Geometry.Plane truncation, RenderMaterial material)
 {
   UnsafeNativeMethods.Rdk_CustomMeshes_AddCone(NonConstPointer(), cone.BasePoint, 
                                                cone.Plane.XAxis, 
                                                cone.Plane.YAxis, 
                                                cone.Height,
                                                cone.Radius,
                                                truncation.Origin, 
                                                truncation.XAxis, 
                                                truncation.YAxis, 
                                                material.ConstPointer());
 }
Exemplo n.º 7
0
        /// <summary>
        /// Add primitive box and material.
        /// </summary>
        /// <param name="box">Box to add.</param>
        /// <param name="material">
        /// Material to add, may be null if not needed.
        /// </param>
        public void Add(Box box, RenderMaterial material)
        {
            var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
            var pointer          = NonConstPointer();

            UnsafeNativeMethods.Rdk_CustomMeshes_AddBox(pointer,
                                                        box.Plane.Origin,
                                                        box.Plane.XAxis,
                                                        box.Plane.YAxis,
                                                        box.X.Min, box.X.Max,
                                                        box.Y.Min, box.Y.Max,
                                                        box.Z.Min, box.Z.Max,
                                                        material_pointer);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Add primitive cone and material.
        /// </summary>
        /// <param name="cone">Cone to add.</param>
        /// <param name="truncation">
        /// The plane used to cut the cone (the non-apex end is kept). Should be
        /// equal to cone.plane if not truncated.
        /// </param>
        /// <param name="material">
        /// Material to add, may be null if not needed.
        /// </param>
        public void Add(Cone cone, Plane truncation, RenderMaterial material)
        {
            var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
            var pointer          = NonConstPointer();

            UnsafeNativeMethods.Rdk_CustomMeshes_AddCone(pointer,
                                                         cone.BasePoint,
                                                         cone.Plane.XAxis,
                                                         cone.Plane.YAxis,
                                                         cone.Height,
                                                         cone.Radius,
                                                         truncation.Origin,
                                                         truncation.XAxis,
                                                         truncation.YAxis,
                                                         material_pointer);
        }
 public void Add(Rhino.Geometry.PlaneSurface plane, RenderMaterial material)
 {
   UnsafeNativeMethods.Rdk_CustomMeshes_AddPlane(NonConstPointer(), plane.ConstPointer(), material.ConstPointer());
 }
 public void Add(Rhino.Geometry.Mesh mesh, RenderMaterial material)
 {
   UnsafeNativeMethods.Rdk_CustomMeshes_AddMesh(NonConstPointer(), mesh.ConstPointer(), material.ConstPointer());
 }
 /// <summary>
 /// Add primitive box and material.
 /// </summary>
 /// <param name="box">Box to add.</param>
 /// <param name="material">
 /// Material to add, may be null if not needed.
 /// </param>
 public void Add(Box box, RenderMaterial material)
 {
   var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_CustomMeshes_AddBox(pointer, 
                                               box.Plane.Origin, 
                                               box.Plane.XAxis, 
                                               box.Plane.YAxis, 
                                               box.X.Min, box.X.Max, 
                                               box.Y.Min, box.Y.Max, 
                                               box.Z.Min, box.Z.Max,
                                               material_pointer);
 }
 /// <summary>
 /// Add primitive plane and material.
 /// </summary>
 /// <param name="plane">Plane to add.</param>
 /// <param name="material">
 /// Material to add, may be null if not needed.
 /// </param>
 public void Add(PlaneSurface plane, RenderMaterial material)
 {
   var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_CustomMeshes_AddPlane(pointer, plane.ConstPointer(), material_pointer);
 }
 /// <summary>
 /// Add primitive cone and material.
 /// </summary>
 /// <param name="cone">Cone to add.</param>
 /// <param name="truncation">
 /// The plane used to cut the cone (the non-apex end is kept). Should be
 /// equal to cone.plane if not truncated.
 /// </param>
 /// <param name="material">
 /// Material to add, may be null if not needed.
 /// </param>
 public void Add(Cone cone, Plane truncation, RenderMaterial material)
 {
   var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_CustomMeshes_AddCone(pointer,
                                                cone.BasePoint, 
                                                cone.Plane.XAxis, 
                                                cone.Plane.YAxis, 
                                                cone.Height,
                                                cone.Radius,
                                                truncation.Origin, 
                                                truncation.XAxis, 
                                                truncation.YAxis,
                                                material_pointer);
 }
 /// <summary>
 /// Add primitive sphere and material.
 /// </summary>
 /// <param name="sphere">Sphere to add.</param>
 /// <param name="material">
 /// Material to add, may be null if not needed.
 /// </param>
 public void Add(Sphere sphere, RenderMaterial material)
 {
   var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_CustomMeshes_AddSphere(pointer,
                                                  sphere.Center,
                                                  sphere.EquitorialPlane.XAxis,
                                                  sphere.EquitorialPlane.YAxis,
                                                  sphere.Radius,
                                                  material_pointer);
 }
 /// <summary>
 /// Add mesh and material.
 /// </summary>
 /// <param name="mesh">Mesh to add.</param>
 /// <param name="material">
 /// Material to add, may be null if not needed.
 /// </param>
 public void Add(Mesh mesh, RenderMaterial material)
 {
   var material_pointer = (null == material ? IntPtr.Zero : material.ConstPointer());
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_CustomMeshes_AddMesh(pointer, mesh.ConstPointer(), material_pointer);
 }