示例#1
0
        void IGH_RenderAwareData.AppendRenderGeometry(GH_RenderArgs args, RenderMaterial material)
        {
            if (Value.Geometry is Mesh)
            {
                var renderMat = material;

                if (Value.Material != null)
                {
                    var mat = new Material
                    {
                        DiffuseColor  = Value.Material.Diffuse,
                        EmissionColor = Value.Material.Emission,
                        Transparency  = Value.Material.Transparency
                    };

                    var texture = Value.Material.GetBitmapTexture(true);

                    if (texture != null)
                    {
                        mat.SetBitmapTexture(texture);
                    }

                    renderMat = mat.RenderMaterial;
                }

                args.Geomety.Add(Value.Geometry as Mesh, renderMat);
            }
        }
 public void AppendRenderGeometry(GH_RenderArgs args, RenderMaterial material)
 {
     Value.AppendRenderGeometry(args, material);
 }