Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
ccbf3a16
Commit
ccbf3a16
authored
Sep 05, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete unused code
parent
71eda031
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
38 deletions
+8
-38
common/Charts/3DTransformation.js
common/Charts/3DTransformation.js
+8
-38
No files found.
common/Charts/3DTransformation.js
View file @
ccbf3a16
...
...
@@ -355,58 +355,28 @@ Processor3D.prototype.convertAndTurnPointRAngAx = function(x, y, z)
var
heightChart
=
this
.
heightCanvas
-
this
.
top
-
this
.
bottom
;
var
widthOriginalChart
=
this
.
widthCanvas
-
this
.
left
-
this
.
right
;
//aspectRatio
if
(
this
.
view3D
.
rAngAx
)
{
x
=
x
/
this
.
aspectRatioX
;
y
=
y
/
this
.
aspectRatioY
;
}
else
{
var
aspectRatio
=
(
widthOriginalChart
)
/
(
heightChart
);
x
=
x
/
aspectRatio
;
}
x
=
x
/
this
.
scaleX
;
y
=
y
/
this
.
scaleY
;
z
=
z
/
this
.
scaleZ
;
var
point3D
=
new
Point3D
(
x
,
y
,
z
,
this
);
this
.
scale
(
point3D
);
//diff
var
centerXDiff
=
heightChart
/
2
+
this
.
left
/
2
;
var
centerYDiff
=
heightChart
/
2
+
this
.
top
;
var
centerZDiff
=
this
.
depthPerspective
/
2
;
point3D
.
offset
(
-
centerXDiff
,
-
centerYDiff
,
-
centerZDiff
);
//rotate
var
matrixRotateAllAxis
;
if
(
!
this
.
view3D
.
rAngAx
)
matrixRotateAllAxis
=
this
.
_getMatrixRotateAllAxis
();
else
matrixRotateAllAxis
=
this
.
_shearXY
();
var
matrixRotateAllAxis
=
this
.
_shearXY
();
point3D
.
multiplyPointOnMatrix1
(
matrixRotateAllAxis
);
// diff camera for charts write into rect
point3D
.
offset
(
this
.
cameraDiffX
,
this
.
cameraDiffY
,
this
.
cameraDiffZ
);
//project
var
projectionPoint
=
point3D
;
if
(
!
this
.
view3D
.
rAngAx
)
{
var
projectiveMatrix
=
this
.
_getPerspectiveProjectionMatrix
(
1
/
(
this
.
rPerspective
));
projectionPoint
=
point3D
.
project
(
projectiveMatrix
);
}
//undiff
var
specialReverseDiff
=
this
.
widthCanvas
/
2
+
(
this
.
left
-
this
.
right
)
/
2
;
p
rojectionPoint
.
offset
(
specialReverseDiff
,
centerYDiff
,
centerZDiff
);
p
oint3D
.
offset
(
specialReverseDiff
,
centerYDiff
,
centerZDiff
);
return
{
x
:
p
rojectionPoint
.
x
,
y
:
projectionPoint
.
y
,
z
:
z
};
return
{
x
:
p
oint3D
.
x
,
y
:
point3D
.
y
,
z
:
z
};
};
Processor3D
.
prototype
.
convertAndTurnPointPerspective
=
function
(
x
,
y
,
z
,
isNScale
,
isNRotate
,
isNProject
)
...
...
@@ -420,12 +390,12 @@ Processor3D.prototype.convertAndTurnPointPerspective = function(x, y, z, isNScal
if
(
!
isNRotate
)
{
this
.
rotate
1
(
point3D
);
this
.
rotate
Perspective
(
point3D
);
}
if
(
!
isNProject
)
{
this
.
project
1
(
point3D
);
this
.
project
Perspective
(
point3D
);
}
return
{
x
:
point3D
.
x
,
y
:
point3D
.
y
,
z
:
point3D
.
z
};
...
...
@@ -443,7 +413,7 @@ Processor3D.prototype.scale = function(point3D)
},
Processor3D
.
prototype
.
rotate
1
=
function
(
point3D
)
Processor3D
.
prototype
.
rotate
Perspective
=
function
(
point3D
)
{
//diff
point3D
.
offset
((
-
this
.
widthCanvas
/
2
)
/
this
.
aspectRatioX
,
(
-
this
.
heightCanvas
/
2
)
/
this
.
aspectRatioY
,
0
);
...
...
@@ -455,7 +425,7 @@ Processor3D.prototype.rotate1 = function(point3D)
};
Processor3D
.
prototype
.
project
1
=
function
(
point3D
)
Processor3D
.
prototype
.
project
Perspective
=
function
(
point3D
)
{
//diff
point3D
.
offset
((
-
this
.
widthCanvas
/
2
)
/
this
.
aspectRatioX
,
(
-
this
.
heightCanvas
/
2
)
/
this
.
aspectRatioY
/** aspectRatio*/
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment