Old code removal

This commit is contained in:
Emmanuel BENOîT 2017-11-16 08:36:05 +01:00
parent 555105feb8
commit 7f3eed227b

96
sync.hh
View file

@ -221,99 +221,3 @@ struct T_SyncManager
T_SyncCurves curves_;
T_Array< P_SyncCurveCache > curveCaches_;
};
/*============================================================================*/
// DISREGARD EVERYTHING BELOW, IT SUCKS!
/*============================================================================*/
#if 0
// Definition of a single input - id & range
struct T_SyncInputDfn
{
std::string identifier;
float min = -std::numeric_limits< float >::infinity( ),
max = std::numeric_limits< float >::infinity( );
T_SyncInputDfn( std::string const& identifier ,
const float min ,
const float max ) noexcept
: identifier( identifier ) , min( min ) , max( max )
{ }
};
using P_SyncInputDfn = std::unique_ptr< T_SyncInputDfn >;
/*============================================================================*/
// Definition of UI overrides for inputs
struct T_SyncUIOverride
{
enum E_Type {
FLOAT , VEC2 , VEC3 , VEC4 , INT ,
COLOR , COLOR_GRADING , CAMERA
};
std::string title;
E_Type type;
std::vector< std::string > inputs;
bool enabled;
};
using P_SyncUIOverride = std::unique_ptr< T_SyncUIOverride >;
using T_SyncUIOverrides = std::vector< P_SyncUIOverride >;
// UI override sections
struct T_SyncUISection;
using P_SyncUISection = std::unique_ptr< T_SyncUISection >;
using T_SyncUISections = std::vector< P_SyncUISection >;
struct T_SyncUISection
{
std::string title;
T_SyncUISections subsections;
T_SyncUIOverrides overrides;
};
/*============================================================================*/
struct T_SyncManager
{
float uDuration; // Duration - unit size
uint32_t iDuration; // Duration - total units
float duration( ) const noexcept
{ return uDuration * iDuration; }
// Sync manager data for an input may include a definition, a curve,
// or both. The idea behind supporting "curve only" is that a curve may
// have been defined for an input that has been removed temporarily
// (e.g. because some include was commented out), in which case we don't
// want to waste it.
struct T_Data
{
P_SyncInputDfn definition;
P_SyncCurveCache curve;
bool overriden;
};
// Data and ID<->index map
std::vector< T_Data > data;
std::map< std::string , uint32_t > posMap;
// Current time & values
float time;
std::vector< float > values;
// Root of the UI's tree
T_SyncUISections uiRoot;
void makeUI( );
bool wOverrides = false;
bool wCurves = false;
private:
void displayOvSections(
T_SyncUISections& sections ,
const bool topLevel = false );
void displayOvControls(
T_SyncUIOverrides& overrides );
};
#endif