示例#1
0
 public Graphic_Shadow(ShadowData shadowInfo)
 {
     this.shadowInfo = shadowInfo;
     if (shadowInfo == null)
     {
         throw new ArgumentNullException("shadowInfo");
     }
     shadowMesh = ShadowMeshPool.GetShadowMesh(shadowInfo);
 }
        public static Mesh GetShadowMesh(float baseWidth, float baseHeight, float tallness)
        {
            int  key  = ShadowMeshPool.HashOf(baseWidth, baseHeight, tallness);
            Mesh mesh = default(Mesh);

            if (!ShadowMeshPool.shadowMeshDict.TryGetValue(key, out mesh))
            {
                mesh = MeshMakerShadows.NewShadowMesh(baseWidth, baseHeight, tallness);
                ShadowMeshPool.shadowMeshDict.Add(key, mesh);
            }
            return(mesh);
        }
 public static Mesh GetShadowMesh(ShadowData sha)
 {
     return(ShadowMeshPool.GetShadowMesh(sha.BaseX, sha.BaseZ, sha.BaseY));
 }
 public static Mesh GetShadowMesh(float baseEdgeLength, float tallness)
 {
     return(ShadowMeshPool.GetShadowMesh(baseEdgeLength, baseEdgeLength, tallness));
 }