Пример #1
0
        /// <summary>
        ///     Crea una caja con el centro y tamaño especificado
        /// </summary>
        /// <param name="center">Centro de la caja</param>
        /// <param name="size">Tamaño de la caja</param>
        /// <returns>Caja creada</returns>
        public static TGCBox fromSize(TGCVector3 center, TGCVector3 size)
        {
            var box = new TGCBox();

            box.setPositionSize(center, size);
            box.updateValues();
            return(box);
        }
Пример #2
0
        /// <summary>
        ///     Crear un nuevo TgcBox igual a este
        /// </summary>
        /// <returns>Box clonado</returns>
        public TGCBox clone()
        {
            var cloneBox = new TGCBox();

            cloneBox.setPositionSize(translation, size);
            cloneBox.Color = Color;
            if (Texture != null)
            {
                cloneBox.setTexture(Texture.Clone());
            }
            cloneBox.AutoTransformEnable = AutoTransformEnable;
            cloneBox.Transform           = Transform;
            cloneBox.rotation            = rotation;
            cloneBox.AlphaBlendEnable    = AlphaBlendEnable;
            cloneBox.UVOffset            = UVOffset;
            cloneBox.UVTiling            = UVTiling;

            cloneBox.updateValues();
            return(cloneBox);
        }