Hi Allen,
Allen Bierbaum wrote:
> I would like to be able to convert between Matrix4f and Matrix4d. I
> didn't see a way to do this so I tried to add it in OSG::Matrix like this:
>
>
> template<class ValueTypeR>
> void convertFrom (const TransformationMatrix<ValueTypeR>&
> mat );
>
>
> template<class ValueTypeT, class ValueTypeR> inline
> void TransformationMatrix<ValueTypeT>::convertFrom(
> const TransformationMatrix<ValueTypeR>& mat)
> {
> for(UInt32 i = 0; i < 4; i++)
> {
> _matrix[i] = mat._matrix[i];
> }
> }
member function templates inside class templates need to defined like this:
template <class ValueTypeT>
template <class ValueTypeR>
inline void TransformationMatrix<ValueTypeT>::convertFrom(const
TransformationMatrix<ValueTypeR>& mat)
{
...
}
>
> This code did not compile because of problems with the template params.
> Can anyone tell me how to implement or even better yet suggest code that
> would work?
with that change it should work ;)
Carsten
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users