I had written a console app for test SSE version Vector3,but its crash on line "m_minimum = val" in Region::setMinimum function.
The Scalar version has no problem.
Why?
Code: Select all
#include "stdafx.h"
#include <vector>
#include "Region.h"
int _tmain(int argc, _TCHAR* argv[])
{
std::vector<Region*> tmpArray;
for (int i = 0;i < 10;i ++)
{
Region* tmpRegion = new Region;
Vectormath::Aos::Vector3 tmpMin = Vectormath::Aos::Vector3(-0.6f,-0.6f,-0.6f);
tmpRegion->setMinimum(tmpMin);
tmpArray.push_back(tmpRegion);
}
system("pause");
return 0;
}
Code: Select all
#ifndef Region_h__
#define Region_h__
#include "vectormath_aos.h"
class Region
{
public:
void setMinimum( const Vectormath::Aos::Vector3& val )
{
m_minimum = val;
}
protected:
Vectormath::Aos::Vector3 m_minimum;
};
#endif // Region_h__