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();
        }
Beispiel #2
0
 public static MyInstanceLodComponent GetInstanceLod(this MyActor actor)
 {
     return(actor.GetComponent <MyInstanceLodComponent>());
 }
Beispiel #3
0
 public static MyGroupLeafComponent GetGroupLeaf(this MyActor actor)
 {
     return(actor.GetComponent <MyGroupLeafComponent>());
 }
Beispiel #4
0
 public static MySkinningComponent GetSkinning(this MyActor actor)
 {
     return(actor.GetComponent <MySkinningComponent>());
 }
Beispiel #5
0
 public static MyFoliageComponent GetFoliage(this MyActor actor)
 {
     return(actor.GetComponent <MyFoliageComponent>());
 }
Beispiel #6
0
 public static MyRenderableComponent GetRenderable(this MyActor actor)
 {
     return(actor.GetComponent <MyRenderableComponent>());
 }