示例#1
0
 void IMyDecalProxy.GetDecalRenderData(MyHitInfo hitInfo, out MyDecalRenderData renderable)
 {
     renderable                = new MyDecalRenderData();
     renderable.Position       = hitInfo.Position;
     renderable.Normal         = hitInfo.Normal;
     renderable.RenderObjectId = Render.GetRenderObjectID();
     renderable.Material       = Physics.GetMaterialAt(hitInfo.Position);
 }
        void IMyDecalProxy.GetDecalRenderData(MyHitInfo hitInfo, out MyDecalRenderData renderable)
        {
            Debug.Assert(m_mapIdToBlock.Count > 0);
            MySlimBlock block = m_mapIdToBlock.First().Value;

            renderable                = new MyDecalRenderData();
            renderable.Position       = Vector3D.Transform(hitInfo.Position, CubeGrid.PositionComp.WorldMatrixInvScaled);
            renderable.Normal         = Vector3D.TransformNormal(hitInfo.Normal, CubeGrid.PositionComp.WorldMatrixInvScaled);
            renderable.RenderObjectId = CubeGrid.Render.GetRenderObjectID();
            renderable.Material       = MyStringHash.GetOrCompute(block.BlockDefinition.PhysicalMaterial.Id.SubtypeName);
        }
示例#3
0
 void IMyDecalProxy.OnAddDecal(uint decalId, ref MyDecalRenderData renderable)
 {
     // Do nothing
 }
 void IMyDecalProxy.OnAddDecal(uint decalId, ref MyDecalRenderData renderable)
 {
     CubeGrid.RenderData.AddDecal(Position, decalId);
 }
示例#5
0
 void IMyDecalProxy.GetDecalRenderData(MyHitInfo hitInfo, out MyDecalRenderData renderable)
 {
     // TODO
     renderable      = new MyDecalRenderData();
     renderable.Skip = true;
 }