//#####################################################################
// Copyright 2006-2007, Geoffrey Irving, Craig Schroeder, Tamar Shinar, Eftychios Sifakis.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#include <Core/Vectors/TWIST.h>
#include <Core/Math_Tools/RANGE.h>
#include <Core/Random_Numbers/RANDOM_NUMBERS.h>
#include <Core/Read_Write/READ_WRITE.h>
#include <Core/Symbolics/SYMBOLIC.h>
namespace PhysBAM{
//#####################################################################
// Function Read
//#####################################################################
template<class TV> template<class RW> void TWIST<TV>::
Read(UNTYPED_ISTREAM<RW>& input)
{
    Read_Binary_Group(input,linear,angular);
}
//#####################################################################
// Function Write
//#####################################################################
template<class TV> template<class RW> void TWIST<TV>::
Write(UNTYPED_OSTREAM<RW>& output) const
{
    Write_Binary_Group(output,linear,angular);
}
//#####################################################################
// Function Fill_Uniform
//#####################################################################
template<class TV> void TWIST<TV>::
Fill_Uniform(RANDOM_NUMBERS<T>& rand,const RANGE<TV>& box)
{
    rand.Fill_Uniform(linear,box);
    rand.Fill_Uniform(angular,-1,1);
}
template void TWIST<VECTOR<SYMBOLIC,1> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<SYMBOLIC,1> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<SYMBOLIC,1> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<SYMBOLIC,1> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<SYMBOLIC,1> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<SYMBOLIC,1> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<SYMBOLIC,2> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<SYMBOLIC,2> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<SYMBOLIC,2> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<SYMBOLIC,2> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<SYMBOLIC,2> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<SYMBOLIC,2> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<SYMBOLIC,3> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<SYMBOLIC,3> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<SYMBOLIC,3> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<SYMBOLIC,3> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<SYMBOLIC,3> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<SYMBOLIC,3> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<double,1> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<double,1> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<double,1> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<double,1> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<double,1> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<double,1> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<double,2> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<double,2> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<double,2> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<double,2> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<double,2> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<double,2> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<double,3> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<double,3> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<double,3> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<double,3> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<double,3> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<double,3> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<float,1> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<float,1> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<float,1> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<float,1> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<float,1> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<float,1> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<float,2> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<float,2> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<float,2> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<float,2> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<float,2> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<float,2> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<float,3> >::Read(UNTYPED_ISTREAM<char>&);
template void TWIST<VECTOR<float,3> >::Read(UNTYPED_ISTREAM<double>&);
template void TWIST<VECTOR<float,3> >::Read(UNTYPED_ISTREAM<float>&);
template void TWIST<VECTOR<float,3> >::Write(UNTYPED_OSTREAM<char>&) const;
template void TWIST<VECTOR<float,3> >::Write(UNTYPED_OSTREAM<double>&) const;
template void TWIST<VECTOR<float,3> >::Write(UNTYPED_OSTREAM<float>&) const;
template void TWIST<VECTOR<double,1> >::Fill_Uniform(RANDOM_NUMBERS<double>&,RANGE<VECTOR<double,1> > const&);
template void TWIST<VECTOR<double,2> >::Fill_Uniform(RANDOM_NUMBERS<double>&,RANGE<VECTOR<double,2> > const&);
template void TWIST<VECTOR<double,3> >::Fill_Uniform(RANDOM_NUMBERS<double>&,RANGE<VECTOR<double,3> > const&);
template void TWIST<VECTOR<float,1> >::Fill_Uniform(RANDOM_NUMBERS<float>&,RANGE<VECTOR<float,1> > const&);
template void TWIST<VECTOR<float,2> >::Fill_Uniform(RANDOM_NUMBERS<float>&,RANGE<VECTOR<float,2> > const&);
template void TWIST<VECTOR<float,3> >::Fill_Uniform(RANDOM_NUMBERS<float>&,RANGE<VECTOR<float,3> > const&);
}
