Im trying to do some particle like system of a disc like shape. More of a cube shape comes out though.
Vertex vertices[1500];
for (unsigned int i = 0; i < 1500; ++i)
{
vertices.Color = (const float*)&Colors::Red;
vertices.Pos.x = GenSpherePointCorrect().x;
vertices.Pos.y = GenSpherePointCorrect().y;
vertices.Pos.z = GenSpherePointCorrect().z;
}
s
GenSpherePointCorrect()
{
float r = IvSqrt(rng.RandomFloat());
float theta = kTwoPI*rng.RandomFloat();
float sintheta, costheta;
IvSinCos(theta, sintheta, costheta);
Vector3 randomPos(2.0f*r*costheta, 2.0f*r*sintheta, 0.0f);
return randomPos;
}