write.bvh: This function saves object of mocap class to a file.

Description Usage Arguments Examples

Description

Function uses hierarchical model definition from hierarchy list however data of channels are taken from data frame.

Usage

1
write.bvh(skeleton.helper, path)

Arguments

skeleton.helper

mocap object to be save.

path

path to the file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  data("header.mocap")
  data("heian.shodan")
  heian.shodan.corrected <- calculate.kinematic(heian.shodan, show.plot = "TRUE", plot.title = "Heian Shodan")
  original.bvh <- set.data.frame(header.mocap, heian.shodan)
  corrected.bvh <- set.data.frame(header.mocap, heian.shodan.corrected)
  #plotting BVH
  plot(original.bvh, frames.fraction = 0.1, my.color = "red", alpha = 0.1, spheres = FALSE)
  plot(corrected.bvh, frames.fraction = 0.1, my.color = "green", alpha = 0.1, spheres = FALSE, append = TRUE)
  #writing BVH to disk
  write.bvh(original.bvh, "original.bvh")
  write.bvh(corrected.bvh, "corrected.bvh")

browarsoftware/RMoCap documentation built on May 16, 2019, 7:28 a.m.