S
Steven T. Hatton
Is there a way to initialize an member array of user defined objects that is
declared static const?
For example:
const vec3f I(1,0,0);
const vec3f j(0,1,0);
class corner_functor
{
public:
corner_functor();
~corner_functor();
static const Vec3f dir[5] = {-I, J, I, -J, -I};//This doesn't work
private:
int index;
};
I also tried some variations of this:
const SbVec3f* corner_functor::dir =
{
-I, J, I, -J, -I
};
declared static const?
For example:
const vec3f I(1,0,0);
const vec3f j(0,1,0);
class corner_functor
{
public:
corner_functor();
~corner_functor();
static const Vec3f dir[5] = {-I, J, I, -J, -I};//This doesn't work
private:
int index;
};
I also tried some variations of this:
const SbVec3f* corner_functor::dir =
{
-I, J, I, -J, -I
};