using OSCADSharp.Transforms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OSCADSharp
{
public abstract class OSCADObject
{
#region Transforms
///
/// Applies Color and/or Opacity to this object
///
/// The name of the color to apply
/// The opacity from 0.0 to 1.0
/// A colorized object
public OSCADObject Color(string colorName, double opacity = 1.0)
{
return new ColoredObject(this, colorName, opacity);
}
///
/// Mirrors the object about a plane, as specified by the normal
///
/// The normal vector of the plane intersecting the origin of the object,
/// through which to mirror it.
/// A mirrored object
public OSCADObject Mirror(Vector3 normal)
{
return new MirroredObject(this, normal);
}
///
/// Resizes to a specified set of X/Y/Z dimensions
///
/// The X/Y/Z dimensions
/// A resized object
public OSCADObject Resize(Vector3 newsize)
{
return new ResizedObject(this, newsize);
}
///
/// Rotates about a specified X/Y/Z euler angle
///
/// The angle(s) to rotate
/// A rotated object
public OSCADObject Rotate(Vector3 angle)
{
return new RotatedObject(this, angle);
}
///
/// Rescales an object by an X/Y/Z scale factor
///
/// The scale to apply. For example 1, 2, 1 would yield 2x scale on the Y axis
/// A scaled object
public OSCADObject Scale(Vector3 scale)
{
return new ScaledObject(this, scale);
}
///
/// Translates an object by the specified amount
///
/// The vector upon which to translate (move object(s))
/// A translated object
public OSCADObject Translate(Vector3 translation)
{
return new TranslatedObject(this, translation);
}
#endregion
}
}