Object::Object(vector f, vector c, vector b,float l){
mass=1.0;

	center=c;
yvelocity=0.050;
	velocity=vector(0.0,0.0,0.0);
	vector n(0.0,1.0,0.0);
	vector p=(f.Subtract(f,c));

	fp =l;
	head= f.Normalise(p);
	front=f.Add(head.ConstProduct(head,l),center);
	back=f.Add(head.ConstProduct(head,-l),center);
	sideNormal=f.Normalise(f.CrossProduct(head,n));

}
int GetTransformValuesArray(const WCHAR* str, vector<double>& values)
{
//	int len = str.GetLength();
	const WCHAR* p = str;

	while (*p && isspace(*p)) p++;	// Skip spaces

	//int i = 0;
	while (*p)
	{
		double value = getfnumber(&p);
		if (p == NULL)
		{
			values.RemoveAll();	// On error, make all values parsed so far invalid?
			return 0;
		}

			/*
		CWCharString str_value;
		while (*p && (*p != ',') && (*p != ' '))
		{
			str_value += *p;
			p++;
		}

		while (i < len && p[i] == ' ') i++;	// Skip spaces
		*/

		if (*p == L',') p++;

		//str_value.TrimRight();
		//str_value.TrimRight();

		//double value = atof(str_value);
		values.Add(value);

		while (*p && isspace(*p)) p++;	// Skip spaces
	}

	return values.GetSize();
}