当前位置: 首页>>代码示例>>C#>>正文


C# Texture.SetName方法代码示例

本文整理汇总了C#中Texture.SetName方法的典型用法代码示例。如果您正苦于以下问题:C# Texture.SetName方法的具体用法?C# Texture.SetName怎么用?C# Texture.SetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Texture的用法示例。


在下文中一共展示了Texture.SetName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: rectangleRToolStripMenuItem_Click

        private void rectangleRToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TopoShape rect = GlobalInstance.BrepTools.MakeRectangle(100, 50, 10, Coordinate3.UNIT_XYZ);
            rect = GlobalInstance.BrepTools.MakeFace(rect);

            SceneNode node = renderView.ShowGeometry(rect, ++shapeId);
            Texture texture = new Texture();
            texture.SetName("mytexture");
            texture.SetFilePath(new AnyCAD.Platform.Path("f:\\dimian.png"));

            FaceStyle style = new FaceStyle();
            style.SetTexture(0, texture);
            style.SetColor(255, 255, 255);
            node.SetFaceStyle(style);


            TopoShape line = GlobalInstance.BrepTools.MakeLine(Vector3.ZERO, new Vector3(0, 0, 100));
            TopoShape face = GlobalInstance.BrepTools.Extrude(line, 100, Vector3.UNIT_X);
            renderView.ShowGeometry(face, ++shapeId);
        }
开发者ID:xazk027,项目名称:anycadnetsdkpro,代码行数:20,代码来源:FormMain.cs

示例2: coneToolStripMenuItem_Click

        private void coneToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TopoShape cylinder = GlobalInstance.BrepTools.MakeCone(new Vector3(100, 0, 0), new Vector3(0, 0, 1), 20, 100, 40, 315);
            SceneNode node = renderView.ShowGeometry(cylinder, ++shapeId);

            for (int i = 1; i < 10; ++i)
            {
                Matrix4 trf = GlobalInstance.MatrixBuilder.MakeTranslate(i * 100, 0, 0);
                SceneNode aNode = renderView.ShowGeometry(cylinder, ++shapeId);
                aNode.SetTransform(trf);
            }

            Texture texture = new Texture();
            texture.SetName("mytexture");
            texture.SetFilePath(new AnyCAD.Platform.Path("#Terrain\\BeachStones.jpg"));

            FaceStyle style = new FaceStyle();
            style.SetTexture(0, texture);

            node.SetFaceStyle(style);
        }
开发者ID:xazk027,项目名称:anycadnetsdkpro,代码行数:21,代码来源:FormMain.cs

示例3: sphereToolStripMenuItem_Click

        private void sphereToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TopoShape sphere = GlobalInstance.BrepTools.MakeSphere(new Vector3(0, 0, 40), 40);
            SceneNode node = renderView.ShowGeometry(sphere, ++shapeId);


            Texture texture = new Texture();
            texture.SetName("mytexture3");
            texture.SetFilePath(new AnyCAD.Platform.Path("#test\\land_ocean_ice_2048.jpg"));

            FaceStyle style = new FaceStyle();
            style.SetTexture(0, texture);

            node.SetFaceStyle(style);
        }
开发者ID:xazk027,项目名称:anycadnetsdkpro,代码行数:15,代码来源:FormMain.cs

示例4: cylinderToolStripMenuItem_Click

        private void cylinderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TopoShape cylinder = GlobalInstance.BrepTools.MakeCylinder(new Vector3(180, 0, 0), new Vector3(0, 0, 1), 20, 100, 360);

            Matrix4 mat= GlobalInstance.MatrixBuilder.MakeRotation(90, Vector3.UNIT_X);
            cylinder = GlobalInstance.BrepTools.Transform(cylinder, mat);
            SceneNode sceneNode = renderView.ShowGeometry(cylinder, ++shapeId);
            FaceStyle style = new FaceStyle();
            
            Texture texture = new Texture();
            texture.SetName("mytexture2");
            texture.SetFilePath(new AnyCAD.Platform.Path("#test\\houzi.jpg"));
            style.SetTexture(0, texture);

            sceneNode.SetFaceStyle(style);

            sceneNode.SetPickable(false);
        }
开发者ID:xazk027,项目名称:anycadnetsdkpro,代码行数:18,代码来源:FormMain.cs


注:本文中的Texture.SetName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。