using Decal.Interop.D3DService;

namespace Decal.Adapter.Wrappers;

public class D3DObj : GenericDisposableWrapper<CD3DObj>
{
	/// <summary>
	/// Colors
	/// </summary>
	public int Color
	{
		get
		{
			return base.Wrapped.color;
		}
		set
		{
			base.Wrapped.color = value;
		}
	}

	public int Color2
	{
		get
		{
			return base.Wrapped.color2;
		}
		set
		{
			base.Wrapped.color2 = value;
		}
	}

	/// <summary>
	/// Autoscale
	/// </summary>
	public bool Autoscale
	{
		get
		{
			return base.Wrapped.autoscale;
		}
		set
		{
			base.Wrapped.autoscale = value;
		}
	}

	/// <summary>
	/// DrawBackface
	/// </summary>
	public bool DrawBackface
	{
		get
		{
			return base.Wrapped.drawBackface;
		}
		set
		{
			base.Wrapped.drawBackface = value;
		}
	}

	/// <summary>
	/// HBounce
	/// </summary>
	public float HBounce
	{
		get
		{
			return base.Wrapped.hBounce;
		}
		set
		{
			base.Wrapped.hBounce = value;
		}
	}

	/// <summary>
	/// PBounce
	/// </summary>
	public float PBounce
	{
		get
		{
			return base.Wrapped.pBounce;
		}
		set
		{
			base.Wrapped.pBounce = value;
		}
	}

	/// <summary>
	/// PFade
	/// </summary>
	public float PFade
	{
		get
		{
			return base.Wrapped.pFade;
		}
		set
		{
			base.Wrapped.pFade = value;
		}
	}

	/// <summary>
	/// POrbit
	/// </summary>
	public float POrbit
	{
		get
		{
			return base.Wrapped.pOrbit;
		}
		set
		{
			base.Wrapped.pOrbit = value;
		}
	}

	/// <summary>
	/// PSpin
	/// </summary>
	public float PSpin
	{
		get
		{
			return base.Wrapped.pSpin;
		}
		set
		{
			base.Wrapped.pSpin = value;
		}
	}

	/// <summary>
	/// ROrbit
	/// </summary>
	public float ROrbit
	{
		get
		{
			return base.Wrapped.rOrbit;
		}
		set
		{
			base.Wrapped.rOrbit = value;
		}
	}

	/// <summary>
	/// ScaleX
	/// </summary>
	public float ScaleX
	{
		get
		{
			return base.Wrapped.scaleX;
		}
		set
		{
			base.Wrapped.scaleX = value;
		}
	}

	/// <summary>
	/// ScaleY
	/// </summary>
	public float ScaleY
	{
		get
		{
			return base.Wrapped.scaleY;
		}
		set
		{
			base.Wrapped.scaleY = value;
		}
	}

	/// <summary>
	/// ScaleZ
	/// </summary>
	public float ScaleZ
	{
		get
		{
			return base.Wrapped.scaleZ;
		}
		set
		{
			base.Wrapped.scaleZ = value;
		}
	}

	/// <summary>
	/// Visible
	/// </summary>
	public bool Visible
	{
		get
		{
			return base.Wrapped.visible;
		}
		set
		{
			base.Wrapped.visible = value;
		}
	}

	/// <summary>
	/// AnimationPhaseOffset
	/// </summary>
	public float AnimationPhaseOffset
	{
		get
		{
			return base.Wrapped.AnimationPhaseOffset;
		}
		set
		{
			base.Wrapped.AnimationPhaseOffset = value;
		}
	}

	public D3DObj(CD3DObj obj)
		: base(obj)
	{
	}

	protected override void Dispose(bool userCalled)
	{
		base.Dispose(userCalled);
	}

	public void Scale(float factor)
	{
		base.Wrapped.SetScale(factor);
	}

	/// <summary>
	/// Orients to the Camera
	/// </summary>
	/// <param name="VerticalTilt">Vertical Tilt</param>
	public void OrientToCamera(bool verticalTilt)
	{
		base.Wrapped.OrientToCamera(verticalTilt);
	}

	/// <summary>
	/// Orients to the specified Coordinates
	/// </summary>
	/// <param name="lat">Latitude</param>
	/// <param name="lng">Longitude</param>
	/// <param name="alt">Altitude</param>
	/// <param name="VerticalTilt">Vertical Tilt</param>
	public void OrientToCoords(float lat, float lng, float alt, bool verticalTilt)
	{
		base.Wrapped.OrientToCoords(lat, lng, alt, verticalTilt);
	}

