<commit_before>#pragma once
	/**
	*
	*  @file mmNode.h
	*  @brief MotionMachine header file for Node class.
	*  @copyright Numediart Institute, UMONS (c) 2014-2015
	*
	*/

#ifndef __mmBone__
#define __mmBone__

#include <cstring>
#include <armadillo>

	namespace MoMa {
#ifndef _PositionDimension_
#define _PositionDimension_
		enum PositionDimension {

			X, // Position or rotation @ x
			Y, // Position or rotation @ y
			Z, // Position or rotation @ z
			T // Index for the time-stamp
		};
#endif

#ifndef _RotationDimension_
#define _RotationDimension_
		enum RotationDimension {

			qX, // Quaternion @ x
			qY, // Quaternion @ y
			qZ, // Quaternion @ z
			qW // Quaternion @ w
		};
#endif
		class Bone {

		public:

			Bone(void); // Default constructor
			Bone(float x, float y, float z); // Other kinds of constructors
			Bone( float x, float y, float z, float qx, float qy, float qz, float qw );
			Bone(arma::vec coord, arma::vec rotation, arma::vec offsetRot, double length);
			Bone(arma::vec coord, arma::vec rot, std::vector< arma::vec> offsetRot, std::vector< double> lengths);

			void setPosition(float x, float y, float z); // Set position
			void setRotation( float x, float y, float z , float w); // Set rotation

			void setPosition(arma::vec pos); // Set position
			void setRotation( arma::vec rot); // Set rotation
			void setBoneData( std::vector<arma::vec> off, std::vector< double> lengths); // Set offset
			
			//inline void setBoneLength(std::vector<double> length) { this->boneLength = length; }; //we have the same number of length tnath the number of dest node 
			inline const int &getSize() const { return boneLength.size(); };
			inline const double & getBoneLength(int i) const { return boneLength[i]; };
			inline const arma::vec & getRotationOffset(int i) const { return rotationOffset[i]; };


			inline bool hasRotation( void ) const { return( _hasRotation ); } // Use rotation?
			inline void setRotationFlag( bool rot ) { _hasRotation = rot; } // Force it

			double time(void)const { return(_time); } // Get time
			bool hasTime(void)const { return(_hasTime); } // Flag
			inline void setTime(double t); // Set time tag

			std::string name(void) const { return(_name); } // Get name<commit_msg>fix compilation error in linux: do not return a ref. to a temporary<commit_after>#pragma once
	/**
	*
	*  @file mmNode.h
	*  @brief MotionMachine header file for Node class.
	*  @copyright Numediart Institute, UMONS (c) 2014-2015
	*
	*/

#ifndef __mmBone__
#define __mmBone__

#include <cstring>
#include <armadillo>

	namespace MoMa {
#ifndef _PositionDimension_
#define _PositionDimension_
		enum PositionDimension {

			X, // Position or rotation @ x
			Y, // Position or rotation @ y
			Z, // Position or rotation @ z
			T // Index for the time-stamp
		};
#endif

#ifndef _RotationDimension_
#define _RotationDimension_
		enum RotationDimension {

			qX, // Quaternion @ x
			qY, // Quaternion @ y
			qZ, // Quaternion @ z
			qW // Quaternion @ w
		};
#endif
		class Bone {

		public:

			Bone(void); // Default constructor
			Bone(float x, float y, float z); // Other kinds of constructors
			Bone( float x, float y, float z, float qx, float qy, float qz, float qw );
			Bone(arma::vec coord, arma::vec rotation, arma::vec offsetRot, double length);
			Bone(arma::vec coord, arma::vec rot, std::vector< arma::vec> offsetRot, std::vector< double> lengths);

			void setPosition(float x, float y, float z); // Set position
			void setRotation( float x, float y, float z , float w); // Set rotation

			void setPosition(arma::vec pos); // Set position
			void setRotation( arma::vec rot); // Set rotation
			void setBoneData( std::vector<arma::vec> off, std::vector< double> lengths); // Set offset
			
			//inline void setBoneLength(std::vector<double> length) { this->boneLength = length; }; //we have the same number of length tnath the number of dest node 
			inline const int getSize() const { return boneLength.size(); };
			inline const double & getBoneLength(int i) const { return boneLength[i]; };
			inline const arma::vec & getRotationOffset(int i) const { return rotationOffset[i]; };


			inline bool hasRotation( void ) const { return( _hasRotation ); } // Use rotation?
			inline void setRotationFlag( bool rot ) { _hasRotation = rot; } // Force it

			double time(void)const { return(_time); } // Get time
			bool hasTime(void)const { return(_hasTime); } // Flag
			inline void setTime(double t); // Set time tag

			std::string name(void) const { return(_name); } // Get name
{'fraction_non_alphanumeric': 0.12061742006615216, 'fraction_numerical': 0.0035281146637265713, 'mean_word_length': 3.5450901803607215, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2096429', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1417, 'n_words': 501}