attempts to fix win32 build
This commit is contained in:
parent
fd3a43b751
commit
65e9303415
|
|
@ -16,8 +16,8 @@
|
|||
#include "indent.h"
|
||||
#include "config_event.h"
|
||||
#include "clockObject.h"
|
||||
#include "mathNumbers.h"
|
||||
#include <math.h>
|
||||
#include "deg_2_rad.h"
|
||||
#include "cmath.h"
|
||||
|
||||
TypeHandle PointerEventList::_type_handle;
|
||||
|
||||
|
|
@ -105,9 +105,9 @@ add_event(bool in_win, int xpos, int ypos, int seq, double time) {
|
|||
pe._dy = ypos - _events.back()._ypos;
|
||||
double ddx = pe._dx;
|
||||
double ddy = pe._dy;
|
||||
pe._length = sqrt(ddx*ddx + ddy*ddy);
|
||||
pe._length = csqrt(ddx*ddx + ddy*ddy);
|
||||
if (pe._length > 0.0) {
|
||||
pe._direction = normalize_angle(atan2(-ddy,ddx) * (180.0 / MathNumbers::pi));
|
||||
pe._direction = normalize_angle(rad_2_deg(catan2(-ddy,ddx)));
|
||||
} else {
|
||||
pe._direction = _events.back()._direction;
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ encircles(int x, int y) const {
|
|||
int last = tot_events-1;
|
||||
double dx = _events[last]._xpos - x;
|
||||
double dy = _events[last]._ypos - y;
|
||||
double lastang = atan2(dy, dx) * (180.0/MathNumbers::pi);
|
||||
double lastang = rad_2_deg(catan2(dy, dx));
|
||||
double total = 0.0;
|
||||
for (int i=last; (i>=0) && (total < 360.0) && (total > -360.0); i--) {
|
||||
dx = _events[i]._xpos - x;
|
||||
|
|
@ -145,7 +145,7 @@ encircles(int x, int y) const {
|
|||
if ((dx==0.0)&&(dy==0.0)) {
|
||||
continue;
|
||||
}
|
||||
double angle = atan2(dy,dx) * (180.0/MathNumbers::pi);
|
||||
double angle = rad_2_deg(catan2(dy,dx));
|
||||
double deltang = delta_angle(lastang, angle);
|
||||
if (deltang * total < 0.0) {
|
||||
total = 0.0;
|
||||
|
|
@ -197,7 +197,7 @@ total_turns(double sec) const {
|
|||
double PointerEventList::
|
||||
match_pattern(const string &ascpat, double rot, double seglen) {
|
||||
// Convert the pattern from ascii to a more usable form.
|
||||
pvector <double> pattern;
|
||||
vector_double pattern;
|
||||
parse_pattern(ascpat, pattern);
|
||||
|
||||
// Apply the rotation to the pattern.
|
||||
|
|
@ -214,7 +214,7 @@ match_pattern(const string &ascpat, double rot, double seglen) {
|
|||
// Description: Parses a pattern as used by match_pattern.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void PointerEventList::
|
||||
parse_pattern(const string &ascpat, pvector <double> &pattern) {
|
||||
parse_pattern(const string &ascpat, vector_double &pattern) {
|
||||
int chars = 0;
|
||||
double dir = 180.0;
|
||||
for (size_t i=0; i<ascpat.size(); i++) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include "pointerEvent.h"
|
||||
#include "typedReferenceCount.h"
|
||||
#include "eventParameter.h"
|
||||
#include "pvector.h"
|
||||
#include "vector_double.h"
|
||||
|
||||
class ModifierPointers;
|
||||
class Datagram;
|
||||
|
|
@ -67,7 +67,7 @@ public:
|
|||
void write(ostream &out, int indent_level = 0) const;
|
||||
|
||||
private:
|
||||
void parse_pattern(const string &ascpat, pvector <double> &pattern);
|
||||
void parse_pattern(const string &ascpat, vector_double &pattern);
|
||||
typedef pdeque<PointerEvent> Events;
|
||||
Events _events;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
#include "vector_double.h"
|
||||
|
||||
#define EXPCL EXPCL_PANDA_PUTIL
|
||||
#define EXPTP EXPTP_PANDA_PUTIL
|
||||
#define EXPCL EXPCL_PANDAEXPRESS
|
||||
#define EXPTP EXPTP_PANDAEXPRESS
|
||||
#define TYPE double
|
||||
#define NAME vector_double
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
#include "vector_float.h"
|
||||
|
||||
#define EXPCL EXPCL_PANDA_PUTIL
|
||||
#define EXPTP EXPTP_PANDA_PUTIL
|
||||
#define EXPCL EXPCL_PANDAEXPRESS
|
||||
#define EXPTP EXPTP_PANDAEXPRESS
|
||||
#define TYPE float
|
||||
#define NAME vector_float
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
#include "vector_uchar.h"
|
||||
|
||||
#define EXPCL EXPCL_PANDA
|
||||
#define EXPTP EXPTP_PANDA
|
||||
#define EXPCL EXPCL_PANDAEXPRESS
|
||||
#define EXPTP EXPTP_PANDAEXPRESS
|
||||
#define TYPE unsigned char
|
||||
#define NAME vector_uchar
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
#include "mathNumbers.h"
|
||||
|
||||
BEGIN_PUBLISH
|
||||
INLINE_LINMATH double deg_2_rad( double f ) { return f * MathNumbers::deg_2_rad; }
|
||||
INLINE_LINMATH double rad_2_deg( double f ) { return f * MathNumbers::rad_2_deg; }
|
||||
INLINE_LINMATH double deg_2_rad( double f ) { return f * MathNumbers::deg_2_rad_d; }
|
||||
INLINE_LINMATH double rad_2_deg( double f ) { return f * MathNumbers::rad_2_deg_d; }
|
||||
|
||||
INLINE_LINMATH float deg_2_rad( float f ) { return f * MathNumbers::deg_2_rad_f; }
|
||||
INLINE_LINMATH float rad_2_deg( float f ) { return f * MathNumbers::rad_2_deg_f; }
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "thread.h"
|
||||
#include "referenceCount.h"
|
||||
#include "pointerTo.h"
|
||||
#include "vector_double.h" // needed to see exported allocators for pdeque
|
||||
|
||||
class EXPCL_PANDA_PUTIL TimeVal {
|
||||
PUBLISHED:
|
||||
|
|
|
|||
Loading…
Reference in New Issue