void IMyClipmapCell.UpdateMesh(MyRenderMessageUpdateClipmapCell msg) { MyMeshes.UpdateVoxelCell(Mesh, msg.Batches); m_scale = msg.PositionScale; m_translation = msg.PositionOffset; var matrix = (Matrix)(Matrix.CreateScale(m_scale) * Matrix.CreateTranslation(m_translation) * m_worldMatrix); m_actor.SetMatrix(ref matrix); m_actor.GetRenderable().SetVoxelLod(m_lod); m_actor.SetAabb(msg.MeshAabb.Transform((Matrix)m_worldMatrix)); (m_actor.GetComponent(MyActorComponentEnum.Foliage) as MyFoliageComponent).InvalidateStreams(); m_actor.MarkRenderDirty(); }
public static MyInstanceLodComponent GetInstanceLod(this MyActor actor) { return(actor.GetComponent <MyInstanceLodComponent>()); }
public static MyGroupLeafComponent GetGroupLeaf(this MyActor actor) { return(actor.GetComponent <MyGroupLeafComponent>()); }
public static MySkinningComponent GetSkinning(this MyActor actor) { return(actor.GetComponent <MySkinningComponent>()); }
public static MyFoliageComponent GetFoliage(this MyActor actor) { return(actor.GetComponent <MyFoliageComponent>()); }
public static MyRenderableComponent GetRenderable(this MyActor actor) { return(actor.GetComponent <MyRenderableComponent>()); }