Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
embodiment-learning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoftwareProjectVR17
embodiment-learning
Commits
0562abeb
Commit
0562abeb
authored
7 years ago
by
Alexis Iakovenko
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Replaced DataToString with a more flexible solution"
This reverts commit
db95213a
.
parent
37e40c85
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Assets/Record/Recorder.cs
+8
-15
8 additions, 15 deletions
Assets/Record/Recorder.cs
with
8 additions
and
15 deletions
Assets/Record/Recorder.cs
+
8
−
15
View file @
0562abeb
...
...
@@ -77,24 +77,17 @@ public class Recorder : MonoBehaviour
}
}
mStreamWriter
.
WriteLine
(
DataToString
(
VecToData
(
leftPalmPosition
)
,
VecToData
(
leftPalmRotation
)
,
VecToData
(
rightPalmPosition
)
,
VecToData
(
rightPalmRotation
))
)
;
mStreamWriter
.
WriteLine
(
DataToString
(
leftPalmPosition
,
leftPalmRotation
,
rightPalmPosition
,
rightPalmRotation
));
}
}
private
static
string
VecToData
(
Vector3
vec
)
{
return
string
.
Format
(
"{0} {1} {2}"
,
vec
.
x
,
vec
.
y
,
vec
.
z
);
}
private
static
string
DataToString
(
params
object
[]
list
)
{
string
[]
strs
=
new
string
[
list
.
Length
];
for
(
int
i
=
0
;
i
<
list
.
Length
;
i
++)
{
strs
[
i
]
=
list
[
i
].
ToString
();
}
return
string
.
Join
(
" "
,
strs
);
private
static
string
DataToString
(
Vector3
leftPalmPosition
,
Vector4
leftPalmRotation
,
Vector3
rightPalmPosition
,
Vector4
rightPalmRotation
)
{
return
string
.
Format
(
"{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14}"
,
Time
.
unscaledTime
,
leftPalmPosition
.
x
,
leftPalmPosition
.
y
,
leftPalmPosition
.
z
,
leftPalmRotation
.
x
,
leftPalmRotation
.
y
,
leftPalmRotation
.
z
,
leftPalmRotation
.
w
,
rightPalmPosition
.
x
,
rightPalmPosition
.
y
,
rightPalmPosition
.
z
,
rightPalmRotation
.
x
,
rightPalmRotation
.
y
,
rightPalmRotation
.
z
,
rightPalmRotation
.
w
);
}
public
void
UpdateGestureName
(
string
name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment