SOLA
Loading...
Searching...
No Matches
daisi
src
cpps
amr
amr_physical_properties.h
1
// Copyright 2023 The SOLA authors
2
//
3
// This file is part of DAISI.
4
//
5
// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6
// General Public License as published by the Free Software Foundation; version 2.
7
//
8
// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10
// Public License for more details.
11
//
12
// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13
// <https://www.gnu.org/licenses/>.
14
//
15
// SPDX-License-Identifier: GPL-2.0-only
16
17
#ifndef DAISI_CPPS_AMR_AMR_PHYSICAL_PROPERTIES_H_
18
#define DAISI_CPPS_AMR_AMR_PHYSICAL_PROPERTIES_H_
19
20
#include <vector>
21
22
#include "solanet/serializer/serialize.h"
23
24
namespace
daisi::cpps {
25
class
AmrPhysicalProperties
{
26
public
:
27
AmrPhysicalProperties
() =
default
;
28
AmrPhysicalProperties
(
double
weight_kg, std::vector<double> dimensions_m)
29
: dimensions_m_(std::move(dimensions_m)), weight_kg_(weight_kg) {}
30
32
double
getWeight
()
const
{
return
weight_kg_; }
33
34
// Get dimensions in meters
35
std::vector<double> getDimensions()
const
{
return
dimensions_m_; }
36
37
SERIALIZE(dimensions_m_, weight_kg_);
38
39
private
:
40
std::vector<double> dimensions_m_;
41
double
weight_kg_ = -1;
42
};
43
}
// namespace daisi::cpps
44
#endif
daisi::cpps::AmrPhysicalProperties
Definition
amr_physical_properties.h:25
daisi::cpps::AmrPhysicalProperties::getWeight
double getWeight() const
Get weight in kilograms.
Definition
amr_physical_properties.h:32
Generated by
1.9.8