Subversion Repositories gelsvn

Rev

Rev 39 | Rev 125 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 39 Rev 47
Line 100... Line 100...
100
			Allocate();
100
			Allocate();
101
			memcpy(Data,Rhs.Data,nElems*sizeof(T));
101
			memcpy(Data,Rhs.Data,nElems*sizeof(T));
102
		}
102
		}
103
 
103
 
104
		///Copy constructor from Vec2Type
104
		///Copy constructor from Vec2Type
105
		template <class TT, class V, int N> 
105
		template <class TT, class V, unsigned int N> 
106
		CVectorType<T>(const CGLA::ArithVec<TT,V,N>& Rhs):nElems(N)
106
		CVectorType<T>(const CGLA::ArithVec<TT,V,N>& Rhs):nElems(N)
107
		{
107
		{
108
			Allocate(); 
108
			Allocate(); 
109
			for(int i=0;i<N;++i)
109
			for(int i=0;i<N;++i)
110
				Data[i]=Rhs[i];
110
				Data[i]=Rhs[i];
Line 119... Line 119...
119
			Note that the vector is resized if it does not have the correct size.
119
			Note that the vector is resized if it does not have the correct size.
120
		*/
120
		*/
121
		//@{
121
		//@{
122
		CVectorType<T>& operator=(const T& Rhs) {SetScalar(Rhs);return *this;}
122
		CVectorType<T>& operator=(const T& Rhs) {SetScalar(Rhs);return *this;}
123
 
123
 
124
		template <class TT, class V, int N> 
124
		template <class TT, class V, unsigned int N> 
125
		CVectorType<T>& operator=(const CGLA::ArithVec<TT,V,N>& Rhs)
125
		CVectorType<T>& operator=(const CGLA::ArithVec<TT,V,N>& Rhs)
126
		{
126
		{
127
			Resize(N);
127
			Resize(N);
128
			for(int i=0;i<N;++i)
128
			for(int i=0;i<N;++i)
129
				Data[i]=Rhs[i];
129
				Data[i]=Rhs[i];