25#define PI 3.14159265358979323846
30static inline double convertDegreesToRadians(
double degrees)
32 const double convConst =
PI * 2.0 / 360.0;
34 return degrees * convConst;
40static inline double convertRadiansToDegrees(
double radians)
42 const double convConst = 360.0 / (
PI * 2.0);
44 return radians * convConst;
50template <
class T,
int W,
int H>
56 %apply T [] { T *values };
59 %apply T INPUT[] { T *values };
70 for (
int i = 0; i < W * H; i++)
88 for (
int i = 0; i < W * H; i++)
89 vec.push_back (vals [i]);
96 %apply T [] { T *values };
99 %apply T INPUT[] { T *values };
105 for (
int i = 0; i < W * H; i++)
107 m_values[i] = values[i];
115 %apply T &OUTPUT { T &value };
119 if (x >= W || x < 0 || y >= H || y < 0)
123 value = m_values[y * W + x];
132 if (x >= W || x < 0 || y >= H || y < 0)
136 m_values[y * W + x] = value;
bool setValue(int x, int y, const T &value)
Definition edlmath.h:130
CMatrix(T *values)
Definition edlmath.h:64
T * getValues()
Get all the values in the Matrix as a flat array.
Definition edlmath.h:76
CMatrix()
Definition edlmath.h:68
std::vector< T > getValuesVect()
Definition edlmath.h:81
bool getValue(int x, int y, T &value)
Definition edlmath.h:117
void setValues(T *values)
Set all the values as a flat array.
Definition edlmath.h:103
#define PI
Local definition of PI to 20 decimal places.
Definition edlmath.h:25
CMatrix< float, 3, 3 > SFMatrix3x3
Definition edlmath.h:145
#define _BEGIN_EDL_NAMESPACE
Definition edlnamespaces.h:75
#define _END_EDL_NAMESPACE
Definition edlnamespaces.h:76