/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */ /* Author(s): Anton Deguet Created on: 2005-01-31 (C) Copyright 2005-2020 Johns Hopkins University (JHU), All Rights Reserved. --- begin cisst license - do not edit --- This software is provided "as is" under an open source license, with no warranty. The complete license can be found in license.txt and http://www.cisst.org/cisst/license.txt. --- end cisst license --- */ #include #include #include #include #include #include #include #include template void vctRandom(vctMatrixRotation3Base<_containerType> & matrixRotation) { typedef typename _containerType::value_type value_type; vctQuaternionRotation3Base > quaternionRotation; vctRandom(quaternionRotation); matrixRotation.From(quaternionRotation); } template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctMatrixRotation3Base > &); template void vctRandom(vctQuaternionRotation3Base<_containerType> & quaternionRotation) { typedef typename _containerType::value_type value_type; vctRandom(quaternionRotation, (value_type) -1.0, (value_type) 1.0); quaternionRotation.NormalizedSelf(); } template void vctRandom(vctQuaternionRotation3Base > &); template void vctRandom(vctQuaternionRotation3Base > &); template void vctRandom(vctAxisAngleRotation3<_elementType> & axisAngleRotation) { typedef _elementType value_type; vctQuaternionRotation3Base > quaternionRotation; vctRandom(quaternionRotation); axisAngleRotation.FromRaw(quaternionRotation); } template void vctRandom(vctAxisAngleRotation3 &); template void vctRandom(vctAxisAngleRotation3 &); template void vctRandom(vctRodriguezRotation3Base<_containerType> & rodriguezRotation) { typedef typename _containerType::value_type value_type; vctAxisAngleRotation3 axisAngleRotation; vctRandom(axisAngleRotation); rodriguezRotation.FromRaw(axisAngleRotation); } template void vctRandom(vctRodriguezRotation3Base > &); template void vctRandom(vctRodriguezRotation3Base > &); template void vctRandom(vctEulerRotation3<_order> & eulerRotation) { vctRandom(eulerRotation.GetAngles(), -cmnPI, cmnPI); } template void vctRandom(vctEulerRotation3 &); template void vctRandom(vctEulerRotation3 &); template void vctRandom(vctEulerRotation3 &); template void vctRandom(vctEulerRotation3 &); template void vctRandom(vctMatrixRotation2Base<_containerType> & matrixRotation) { vctAngleRotation2 angleRotation; vctRandom(angleRotation); matrixRotation.From(angleRotation); } template void vctRandom(vctMatrixRotation2Base > &); template void vctRandom(vctMatrixRotation2Base > &); void vctRandom(vctAngleRotation2 & angleRotation) { cmnRandomSequence & randomSequence = cmnRandomSequence::GetInstance(); randomSequence.ExtractRandomValue(0.0, 2 * cmnPI, angleRotation.Angle()); }