using System;
using System.Collections.Generic;
using System.Text;
using gr2lib.core.interfaces;
using System.Diagnostics;
using System.ComponentModel;
namespace gr2lib.core.coretypes.implementation
{
#region public class ArtToolInfoVersion
///
/// ArtToolInfoVersion class
///
[Browsable(true)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ArtToolInfoVersion : IArtToolInfoVersion
{
///
/// default constructor
///
public ArtToolInfoVersion()
{
this.Major = 0;
this.Minor = 0;
}
///
/// default constructor - specify: Major, Minor
///
public ArtToolInfoVersion(int Major, int Minor)
{
this.Major = Major;
this.Minor = Minor;
}
private int _Major;
///
/// Get/set the major
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
[Browsable(true)]
public int Major
{
get { return _Major; }
set { _Major = value; }
}
private int _Minor;
///
/// Get/set the minor
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
[Browsable(true)]
public int Minor
{
get { return _Minor; }
set { _Minor = value; }
}
///
/// string representation
///
///
public override string ToString()
{
return string.Format("{0}.{1}", Major, Minor);
}
}
#endregion
#region public class ArtToolInfoVector
///
/// ArtToolInfoVector class
///
[Browsable(true)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class ArtToolInfoVector : IArtToolInfoVector
{
private Vector3 _Origin;
private Vector3 _Right;
private Vector3 _Up;
private Vector3 _Back;
///
/// default constructor
///
public ArtToolInfoVector()
{
this.Origin = new Vector3();
this.Right = new Vector3();
this.Up = new Vector3();
this.Back = new Vector3();
}
///
/// default constructor - specify: Origin, Right, Up, Back
///
public ArtToolInfoVector(Vector3 Origin, Vector3 Right, Vector3 Up, Vector3 Back)
{
this.Origin = Origin;
this.Right = Right;
this.Up = Up;
this.Back = Back;
}
///
/// Get/set the Origin
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
public Vector3 Origin { get { return _Origin; } set { _Origin = value; } }
///
/// Get/set the Right
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
public Vector3 Right { get { return _Right; } set { _Right = value; } }
///
/// Get/set the Up
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
public Vector3 Up { get { return _Up; } set { _Up = value; } }
///
/// Get/set the Back
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
public Vector3 Back { get { return _Back; } set { _Back = value; } }
///
/// get string representation
///
///
public override string ToString()
{
string format = "0.00";
string origin = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Origin.x, Origin.y, Origin.z) + "}";
string right = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Right.x, Right.y, Right.z) + "}";
string up = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Up.x, Up.y, Up.z) + "}";
string back = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Back.x, Back.y, Back.z) + "}";
return string.Format("{0} ; {1} ; {2} ; {3}", origin, right, up, back);
}
}
#endregion
///
/// ArtToolInfo class
///
//[Category("Art Tool Info")]
public class ArtToolInfo : IArtToolInfo
{
//private string _ParentResourceName;
///
/// Get's the parent resource name
///
protected internal string ParentResourceName { get { return "Art Tool Info"; } }
private string _fromArtToolName;
//private granny_int32 _artToolMajorRevision;
//private granny_int32 _artToolMinorRevision;
private float _unitsPerMeter;
//private Vector3 _Origin;
//private Vector3 _Right;
//private Vector3 _Up;
//private Vector3 _Back;
///
/// default constructor
///
public ArtToolInfo()
{
this.FromArtToolName = "";
this.ToolVersion = new ArtToolInfoVersion();
//this.ArtToolMajorRevision = 0;
//this.ArtToolMinorRevision = 0;
this.UnitsPerMeter = 1;
//this.ExtendedData = IntPtr.Zero;
//this.NativePointer = IntPtr.Zero;
this.Vector = new ArtToolInfoVector();
//this.Origin = new Vector3(0, 0, 0);
//this.Right = new Vector3(0, 0, 0);
//this.Up = new Vector3(0, 0, 0);
//this.Back = new Vector3(0, 0, 0);
}
#region IArtToolInfo Members
///
/// Get/set ArtTool Name
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
[CategoryAttribute("Art Tool Info")]
public string FromArtToolName { get { return _fromArtToolName; } set { _fromArtToolName = value; } }
/////
///// Get/set ArtTool Major
/////
//[RefreshPropertiesAttribute(RefreshProperties.All)]
//internal int ArtToolMajorRevision { get { return _ToolVersion.Major; } set { _ToolVersion.Major = value; } }
/////
///// Get/set ArtTool Minor
/////
//[RefreshPropertiesAttribute(RefreshProperties.All)]
//internal int ArtToolMinorRevision { get { return _ToolVersion.Minor; } set { _ToolVersion.Minor = value; } }
private ArtToolInfoVersion _ToolVersion;
///
/// Get/set ArtTool Version
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
[CategoryAttribute("Art Tool Info")]
[Browsable(true)]
public ArtToolInfoVersion ToolVersion { get { return _ToolVersion; } set { _ToolVersion = value; } }
///
///Get/set ArtTool UnitsPerMeter
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
//[Editor(typeof(UINumericEditor,float>), typeof(UITypeEditor))]
[CategoryAttribute("Art Tool Info")]
public float UnitsPerMeter { get { return _unitsPerMeter; } set { _unitsPerMeter = value; } }
/////
/////Get/set ArtTool Origin
/////
//[RefreshPropertiesAttribute(RefreshProperties.All)]
//internal Vector3 Origin { get { return Vector.Origin; } set { Vector.Origin = value; } }
/////
/////Get/set ArtTool Right
/////
//[RefreshPropertiesAttribute(RefreshProperties.All)]
//internal Vector3 Right { get { return Vector.Right; } set { Vector.Right = value; } }
/////
/////Get/set ArtTool Up
/////
//[RefreshPropertiesAttribute(RefreshProperties.All)]
//internal Vector3 Up { get { return Vector.Up; } set { Vector.Up = value; } }
/////
/////Get/set ArtTool Back
/////
//[RefreshPropertiesAttribute(RefreshProperties.All)]
//internal Vector3 Back { get { return Vector.Back; } set { Vector.Back = value; } }
private ArtToolInfoVector _Vector;
///
///Get/set ArtTool Vector
///
[RefreshPropertiesAttribute(RefreshProperties.All)]
[CategoryAttribute("Art Tool Info")]
[Browsable(true)]
public ArtToolInfoVector Vector
{
get { return _Vector; }
set { _Vector = value; }
}
#endregion
}
}