This class represent a asteroid with a 3D random fractal shape
This class represent a asteroid with a 3D random fractal shape. The fractal shape is stored in a mesh and it is generated, starting from a loaded base mesh (i.e. ast.raw or tetra.raw) and by recursively subdividing each face into four smaller faces.
Ast3DFract(char *filename="tetra.raw")
void Draw()
void Split(int seed, float strenght=1)
Point3f MidPoint( Point3f &p0, Point3f &p1, Point3f const &BC, int seed, float strengh)
BC - the BariCenter of the Asteroids; the perturbation is along the line from bc to the middlepoint
seed - a random seed to avoid to calculate always the same asteroid when starting from the same triangles...
stenght - the {strenght} of the perturbation when strenght == 0 the shape tends to a sphere, good values are in the [.2,2] range.
Alphabetic index HTML hierarchy of classes or Java