AxisVector.h

#pragma once


#include "Vector.h" // < BaseClass >


namespace Robotics
{
    /// 軸ベクトル
    [ System::ComponentModel::TypeConverter( System::ComponentModel::ExpandableObjectConverter::typeid ) ]  // 拡張可能なオブジェクト
    public ref class AxisVector : public Vector
    {
    // Construction --------------------------------------------------------
    public:
        AxisVector( double x, double y, double z );
        explicit AxisVector( Vector^ vector );

    private:
        explicit AxisVector( System::Xml::XmlElement^ element );


    // Operation -----------------------------------------------------------
    public:
        virtual System::String^ ToString() override;

    // static
    public:
        static AxisVector^ Create( System::Xml::XmlElement^ element );


    // Overload ------------------------------------------------------------
    public:
        AxisVector^ operator-() new;

        static AxisVector^ operator*( Matrix^ rotationMatrix, AxisVector^ axisVector );


    // Attribute ===========================================================
    private:

    // static
        literal int DefaultDimension = 3;    ///< 既定の次元数
        literal double Precision = 1.0e-7;   ///< 計算精度


    // Property ------------------------------------------------------------
    public:
        /// X軸
        property double X
        {
            double get()
            {
                return this[ 1 ];
            }
        }

        /// Y軸
        property double Y
        {
            double get()
            {
                return this[ 2 ];
            }
        }

        /// Z軸
        property double Z
        {
            double get()
            {
                return this[ 3 ];
            }
        }
    };
}