text: // Auto-generated. Do not edit!
  
  // (in-package opencv_apps.msg)
  
  
  "use strict";
  
  const _serializer = _ros_msg_utils.Serialize;
  const _arraySerializer = _serializer.Array;
  const _deserializer = _ros_msg_utils.Deserialize;
  const _arrayDeserializer = _deserializer.Array;
  const _finder = _ros_msg_utils.Find;
  const _getByteLength = _ros_msg_utils.getByteLength;
  
  //-----------------------------------------------------------
  
  class Point2D {
    constructor(initObj={}) {
      if (initObj === null) {
        // initObj === null is a special case for deserialization where we don't initialize fields
        this.x = null;
        this.y = null;
      }
      else {
        if (initObj.hasOwnProperty('x')) {
          this.x = initObj.x
        }
        else {
          this.x = 0.0;
        }
        if (initObj.hasOwnProperty('y')) {
          this.y = initObj.y
        }
        else {
          this.y = 0.0;
        }
      }
    }
  
    static serialize(obj, buffer, bufferOffset) {
      // Serializes a message object of type Point2D
      // Serialize message field [x]
      bufferOffset = _serializer.float64(obj.x, buffer, bufferOffset);
      // Serialize message field [y]
      bufferOffset = _serializer.float64(obj.y, buffer, bufferOffset);
      return bufferOffset;
    }
  
    static deserialize(buffer, bufferOffset=[0]) {
      //deserializes a message object of type Point2D
      let len;
      let data = new Point2D(null);
      // Deserialize message field [x]
      data.x = _deserializer.float64(buffer, bufferOffset);
      // Deserialize message field [y]
      data.y = _deserializer.float64(buffer, bufferOffset);
      return data;
    }
  
    static getMessageSize(object) {
      return 16;
    }
  
    static datatype() {
      // Returns string type for a message object
      return 'opencv_apps/Point2D';
    }
  
    static md5sum() {
      //Returns md5sum for a message object
      return '209f516d3eb691f0663e25cb750d67c1';
    }
  
    static messageDefinition() {
      // Returns full string definition for message
      return `
      float64 x
      float64 y
      
      
      `;
    }
  
    static Resolve(msg) {
      // deep-construct a valid message object instance of whatever was passed in
      if (typeof msg !== 'object' || msg === null) {
        msg = {};
      }
      const resolved = new Point2D(null);
      if (msg.x !== undefined) {
        resolved.x = msg.x;
      }
      else {
        resolved.x = 0.0
      }
  
      if (msg.y !== undefined) {
        resolved.y = msg.y;
      }
      else {
        resolved.y = 0.0
      }
  
      return resolved;
      }
  };
  
  module.exports = Point2D;
  