示例#1
0
        /// <summary>
        /// Adds the specified triangles.
        /// </summary>
        /// <param name="assetValues">The asset values.</param>
        public void Add(AssetValues assetValues)
        {
            if (assetValues.InitializedTriangles)
            {
                this.TrianglesCount   += assetValues.TrianglesCount;
                this.TrianglesSurface += assetValues.TrianglesSurface;
            }

            if (assetValues.InitializedTexture)
            {
                this.TextureWidth  += assetValues.TextureWidth;
                this.TextureHeight += assetValues.TextureHeight;
                this.TextureArea   += assetValues.TextureArea;
            }
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AssetValues"/> struct.
        /// </summary>
        /// <param name="main">The main.</param>
        /// <param name="lod">The lod.</param>
        public AssetValues(AssetValues main, AssetValues lod)
        {
            if (lod.InitializedTriangles)
            {
                this.InitializedTriangles = true;
                this.TrianglesSize        = lod.TrianglesSize;
                this.TrianglesCount       = lod.TrianglesCount;
                this.TrianglesSurface     = lod.TrianglesSurface;
            }
            else if (main.InitializedTriangles)
            {
                this.InitializedTriangles = true;
                this.TrianglesSize        = main.TrianglesSize;
                this.TrianglesCount       = main.TrianglesCount;
                this.TrianglesSurface     = main.TrianglesSurface;
            }
            else
            {
                this.InitializedTriangles = false;
                this.TrianglesSize        = new Vector3();
                this.TrianglesCount       = 0;
                this.TrianglesSurface     = 0.0f;
            }

            if (lod.InitializedTexture)
            {
                this.InitializedTexture = true;
                this.TextureWidth       = lod.TextureWidth;
                this.TextureHeight      = lod.TextureHeight;
                this.TextureArea        = lod.TextureArea;
            }
            else if (main.InitializedTexture)
            {
                this.InitializedTexture = true;
                this.TextureWidth       = main.TextureWidth;
                this.TextureHeight      = main.TextureHeight;
                this.TextureArea        = main.TextureArea;
            }
            else
            {
                this.InitializedTexture = false;
                this.TextureWidth       = 0;
                this.TextureHeight      = 0;
                this.TextureArea        = 0;
            }
        }
示例#3
0
            /// <summary>
            /// Adds the specified triangles size.
            /// </summary>
            /// <param name="values">The values.</param>
            public void Add(AssetValues values)
            {
                this.TotalAssetCount++;

                if (values.InitializedTriangles && values.TrianglesSurface > 0.0)
                {
                    this.TrianglesAssetCount++;
                    this.trianglesCountValue   += values.TrianglesCount;
                    this.trianglesSurfaceValue += values.TrianglesSurface;
                }

                if (values.InitializedTexture && values.TextureArea > 0)
                {
                    this.TexturesAssetCount++;
                    this.texturesWidthValue  += values.TextureWidth;
                    this.texturesHeightValue += values.TextureHeight;
                    this.texturesAreaValue   += values.TextureArea;
                }
            }