projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added copyright lines for files I've edited this year.
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
waypoint.h
diff --git
a/synfig-core/trunk/src/synfig/waypoint.h
b/synfig-core/trunk/src/synfig/waypoint.h
index
6315134
..
9a31f8b
100644
(file)
--- a/
synfig-core/trunk/src/synfig/waypoint.h
+++ b/
synfig-core/trunk/src/synfig/waypoint.h
@@
-1,28
+1,30
@@
-/* === S
I N F G ==
========================================================= */
+/* === S
Y N F I G
========================================================= */
/*! \file waypoint.h
** \brief Template Header
**
/*! \file waypoint.h
** \brief Template Header
**
-** $Id
: waypoint.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp
$
+** $Id$
**
** \legal
**
** \legal
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
**
**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
**
**
-**
You may not copy, print, publish, or in any
-**
other way distribute this software without
-**
a prior written agreement with
-**
the copyright holder
.
+**
This package is distributed in the hope that it will be useful,
+**
but WITHOUT ANY WARRANTY; without even the implied warranty of
+**
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+**
General Public License for more details
.
** \endlegal
*/
/* ========================================================================= */
/* === S T A R T =========================================================== */
** \endlegal
*/
/* ========================================================================= */
/* === S T A R T =========================================================== */
-#ifndef __S
INF
G_WAYPOINT_H
-#define __S
INF
G_WAYPOINT_H
+#ifndef __S
YNFI
G_WAYPOINT_H
+#define __S
YNFI
G_WAYPOINT_H
/* === H E A D E R S ======================================================= */
/* === H E A D E R S ======================================================= */
@@
-41,12
+43,12
@@
/* === C L A S S E S & S T R U C T S ======================================= */
/* === C L A S S E S & S T R U C T S ======================================= */
-namespace s
infg {
+namespace s
ynfig {
class ValueNode;
class GUID;
class ValueNode;
class GUID;
-
-
+
+
/*! \class Waypoint
** \brief \writeme
*/
/*! \class Waypoint
** \brief \writeme
*/
@@
-58,12
+60,12
@@
class Waypoint : public UniqueID
public:
public:
- typedef s
inf
g::Interpolation Interpolation;
+ typedef s
ynfi
g::Interpolation Interpolation;
class Model
{
friend class Waypoint;
class Model
{
friend class Waypoint;
-
+
int priority;
Interpolation before;
Interpolation after;
int priority;
Interpolation before;
Interpolation after;
@@
-71,11
+73,15
@@
public:
Real continuity;
Real bias;
Real temporal_tension;
Real continuity;
Real bias;
Real temporal_tension;
-
+
bool priority_flag,before_flag,after_flag,tension_flag,continuity_flag,bias_flag,temporal_tension_flag;
bool priority_flag,before_flag,after_flag,tension_flag,continuity_flag,bias_flag,temporal_tension_flag;
-
+
public:
Model():
public:
Model():
+ // we don't need to initialise these 5, but the compiler thinks they're used uninitialised if we don't
+ // and this constructor isn't called often, so it's ok
+ priority(0), tension(0), continuity(0), bias(0), temporal_tension(0),
+
priority_flag(false),
before_flag(false),
after_flag(false),
priority_flag(false),
before_flag(false),
after_flag(false),
@@
-83,27
+89,27
@@
public:
continuity_flag(false),
bias_flag(false),
temporal_tension_flag(false) { }
continuity_flag(false),
bias_flag(false),
temporal_tension_flag(false) { }
-
+
Interpolation get_before()const { return before; }
void set_before(Interpolation x) { before=x; before_flag=true;}
Interpolation get_before()const { return before; }
void set_before(Interpolation x) { before=x; before_flag=true;}
-
+
Interpolation get_after()const { return after; }
void set_after(Interpolation x) { after=x; after_flag=true;}
Interpolation get_after()const { return after; }
void set_after(Interpolation x) { after=x; after_flag=true;}
-
+
const Real &get_tension()const { return tension; }
void set_tension(const Real &x) { tension=x; tension_flag=true;}
const Real &get_tension()const { return tension; }
void set_tension(const Real &x) { tension=x; tension_flag=true;}
-
+
const Real &get_continuity()const { return continuity; }
void set_continuity(const Real &x) { continuity=x; continuity_flag=true;}
const Real &get_continuity()const { return continuity; }
void set_continuity(const Real &x) { continuity=x; continuity_flag=true;}
-
+
const Real &get_bias()const { return bias; }
void set_bias(const Real &x) { bias=x; bias_flag=true;}
const Real &get_temporal_tension()const { return temporal_tension; }
void set_temporal_tension(const Real &x) { temporal_tension=x; temporal_tension_flag=true;}
const Real &get_bias()const { return bias; }
void set_bias(const Real &x) { bias=x; bias_flag=true;}
const Real &get_temporal_tension()const { return temporal_tension; }
void set_temporal_tension(const Real &x) { temporal_tension=x; temporal_tension_flag=true;}
-
+
int get_priority()const { return priority; }
int get_priority()const { return priority; }
- void set_priority(int x) { priority=x; priority_flag=true;}
+ void set_priority(int x) { priority=x; priority_flag=true;}
#define FLAG_MACRO(x) bool get_##x##_flag()const { return x##_flag; } void set_##x##_flag(bool y) { x##_flag=y; }
FLAG_MACRO(priority)
#define FLAG_MACRO(x) bool get_##x##_flag()const { return x##_flag; } void set_##x##_flag(bool y) { x##_flag=y; }
FLAG_MACRO(priority)
@@
-114,7
+120,7
@@
public:
FLAG_MACRO(bias)
FLAG_MACRO(temporal_tension)
#undef FLAG_MACRO
FLAG_MACRO(bias)
FLAG_MACRO(temporal_tension)
#undef FLAG_MACRO
-
+
void reset()
{
priority_flag=false;
void reset()
{
priority_flag=false;
@@
-125,7
+131,7
@@
public:
bias_flag=false;
temporal_tension_flag=false;
}
bias_flag=false;
temporal_tension_flag=false;
}
-
+
bool is_trivial()const
{
return !(
bool is_trivial()const
{
return !(
@@
-139,22
+145,29
@@
public:
);
}
};
);
}
};
-
+
+ enum Side
+ {
+ SIDE_UNSPECIFIED, SIDE_LEFT, SIDE_RIGHT,
+
+ SIDE_END=2 //!< \internal
+ };
+
/*
-- ** -- D A T A -------------------------------------------------------------
*/
/*
-- ** -- D A T A -------------------------------------------------------------
*/
-
+
private:
private:
-
+
int priority_;
etl::loose_handle<ValueNode> parent_;
Interpolation before, after;
int priority_;
etl::loose_handle<ValueNode> parent_;
Interpolation before, after;
-
+
etl::rhandle<ValueNode> value_node;
Time time;
etl::rhandle<ValueNode> value_node;
Time time;
-
+
// The following are for the INTERPOLATION_TCB type
Real tension;
Real continuity;
// The following are for the INTERPOLATION_TCB type
Real tension;
Real continuity;
@@
-162,10
+175,10
@@
private:
// The following are for the INTERPOLATION_MANUAL type
ValueBase cpoint_before,cpoint_after;
// The following are for the INTERPOLATION_MANUAL type
ValueBase cpoint_before,cpoint_after;
-
+
float time_tension;
float time_tension;
-
+
/*
-- ** -- C O N S T R U C T O R S ---------------------------------------------
*/
/*
-- ** -- C O N S T R U C T O R S ---------------------------------------------
*/
@@
-174,7
+187,7
@@
public:
Waypoint(ValueBase value, Time time);
Waypoint(etl::handle<ValueNode> value_node, Time time);
Waypoint(ValueBase value, Time time);
Waypoint(etl::handle<ValueNode> value_node, Time time);
-
+
Waypoint();
/*
Waypoint();
/*
@@
-194,10
+207,10
@@
public:
ValueBase get_value()const;
ValueBase get_value(const Time &t)const;
void set_value(const ValueBase &x);
ValueBase get_value()const;
ValueBase get_value(const Time &t)const;
void set_value(const ValueBase &x);
-
+
const etl::rhandle<ValueNode> &get_value_node()const { return value_node; }
void set_value_node(const etl::handle<ValueNode> &x);
const etl::rhandle<ValueNode> &get_value_node()const { return value_node; }
void set_value_node(const etl::handle<ValueNode> &x);
-
+
const Real &get_tension()const { return tension; }
void set_tension(const Real &x) { tension=x; }
const Real &get_tension()const { return tension; }
void set_tension(const Real &x) { tension=x; }
@@
-215,27
+228,27
@@
public:
const etl::loose_handle<ValueNode> &get_parent_value_node()const { return parent_; }
void set_parent_value_node(const etl::loose_handle<ValueNode> &x) { parent_=x; }
const etl::loose_handle<ValueNode> &get_parent_value_node()const { return parent_; }
void set_parent_value_node(const etl::loose_handle<ValueNode> &x) { parent_=x; }
-
+
bool is_static()const;
float get_time_tension()const { return time_tension; }
void set_time_tension(const float& x) { time_tension=x; }
float get_temporal_tension()const { return time_tension; }
void set_temporal_tension(const float& x) { time_tension=x; }
bool is_static()const;
float get_time_tension()const { return time_tension; }
void set_time_tension(const float& x) { time_tension=x; }
float get_temporal_tension()const { return time_tension; }
void set_temporal_tension(const float& x) { time_tension=x; }
-
+
bool operator<(const Waypoint &rhs)const
{ return time<rhs.time; }
bool operator<(const Waypoint &rhs)const
{ return time<rhs.time; }
-
+
bool operator<(const Time &rhs)const
{ return time.is_less_than(rhs); }
bool operator>(const Time &rhs)const
{ return time.is_more_than(rhs); }
bool operator<(const Time &rhs)const
{ return time.is_less_than(rhs); }
bool operator>(const Time &rhs)const
{ return time.is_more_than(rhs); }
-
+
bool operator==(const Time &rhs)const
{ return time.is_equal(rhs); }
bool operator!=(const Time &rhs)const
{ return !time.is_equal(rhs); }
bool operator==(const Time &rhs)const
{ return time.is_equal(rhs); }
bool operator!=(const Time &rhs)const
{ return !time.is_equal(rhs); }
-
+
bool operator==(const UniqueID &rhs)const
{ return get_uid()==rhs.get_uid(); }
bool operator!=(const UniqueID &rhs)const
bool operator==(const UniqueID &rhs)const
{ return get_uid()==rhs.get_uid(); }
bool operator!=(const UniqueID &rhs)const
@@
-248,7
+261,7
@@
public:
typedef std::vector< Waypoint > WaypointList;
typedef std::vector< Waypoint > WaypointList;
-}; // END of namespace s
inf
g
+}; // END of namespace s
ynfi
g
/* === E N D =============================================================== */
/* === E N D =============================================================== */