Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
LSK_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
고다경
2020-06-15 21:44:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
956280ed737e046555c16f59492e2e6e412ba785
956280ed
1 parent
90a39221
트레이너 운동 읽기 수정
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
176 additions
and
20 deletions
sourcecode/capstone/Assets/Images/leg_90do_more.png
sourcecode/capstone/Assets/Images/leg_90do_more.png.meta
sourcecode/capstone/Assets/Scenes/humanoid.unity
sourcecode/capstone/Assets/Script/Move.cs
sourcecode/capstone/Assets/Images/leg_90do_more.png
0 → 100644
View file @
956280e
6.94 KB
sourcecode/capstone/Assets/Images/leg_90do_more.png.meta
0 → 100644
View file @
956280e
fileFormatVersion: 2
guid: 236b1154a0a5aad42b48db27aa516c86
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
sourcecode/capstone/Assets/Scenes/humanoid.unity
View file @
956280e
...
...
@@ -1205,6 +1205,77 @@ MonoBehaviour:
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
IfSpinelsStraight
---
!u!1
&938472432
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
938472433
}
-
component
:
{
fileID
:
938472435
}
-
component
:
{
fileID
:
938472434
}
m_Layer
:
5
m_Name
:
Trainee_text6
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
---
!u!224
&938472433
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
938472432
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1679758666
}
m_RootOrder
:
23
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
330
,
y
:
150
}
m_SizeDelta
:
{
x
:
250
,
y
:
30
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&938472434
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
938472432
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
1344c3c82d62a2a41a3576d8abb8e3ea
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_Maskable
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_Texture
:
{
fileID
:
2800000
,
guid
:
236b1154a0a5aad42b48db27aa516c86
,
type
:
3
}
m_UVRect
:
serializedVersion
:
2
x
:
0
y
:
0
width
:
1
height
:
1
---
!u!222
&938472435
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
938472432
}
m_CullTransparentMesh
:
0
---
!u!1
&972410871
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1760,6 +1831,7 @@ MonoBehaviour:
LegUp3
:
{
fileID
:
1484596775
}
SpineStraight4
:
{
fileID
:
1089006720
}
Great5
:
{
fileID
:
310358198
}
KneeDown6
:
{
fileID
:
938472432
}
ex_start
:
{
fileID
:
1723072947
}
---
!u!4
&1461362268
Transform
:
...
...
@@ -2279,6 +2351,7 @@ RectTransform:
-
{
fileID
:
5836630
}
-
{
fileID
:
1373649303
}
-
{
fileID
:
972410872
}
-
{
fileID
:
938472433
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
4
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
sourcecode/capstone/Assets/Script/Move.cs
View file @
956280e
...
...
@@ -64,7 +64,7 @@ public class Move : MonoBehaviour
public
GameObject
count3
;
public
GameObject
count2
;
public
GameObject
count1
;
public
GameObject
HipBalance1
,
PullHipBack2
,
LegUp3
,
SpineStraight4
,
Great5
;
public
GameObject
HipBalance1
,
PullHipBack2
,
LegUp3
,
SpineStraight4
,
Great5
,
KneeDown6
;
public
GameObject
ex_start
;
//lsy
...
...
@@ -169,7 +169,7 @@ public class Move : MonoBehaviour
lines_right
=
File
.
ReadAllLines
(
@"Trainer_txt/leg_right.txt"
);
Debug
.
Log
(
"읽음"
);
}
else
else
if
(
exercise
==
"Lunge"
)
{
lines
=
File
.
ReadAllLines
(
@"Trainer_txt/runzi_left.txt"
);
lines_right
=
File
.
ReadAllLines
(
@"Trainer_txt/runzi_right.txt"
);
...
...
@@ -186,6 +186,7 @@ public class Move : MonoBehaviour
LegUp3
.
SetActive
(
false
);
SpineStraight4
.
SetActive
(
false
);
Great5
.
SetActive
(
false
);
KneeDown6
.
SetActive
(
false
);
}
private
Dictionary
<
Kinect
.
JointType
,
Kinect
.
JointType
>
_BoneMap
=
new
Dictionary
<
Kinect
.
JointType
,
Kinect
.
JointType
>()
...
...
@@ -237,6 +238,8 @@ public class Move : MonoBehaviour
LegUp3
.
SetActive
(
false
);
SpineStraight4
.
SetActive
(
false
);
Great5
.
SetActive
(
false
);
KneeDown6
.
SetActive
(
false
);
}
else
if
(
timer
>=
1
&&
timer
<
2
)
{
count3
.
SetActive
(
false
);
...
...
@@ -249,6 +252,8 @@ public class Move : MonoBehaviour
LegUp3
.
SetActive
(
false
);
SpineStraight4
.
SetActive
(
false
);
Great5
.
SetActive
(
false
);
KneeDown6
.
SetActive
(
false
);
}
else
if
(
timer
>=
2
&&
timer
<
3
)
{
...
...
@@ -262,6 +267,8 @@ public class Move : MonoBehaviour
LegUp3
.
SetActive
(
false
);
SpineStraight4
.
SetActive
(
false
);
Great5
.
SetActive
(
false
);
KneeDown6
.
SetActive
(
false
);
}
else
{
...
...
@@ -500,11 +507,13 @@ public class Move : MonoBehaviour
{
great
=
"GREAT!"
;
Great5
.
SetActive
(
true
);
KneeDown6
.
SetActive
(
false
);
}
else
{
great
=
""
;
Great5
.
SetActive
(
false
);
KneeDown6
.
SetActive
(
true
);
}
//////////////운동 횟수 카운트//////////////////
...
...
@@ -543,18 +552,6 @@ public class Move : MonoBehaviour
}
IfSpineIsStraight
.
text
=
spinestraight
;
HipBalance
.
text
=
hipbal
;
//AngleLeftKnee.text = "왼쪽 무릎 각도: " + ReadAngles[3].ToString();
//AngleRightKnee.text = "오른쪽 무릎 각도: " + ReadAngles[4].ToString();
//KneeToeLeft.text = "올바르지 않은 자세: " + leftkneewarning;
//KneeToeRight.text = "올바르지 않은 자세: " + rightkneewarning;
PullHipBack
.
text
=
pullhipback
;
LeftLegUp
.
text
=
leftsidehighkick
;
RightLegUp
.
text
=
rightsidehighkick
;
Great
.
text
=
great
;
///////////////////////////
if
(
_BoneMap
.
ContainsKey
(
jt
))
...
...
@@ -652,12 +649,6 @@ public class Move : MonoBehaviour
Vector3
FootRight
=
new
Vector3
(
body
.
Joints
[
Kinect
.
JointType
.
FootRight
].
Position
.
X
,
body
.
Joints
[
Kinect
.
JointType
.
FootRight
].
Position
.
Y
,
body
.
Joints
[
Kinect
.
JointType
.
FootRight
].
Position
.
Z
);
Vector3
FootLeft
=
new
Vector3
(
body
.
Joints
[
Kinect
.
JointType
.
FootLeft
].
Position
.
X
,
body
.
Joints
[
Kinect
.
JointType
.
FootLeft
].
Position
.
Y
,
body
.
Joints
[
Kinect
.
JointType
.
FootLeft
].
Position
.
Z
);
/*
double AngleRightElbow = AngleBetweenTwoVectors(RightElbow - RightShoulder, RightElbow - RightWrist);
double AngleRightShoulder = AngleBetweenTwoVectors(UpVector, RightShoulder - RightElbow);
double AngleLeftElbow = AngleBetweenTwoVectors(LeftElbow - LeftShoulder, LeftElbow - LeftWrist);
double AngleLeftShoulder = AngleBetweenTwoVectors(UpVector, LeftShoulder - LeftElbow);
*/
double
StraightSpine
=
AngleBetweenTwoVectors
(
SpineShoulder
-
SpineMid
,
SpineBase
-
SpineMid
);
//스쿼트, 런지 - Joint 3개로도 가능
...
...
Please
register
or
login
to post a comment