1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
struct float3
{
float x;
float y;
float z;
/*
plusieurs fonctions ....
*/
}
float3* tableau = new float3[10];
tableau [0] = float3(0.0f, 0.0f,0.0f);
tableau [1] = float3(0.0f, 1.0f,0.0f);
tableau [2] = float3(1.0f, 1.0f,0.0f);
tableau [3] = float3(1.0f, 0.0f,0.0f);
.
.
.
struct vertex
{
float* pointeursTableau;
.
.
.
}
void function1(....)
{
vertex* ver = new vertex();
ver-> pointeursTableau = ????? // comment je fais pour dire que je veux par exemple 10% de 1, 30% de 3 et 15% de 7;
} |
Partager