aaa

Dependencies:   mbed BNO055_fusion Adafruit_GFX ros_lib_kinetic

type.h

Committer:
nakedt555
Date:
2018-12-07
Revision:
1:bdd17feaa4ce
Child:
2:086272a2da1c

File content as of revision 1:bdd17feaa4ce:

#ifndef _TYPE_H_
#define _TYPE_H_

#include <geometry_msgs/Point.h>

class Vec3f{
    private:
        float x_;
        float y_;
        float z_;
        geometry_msgs::Point data_;    
    
    public:
        //Constructor
        Vec3f(float x = 0.0f, float y = 0.0f, float z = 0.0f) : x_(x), y_(y), z_(z){
            //Create point msgs
            data_.x = x;
            data_.y = y;
            data_.z = z;
        }

        //Setter
        void x(float x){
            x_ = x;   
        }
        void y(float y){
            y_ = y;   
        }
        void z(float z){
            z_ = z;   
        }
        
        //Getter
        float x(){
            return x_;
        }
        float y(){
            return y_;
        }
        float z(){
            return z_;
        }
        
        geometry_msgs::Point get_point_msgs(){
            return data_;
        }
};

#endif