luxcore::Scene::DefineMesh parameters
Posted: Mon Oct 26, 2020 12:12 pm
Hi Guys,
could you be so kind and tell me what should I pass to define normals in funcion DefineMesh?
I should pass one normal / triangle or one normal / vertex?
I'm trying with a simple cube taken from example: luxcorescenedemo.cpp
DefineMesh("myName", 24, 12, float[24 * 3], uint[12 * 3], null, null, null, null). -> works corectly
float[] normals = float[24 * 3];
for (int i = 0; i < 24; i++) //init with some default values
{
normals[i *3] = 0; normals[i *3 + 1] = 0; normals[i *3 + 2] = 1;
}
DefineMesh("myName", 24, 12, float[24 * 3], uint[12 * 3], normals, null, null, null). -> gives me segmentation fault when I start rendering
could you be so kind and tell me what should I pass to define normals in funcion DefineMesh?
I should pass one normal / triangle or one normal / vertex?
I'm trying with a simple cube taken from example: luxcorescenedemo.cpp
DefineMesh("myName", 24, 12, float[24 * 3], uint[12 * 3], null, null, null, null). -> works corectly
float[] normals = float[24 * 3];
for (int i = 0; i < 24; i++) //init with some default values
{
normals[i *3] = 0; normals[i *3 + 1] = 0; normals[i *3 + 2] = 1;
}
DefineMesh("myName", 24, 12, float[24 * 3], uint[12 * 3], normals, null, null, null). -> gives me segmentation fault when I start rendering