public ICollection <TextureEntryFace> GetFaces(int face)
 {
     if (m_ParentInfo != null && m_TextureEntry == null)
     {
         TextureEntry te = m_ParentInfo.TextureEntry;
         m_TextureEntryLock.AcquireWriterLock(() =>
         {
             m_TextureEntry      = te;
             m_TextureEntryBytes = te.GetBytes();
             ObjectPart part     = m_Part;
             if (part != null)
             {
                 m_TextureEntryBytes_LimitsEnabled = te.GetBytes(part.IsFullbrightDisabled, (float)part.GlowLimitIntensity);
             }
             else
             {
                 m_TextureEntryBytes_LimitsEnabled = m_TextureEntryBytes;
             }
         });
     }
     if (face == ALL_SIDES)
     {
         var list = new List <TextureEntryFace>();
         for (uint i = 0; i < m_Part.NumberOfSides; ++i)
         {
             list.Add(m_TextureEntry[i]);
         }
         return(list);
     }
     else
     {
         return(new List <TextureEntryFace>
         {
             m_TextureEntry[(uint)face]
         });
     }
 }
예제 #2
0
 public byte[] GetBytes() => m_TextureEntry.GetBytes();