mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Starfield now generates stars at startup rather than load them from the server - approx. 50msec to load 50,000 stars. STAR_COLORIZATION const in Generator.cpp is used to defined how colorful the stars should be. STARFIELD_NUM_STARS and STARFIELD_SEED sets the number of stars and the random number seed used to generate the starfield.
37 lines
No EOL
744 B
C++
37 lines
No EOL
744 B
C++
//
|
|
// starfield/Generator.h
|
|
// interface
|
|
//
|
|
// Created by Chris Barnard on 10/13/13.
|
|
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
|
//
|
|
|
|
#ifndef __interface__starfield__Generator__
|
|
#define __interface__starfield__Generator__
|
|
|
|
#include <locale.h>
|
|
#include <time.h>
|
|
|
|
#include "Config.h"
|
|
#include "SharedUtil.h"
|
|
|
|
#include "starfield/data/InputVertex.h"
|
|
|
|
namespace starfield {
|
|
|
|
class Generator {
|
|
|
|
public:
|
|
Generator() {}
|
|
~Generator() {}
|
|
|
|
static void computeStarPositions(InputVertices& destination, unsigned limit, unsigned seed);
|
|
static unsigned computeStarColor(float colorization);
|
|
|
|
private:
|
|
static const float STAR_COLORIZATION;
|
|
|
|
};
|
|
|
|
}
|
|
#endif |