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
738e7eaa
Commit
738e7eaa
authored
Aug 12, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
draw verges without rotation(3d hbar)
parent
dea06aa1
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
196 additions
and
251 deletions
+196
-251
common/Charts/3DTransformation.js
common/Charts/3DTransformation.js
+48
-29
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+148
-222
No files found.
common/Charts/3DTransformation.js
View file @
738e7eaa
...
@@ -333,7 +333,7 @@ Processor3D.prototype.calculateZPositionCatAxis = function()
...
@@ -333,7 +333,7 @@ Processor3D.prototype.calculateZPositionCatAxis = function()
//***functions for complete transformation point***
//***functions for complete transformation point***
Processor3D
.
prototype
.
convertAndTurnPoint
=
function
(
x
,
y
,
z
,
isN
ot
Project
)
Processor3D
.
prototype
.
convertAndTurnPoint
=
function
(
x
,
y
,
z
,
isN
Scale
,
isNRotate
,
isN
Project
)
{
{
var
res
=
null
;
var
res
=
null
;
...
@@ -343,7 +343,7 @@ Processor3D.prototype.convertAndTurnPoint = function(x, y, z, isNotProject)
...
@@ -343,7 +343,7 @@ Processor3D.prototype.convertAndTurnPoint = function(x, y, z, isNotProject)
}
}
else
else
{
{
res
=
this
.
convertAndTurnPointPerspective
(
x
,
y
,
z
,
isN
ot
Project
);
res
=
this
.
convertAndTurnPointPerspective
(
x
,
y
,
z
,
isN
Scale
,
isNRotate
,
isN
Project
);
}
}
return
res
;
return
res
;
...
@@ -408,49 +408,68 @@ Processor3D.prototype.convertAndTurnPointRAngAx = function(x, y, z)
...
@@ -408,49 +408,68 @@ Processor3D.prototype.convertAndTurnPointRAngAx = function(x, y, z)
return
{
x
:
projectionPoint
.
x
,
y
:
projectionPoint
.
y
,
z
:
z
};
return
{
x
:
projectionPoint
.
x
,
y
:
projectionPoint
.
y
,
z
:
z
};
};
};
Processor3D
.
prototype
.
convertAndTurnPointPerspective
=
function
(
x
,
y
,
z
,
isN
ot
Project
)
Processor3D
.
prototype
.
convertAndTurnPointPerspective
=
function
(
x
,
y
,
z
,
isN
Scale
,
isNRotate
,
isN
Project
)
{
{
//aspectRatio
x
=
x
/
this
.
aspectRatioX
;
y
=
y
/
this
.
aspectRatioY
;
x
=
x
/
this
.
scaleX
;
y
=
y
/
this
.
scaleY
;
z
=
z
/
this
.
scaleZ
;
var
point3D
=
new
Point3D
(
x
,
y
,
z
,
this
);
var
point3D
=
new
Point3D
(
x
,
y
,
z
,
this
);
//diff
if
(
!
isNScale
)
var
centerZDiff
=
this
.
depthPerspective
/
2
;
{
this
.
scale
(
point3D
);
}
point3D
.
offset
((
-
this
.
widthCanvas
/
2
)
/
this
.
aspectRatioX
,
(
-
this
.
heightCanvas
/
2
)
/
this
.
aspectRatioY
/** aspectRatio*/
,
0
);
if
(
!
isNRotate
)
{
this
.
rotate1
(
point3D
);
}
if
(
!
isNProject
)
{
this
.
project1
(
point3D
);
}
return
{
x
:
point3D
.
x
,
y
:
point3D
.
y
,
z
:
point3D
.
z
};
};
Processor3D
.
prototype
.
scale
=
function
(
point3D
)
{
//aspectRatio
point3D
.
x
=
point3D
.
x
/
this
.
aspectRatioX
;
point3D
.
y
=
point3D
.
y
/
this
.
aspectRatioY
;
point3D
.
x
=
point3D
.
x
/
this
.
scaleX
;
point3D
.
y
=
point3D
.
y
/
this
.
scaleY
;
point3D
.
z
=
point3D
.
z
/
this
.
scaleZ
;
},
Processor3D
.
prototype
.
rotate1
=
function
(
point3D
)
{
//diff
point3D
.
offset
((
-
this
.
widthCanvas
/
2
)
/
this
.
aspectRatioX
,
(
-
this
.
heightCanvas
/
2
)
/
this
.
aspectRatioY
,
0
);
//rotate
//rotate
var
matrixRotateAllAxis
;
var
matrixRotateAllAxis
=
this
.
_getMatrixRotateAllAxis
();
if
(
!
this
.
view3D
.
rAngAx
)
matrixRotateAllAxis
=
this
.
_getMatrixRotateAllAxis
();
else
matrixRotateAllAxis
=
this
.
_shearXY
();
point3D
.
multiplyPointOnMatrix1
(
matrixRotateAllAxis
);
point3D
.
multiplyPointOnMatrix1
(
matrixRotateAllAxis
);
point3D
.
offset
((
this
.
widthCanvas
/
2
)
/
this
.
aspectRatioX
,
(
this
.
heightCanvas
/
2
)
/
this
.
aspectRatioY
,
0
);
};
Processor3D
.
prototype
.
project1
=
function
(
point3D
)
{
//diff
point3D
.
offset
((
-
this
.
widthCanvas
/
2
)
/
this
.
aspectRatioX
,
(
-
this
.
heightCanvas
/
2
)
/
this
.
aspectRatioY
/** aspectRatio*/
,
0
);
// diff camera for charts write into rect
// diff camera for charts write into rect
point3D
.
offset
(
this
.
cameraDiffX
,
this
.
cameraDiffY
,
this
.
cameraDiffZ
);
point3D
.
offset
(
this
.
cameraDiffX
,
this
.
cameraDiffY
,
this
.
cameraDiffZ
);
//project
//project
var
projectionPoint
=
point3D
;
var
projectiveMatrix
=
this
.
_getPerspectiveProjectionMatrix
(
1
/
(
this
.
rPerspective
));
if
(
!
this
.
view3D
.
rAngAx
&&
!
isNotProject
)
point3D
.
project
(
projectiveMatrix
);
{
var
projectiveMatrix
=
this
.
_getPerspectiveProjectionMatrix
(
1
/
(
this
.
rPerspective
));
projectionPoint
=
point3D
.
project
(
projectiveMatrix
);
}
//undiff
//undiff
var
specialReverseDiffX
=
this
.
widthCanvas
/
2
+
(
this
.
left
-
this
.
right
)
/
2
;
var
specialReverseDiffX
=
this
.
widthCanvas
/
2
+
(
this
.
left
-
this
.
right
)
/
2
;
var
specialReverseDiffY
=
this
.
heightCanvas
/
2
+
(
this
.
top
-
this
.
bottom
)
/
2
;
var
specialReverseDiffY
=
this
.
heightCanvas
/
2
+
(
this
.
top
-
this
.
bottom
)
/
2
;
projectionPoint
.
offset
(
specialReverseDiffX
,
specialReverseDiffY
,
centerZDiff
);
point3D
.
offset
(
specialReverseDiffX
,
specialReverseDiffY
,
0
);
return
{
x
:
projectionPoint
.
x
,
y
:
projectionPoint
.
y
,
z
:
projectionPoint
.
z
};
};
};
//functions for step transformation point
//functions for step transformation point
...
...
common/Charts/ChartsDrawer.js
View file @
738e7eaa
This diff is collapsed.
Click to expand it.
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