diff --git a/src/Aardvark.Base.Tensors.CSharp/PixImage/PixImageCube.cs b/src/Aardvark.Base.Tensors.CSharp/PixImage/PixImageCube.cs
index f25132b1..2a558db7 100644
--- a/src/Aardvark.Base.Tensors.CSharp/PixImage/PixImageCube.cs
+++ b/src/Aardvark.Base.Tensors.CSharp/PixImage/PixImageCube.cs
@@ -34,26 +34,50 @@ public enum CubeSideFlags
All = 0x3f,
}
+ ///
+ /// A cube map consisting of six image mipmaps.
+ ///
public class PixImageCube
{
- public PixImageMipMap[] MipMapArray;
+ ///
+ /// Array of image mipmaps representing the cube sides.
+ ///
+ public PixImageMipMap[] Sides;
- #region Constructor
+ #region Constructors
- public PixImageCube(PixImageMipMap[] mipMapArray)
- {
- MipMapArray = mipMapArray;
- }
+ ///
+ /// Creates a cube map from a mipmap array.
+ /// The order of the array follows the enumeration.
+ ///
+ /// An array of mipmaps representing the sides of the mipmap.
+ public PixImageCube(PixImageMipMap[] sides)
+ => Sides = sides;
+
+ ///
+ /// Creates a cube map from an image array.
+ /// The order of the array follows the enumeration.
+ ///
+ /// An array of images representing the sides of the mipmap.
+ public PixImageCube(PixImage[] sides)
+ => Sides = sides.Map(image => new PixImageMipMap(image));
#endregion
#region Properties
+ ///
+ /// Gets or sets an image mipmap of the sides array.
+ ///
public PixImageMipMap this[CubeSide side]
{
- get { return MipMapArray[(int)side]; }
+ get => Sides[(int)side];
+ set => Sides[(int)side] = value;
}
+ [Obsolete("Use Sides instead.")]
+ public PixImageMipMap[] MipMapArray => Sides;
+
#endregion
}
}
diff --git a/src/Aardvark.Base.Tensors/PixImage/PixImageCube.fs b/src/Aardvark.Base.Tensors/PixImage/PixImageCube.fs
index 401a8ebf..5660e9d3 100644
--- a/src/Aardvark.Base.Tensors/PixImage/PixImageCube.fs
+++ b/src/Aardvark.Base.Tensors/PixImage/PixImageCube.fs
@@ -11,7 +11,7 @@ module FSharpPixImageCubeExtensions =
member x.Transformed (m : CubeSide -> CubeSide * ImageTrafo) =
PixImageCube(
- x.MipMapArray
+ x.Sides
|> Array.mapi (fun i mipMap ->
let side = unbox i
let (newSide, trafo) = m side