1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
This file is part of MXE.
See index.html for further information.
From e81074f3819bd5b10b047132cfa473516a547afd Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 30 Aug 2015 18:36:39 +0200
Subject: [PATCH] WCartesian3DChart: rename variables near and far
"near" and "far" are defined in minwindef.h (mingw-w64):
#define far
#define near
Error message:
wt-3.3.4/src/Wt/Chart/WCartesian3DChart.C:330:16: error:
expected primary-expression before '(' token
WVector4 far(
^
---
src/Wt/Chart/WCartesian3DChart.C | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/Wt/Chart/WCartesian3DChart.C b/src/Wt/Chart/WCartesian3DChart.C
index f028d75..c5fc675 100644
--- a/src/Wt/Chart/WCartesian3DChart.C
+++ b/src/Wt/Chart/WCartesian3DChart.C
@@ -321,34 +321,34 @@ void WCartesian3DChart::createRay(double x, double y, WVector3 &eye, WVector3 &d
invTransform =
#endif
invTransform.inverted();
- WVector4 near(
+ WVector4 near_(
x / width().value() * 2 - 1,
y / height().value() * (-2) + 1,
-1.0,
1.0
);
- WVector4 far(
- near.x(),
- near.y(),
+ WVector4 far_(
+ near_.x(),
+ near_.y(),
1.0,
1.0
);
- near = invTransform * near;
- far = invTransform * far;
- near = near / near.w();
- far = far / far.w();
- WVector4 ray = far - near;
+ near_ = invTransform * near_;
+ far_ = invTransform * far_;
+ near_ = near_ / near_.w();
+ far_ = far_ / far_.w();
+ WVector4 ray = far_ - near_;
ray.normalize();
#ifndef WT_TARGET_JAVA
direction = WVector3(ray.x(), ray.z(), ray.y());
- eye = WVector3(near.x(), near.z(), near.y());
+ eye = WVector3(near_.x(), near_.z(), near_.y());
#else
direction.setElement(0, ray.x());
direction.setElement(1, ray.z());
direction.setElement(2, ray.y());
- eye.setElement(0, near.x());
- eye.setElement(1, near.z());
- eye.setElement(2, near.y());
+ eye.setElement(0, near_.x());
+ eye.setElement(1, near_.z());
+ eye.setElement(2, near_.y());
#endif
}
--
1.7.10.4
|