fractorium/Source/Ember/VariationList.h
mfeemster bbc5d0c783 --User changes
-Highlight power is now on by default.
 -Allow for adjustments on the Flame tab to apply to all open flames in the file.
 -Add two new buttons to the color tab to randomize and toggle the xform color indices.
 -Remove the --strip option from EmberGenome. It was useless and was likely just a carry over from flam3 during its early debugging stages when testing strips.
 -Make randoms in EmberGenome have default dimensions of 1920 x 1080.
 -Prevent --inter and --rotate in EmberGenome from rotating backward before the first flame since it doesn't really make sense.
 -Ensure every loaded flame has at least one xform in it.
 -Change dark.qss to hide dotted selection outline around checkboxes. Users must reload it to take effect.

--Bug fixes
 -The saving of last.flame during editing was appending the file when it should have been replacing.
 -It was impossible for EmberGenome to create a random flame. It can now be done by specifying no arguments: EmberGenome.exe
 -Crossing in EmberGenome was not logging the performed actions to the edit Xml tag.
 -Apply sub batch size and fuse count to template files used on the command line.
 -Use new default filter types with template files.

--Code changes
 -Use cerr in SheepTools instead of cout.
 -Set m_SubBatchSize and m_FuseCount to default values in Ember::Clear().
 -Clean up some command line options text formatting.
2016-05-02 16:54:56 -07:00

60 lines
2.3 KiB
C++

#pragma once
#include "Variation.h"
/// <summary>
/// VariationList class.
/// </summary>
namespace EmberNs
{
/// <summary>
/// Since the list of variations is numerous, it's convenient to be able to make copies
/// of specific ones. This class holds a list of pointers to variation objects for every
/// variation available. Similar to the PaletteList class, a caller can look up a variation
/// by name or ID and retrieve a copy of it.
/// This class follows the singleton pattern.
/// All variations are deleted upon destruction.
/// Template argument expected to be float or double.
/// </summary>
template <typename T>
class EMBER_API VariationList: public Singleton<VariationList<T>>
{
public:
const Variation<T>* GetVariation(size_t index) const;
const Variation<T>* GetVariation(size_t index, eVariationType varType) const;
Variation<T>* GetVariationCopy(size_t index, T weight = 1) const;
Variation<T>* GetVariationCopy(size_t index, eVariationType varType, T weight = 1) const;
const Variation<T>* GetVariation(eVariationId id) const;
Variation<T>* GetVariationCopy(eVariationId id, T weight = 1) const;
const Variation<T>* GetVariation(const string& name) const;
Variation<T>* GetVariationCopy(const string& name, T weight = 1) const;
const ParametricVariation<T>* GetParametricVariation(size_t index) const;
const ParametricVariation<T>* GetParametricVariation(const string& name) const;
ParametricVariation<T>* GetParametricVariationCopy(eVariationId id, T weight = 1) const;
int GetVariationIndex(const string& name) const;
size_t Size() const;
size_t RegSize() const;
size_t PreSize() const;
size_t PostSize() const;
size_t ParametricSize() const;
const vector<Variation<T>*>& AllVars() const;
const vector<Variation<T>*>& RegVars() const;
const vector<Variation<T>*>& PreVars() const;
const vector<Variation<T>*>& PostVars() const;
SINGLETON_DERIVED_DECL(VariationList<T>);
private:
VariationList();
Variation<T>* MakeCopyWithWeight(const Variation<T>* var, T weight) const;
vector<Variation<T>*> m_Variations;//A list of pointers to dynamically allocated variation objects.
vector<Variation<T>*> m_RegVariations;
vector<Variation<T>*> m_PreVariations;
vector<Variation<T>*> m_PostVariations;
vector<ParametricVariation<T>*> m_ParametricVariations;//A list of pointers to elements in m_Variations which are derived from ParametricVariation.
};
}