/* // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0.If a copy of the MPL was not distributed with this // file, You can obtain one at https ://mozilla.org/MPL/2.0/. #include "AngleAxis.h" template AngleAxisOf::AngleAxisOf() { this->angle = 0.0F; this->axis = DirectionOf(); } template AngleAxisOf::AngleAxisOf(float angle, DirectionOf axis) { this->angle = angle; this->axis = axis; } template AngleAxisOf::AngleAxisOf(float angle, Vector3 axis) { this->angle = angle; this->axis = DirectionOf::FromVector3(axis); } template AngleAxisOf::AngleAxisOf(Quaternion q) { float angle; Vector3 axis; q.ToAngleAxis(&angle, &axis); this->angle = angle; this->axis = DirectionOf::FromVector3(axis); } template const AngleAxisOf AngleAxisOf::zero = AngleAxisOf(0.0, DirectionOf(AngleOf(), AngleOf())); template Quaternion AngleAxisOf::ToQuaternion() { Vector3 axisVector = this->axis.ToVector3(); Quaternion q = Quaternion::AngleAxis(this->angle, axisVector); return q; } template DirectionOf AngleAxisOf::GetSwing() { return this->axis; } template class AngleAxisOf; template class AngleAxisOf; */