	/// <summary>
	/// Orients to the specified Object
	/// </summary>
	/// <param name="guid">Object ID</param>
	/// <param name="fractHeight">Relative Position</param>
	/// <param name="VerticalTilt">Vertical Tilt</param>
	public void OrientToObject(int guid, float fractHeight, bool verticalTilt)
	{
		base.Wrapped.OrientToObject(guid, fractHeight, verticalTilt);
	}

	/// <summary>
	/// Orients to the Current Player
	/// </summary>
	/// <param name="VerticalTilt">Vertical Tilt</param>
	public void OrientToPlayer(bool verticalTilt)
	{
		base.Wrapped.OrientToPlayer(verticalTilt);
	}

	/// <summary>
	/// Anchors to the specified Coordinates
	/// </summary>
	/// <param name="lat">Latitude</param>
	/// <param name="lng">Longitude</param>
	/// <param name="alt">Altitude</param>
	public void Anchor(float lat, float lng, float alt)
	{
		base.Wrapped.AnchorToCoords(lat, lng, alt);
	}

	/// <summary>
	/// Anchors to the specified Object
	/// </summary>
	/// <param name="id">Object ID</param>
	/// <param name="height">Height</param>
	/// <param name="dx">x offset</param>
	/// <param name="dy">y offset</param>
	/// <param name="dz">z offset</param>
	public void Anchor(int id, float height, float dx, float dy, float dz)
	{
		base.Wrapped.AnchorToObject(id, height, dx, dy, dz);
	}

	/// <summary>
	/// Displays 2D text using the Arial font
	/// </summary>
	/// <param name="text">Text to display</param>
	public void SetText(string text)
	{
		SetText(D3DTextType.Text2D, text, "Arial", 0);
	}

	/// <summary>
	/// Displays 2D text using the specified font
	/// </summary>
	/// <param name="text">Text to display</param>
	/// <param name="fontName">Font to use</param>
	public void SetText(string text, string fontName)
	{
		SetText(D3DTextType.Text2D, text, fontName, 0);
	}

	/// <summary>
	/// Displays 2D text using the specified font and options
	/// </summary>
	/// <param name="text">Text to display</param>
	/// <param name="fontName">Font to use</param>
	/// <param name="options">Options</param>
	public void SetText(string text, string fontName, int options)
	{
		SetText(D3DTextType.Text2D, text, fontName, options);
	}

	/// <summary>
	/// Displays text
	/// </summary>
	/// <param name="type">Type of text (2D/3D)</param>
	/// <param name="text">Text to display</param>
	/// <param name="fontName">Font to use</param>
	/// <param name="options">Options</param>
	public void SetText(D3DTextType type, string text, string fontName, int options)
	{
		switch (type)
		{
		case D3DTextType.Text2D:
			base.Wrapped.Set2DText(text, fontName, options);
			break;
		case D3DTextType.Text3D:
			base.Wrapped.Set3DText(text, fontName, options);
			break;
		}
	}

	/// <summary>
	/// Sets the icon to the portal file id
	/// </summary>
	/// <param name="id">portal file id</param>
	public void SetIcon(int id)
	{
		base.Wrapped.SetIcon(id);
	}

	/// <summary>
	/// Sets the icon from the specified file
	/// </summary>
	/// <param name="fileName">file containing the icon</param>
	public void SetIcon(string fileName)
	{
		base.Wrapped.SetIconFromFile(fileName);
	}

	/// <summary>
	/// Sets the icon from a resource dll
	/// </summary>
	/// <param name="module">module handle of the dll</param>
	/// <param name="res">resource id</param>
	public void SetIcon(int module, int res)
	{
		base.Wrapped.SetIconFromResource(module, res);
	}

	/// <summary>
	/// Sets the shape to that specified
	/// </summary>
	/// <param name="shape">Shape to use</param>
	public void SetShape(D3DShape shape)
	{
		base.Wrapped.SetShape((eShape)shape);
	}

	/// <summary>
	/// Sets the shape to that contained in the file
	/// </summary>
	/// <param name="fileName">File containing the shape definition</param>
	public void SetShape(string fileName)
	{
		base.Wrapped.SetShapeFromFile(fileName);
	}

	/// <summary>
	/// Sets the shape from a resource dll
	/// </summary>
	/// <param name="module">module handle of the dll</param>
	/// <param name="res">resource id</param>
	public void SetShape(int module, int res)
	{
		base.Wrapped.SetShapeFromResource(module, res);
	}
}
