public void SetModel(string file) { ModelLoader modelLoader = LightFireCS.Graphics.ModelLoader.Get(); model = file; modelLoader.LoadModel(file); sceneNode = new SceneNodeModel(modelLoader.GetModel(file)); //BoundingBox b = sceneNode.GetBoundingBox(); }
public void AddSprite(Vector3 position, Models model) { int subChunkIndex = GetSubChunkIdFromHeight((int)position.y); int subChunkHeight = (int)position.y - ((int)CHUNK_SIZE * (subChunkIndex)); var localPosition = new Vector3(position.x, subChunkHeight, position.z); var mesh = ModelLoader.GetModel(model); var sprite = new VoxelSprite(mesh, localPosition); m_SubChunks[subChunkIndex].AddDecoration(sprite); }