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); }
void IMyDecalProxy.OnAddDecal(uint decalId, ref MyDecalRenderData renderable) { // Do nothing }
void IMyDecalProxy.OnAddDecal(uint decalId, ref MyDecalRenderData renderable) { CubeGrid.RenderData.AddDecal(Position, decalId); }
void IMyDecalProxy.GetDecalRenderData(MyHitInfo hitInfo, out MyDecalRenderData renderable) { // TODO renderable = new MyDecalRenderData(); renderable.Skip = true; }