本文整理汇总了C#中SceneManager.DestroyMovableObject方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.DestroyMovableObject方法的具体用法?C# SceneManager.DestroyMovableObject怎么用?C# SceneManager.DestroyMovableObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneManager
的用法示例。
在下文中一共展示了SceneManager.DestroyMovableObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTestTetrahedron2
//.........这里部分代码省略.........
// width / hight / depth
c[0] = new Mogre.Vector3(-mlr, -mbot, mf); // left bottom front
c[1] = new Mogre.Vector3(mlr, -mbot, mf); // right bottom front
c[2] = new Mogre.Vector3(0, -mbot, -mb); // (middle) bottom back
c[3] = new Mogre.Vector3(0, mtop, 0); // (middle) top (middle)
// add position offset for all corners (move tetrahedron)
for (Int16 i = 0; i <= 3; i++)
c[i] += position;
// create bottom
mo.Begin(materialName, RenderOperation.OperationTypes.OT_TRIANGLE_LIST);
var normal = (c[1] - c[0]).CrossProduct(c[1] - c[2]).NormalisedCopy;
var normalA = normal;
var normalB = normal;
var normalC = normal;
//this is an attempt to try to make it seem softer.
normalA.x += 2f;
normalA.y += 0.5f;
normalB.y -= 2f;
normalB.x -= 0.5f;
mo.Position(c[0]);
mo.Normal(normalA);
mo.TextureCoord(0, 0);
mo.Position(c[1]);
mo.Normal(normalB);
mo.TextureCoord(0, 1);
mo.Position(c[2]);
mo.Normal(normalC);
mo.TextureCoord(1, 1);
mo.Triangle(0, 1, 2);
mo.Triangle(0, 2, 1);
mo.End();
float lineLen = scale / 3;
// create right back side
mo.Begin(materialName, RenderOperation.OperationTypes.OT_TRIANGLE_LIST);
normal = (c[1] - c[2]).CrossProduct(c[1] - c[3]).NormalisedCopy;
normalA = normal;
normalB = normal;
normalC = normal;
normalA.x += 2f;
normalA.y += 0.5f;
normalB.y -= 2f;
normalB.x -= 0.5f;
mo.Position(c[1]);
mo.Normal(normalA);
mo.Position(c[2]);
mo.Normal(normalB);
mo.Position(c[3]);
mo.Normal(normalC);
mo.Triangle(0, 1, 2);
mo.Triangle(0, 2, 1);
mo.End();
// create left back side
normal = (c[0] - c[2]).CrossProduct(c[2] - c[3]);
mo.Begin(materialName, RenderOperation.OperationTypes.OT_TRIANGLE_LIST);
mo.Position(c[3]);
mo.Normal(normal);
mo.Position(c[2]);
mo.Normal(normal);
mo.Position(c[0]);
mo.Normal(normal);
mo.Triangle(0, 1, 2);
mo.Triangle(0, 2, 1);
mo.End();
// create front side
normal = (c[1] - c[3]).CrossProduct(c[0] - c[3]);
mo.Begin(materialName, RenderOperation.OperationTypes.OT_TRIANGLE_LIST);
mo.Position(c[0]);
mo.Normal(normal);
mo.Position(c[1]);
mo.Normal(normal);
mo.Position(c[3]);
mo.Normal(normal);
mo.Triangle(0, 1, 2);
mo.Triangle(0, 2, 1);
mo.End();
MeshPtr pMesh = mo.ConvertToMesh(name + "_mesh");
sm.DestroyMovableObject(mo);
return pMesh;
}