本文整理汇总了C#中SceneNode.SetVisible方法的典型用法代码示例。如果您正苦于以下问题:C# SceneNode.SetVisible方法的具体用法?C# SceneNode.SetVisible怎么用?C# SceneNode.SetVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneNode
的用法示例。
在下文中一共展示了SceneNode.SetVisible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetCollisionMesh
public void SetCollisionMesh(String meshFile)
{
m_CollisionNode =
Core.Singleton.m_SceneManager.RootSceneNode.CreateChildSceneNode();
m_CollisionEntity = Core.Singleton.m_SceneManager.CreateEntity(meshFile);
m_CollisionNode.AttachObject(m_CollisionEntity);
m_CollisionNode.SetVisible(false);
MogreNewt.CollisionPrimitives.TreeCollisionSceneParser collision =
new MogreNewt.CollisionPrimitives.TreeCollisionSceneParser(
Core.Singleton.m_NewtonWorld);
collision.ParseScene(m_CollisionNode, true, 1);
m_Body = new Body(Core.Singleton.m_NewtonWorld, collision);
collision.Dispose();
m_Body.AttachNode(m_CollisionNode);
}
示例2: CreateHeart
/// <summary>
/// This method initializes the heart node and entity
/// </summary>
/// <param name="n"> A numeric tag used to determine the heart postion on sceen </param>
/// <returns></returns>
private SceneNode CreateHeart(int n)
{
lifeEntity = mSceneMgr.CreateEntity("Heart.mesh");
lifeEntity.SetMaterialName("HeartHMD");
SceneNode livesNode;
livesNode = new SceneNode(mSceneMgr);
livesNode.AttachObject(lifeEntity);
livesNode.Scale(new Vector3(0.15f, 0.15f, 0.15f));
//livesNode.Position = new Vector3(3f, 3f, -8) - n * 0.5f * Vector3.UNIT_X; ;
livesNode.Position = new Vector3(3f, 3.5f, -5.5f) - n * 0.5f * Vector3.UNIT_X; ;
livesNode.SetVisible(true);
return livesNode;
}
示例3: SetGrid
public void SetGrid()
{
mainGrid = sceneMgr.RootSceneNode.CreateChildSceneNode("mainGrid_node");
mainGrid.SetPosition(0, -0.05f, 0);
mainGrid.AttachObject(CreateGrid(sceneMgr, 30f, 1f, "main"));
mainGrid.SetVisible(false);
}