Ejemplo n.º 1
0
        public static SceneNode block(Vector3 loc, SceneManager sceneMgr)
        {
            ManualObject block = new ManualObject("block-" + Guid.NewGuid().ToString());

            block.Begin("BaseWhiteNoLighting", RenderOperation.OperationTypes.OT_LINE_LIST);

            for (int i = 0; i < blockPointCoords.Length; i++) {
                block.Position(loc + blockPointCoords[i]);
                if(i != 0) {
                    block.Position(loc + blockPointCoords[i]);
                }
            }

            block.End();

            SceneNode returnNode = sceneMgr.RootSceneNode.CreateChildSceneNode("cubeBorders", new Vector3(0, 0, 0));

            returnNode.AttachObject(block);
            return returnNode;
        }