Exemple #1
0
void Node::calculate_quats(osg::ref_ptr<osg::Vec3Array> axis) {
	//To build the quaternion we use an axis and a rotation around that axis
	//from the bvh file. Since OSG uses premultiplication the order of the
	//rotations is build backwards
	for (unsigned int i = 0; i < freuler->size(); i++) {
		quat_arr.at(i) = osg::Quat(freuler->at(i)[2], axis->at(2),
				freuler->at(i)[1], axis->at(1), freuler->at(i)[0], axis->at(0));
	}
}
void PointCloud::from_osgVec3Array(
		const osg::ref_ptr<osg::Vec3Array>& in_cloud) {
	cloud->resize(in_cloud->size());
	for (unsigned int i = 0; i < in_cloud->size(); i++) {
		set_osg(i, in_cloud->at(i));
	}
}