Control Libraries 6.3.4
Loading...
Searching...
No Matches
Shape.cpp
1#include "state_representation/geometry/Shape.hpp"
2
3namespace state_representation {
4Shape::Shape(const StateType& type) : State(type) {}
5
6Shape::Shape(const StateType& type, const std::string& name, const std::string& reference_frame) :
7 State(type, name),
8 center_state_(CartesianPose(name, Eigen::Vector3d::Zero(), Eigen::Quaterniond::Identity(), reference_frame)) {}
9
10Shape::Shape(const Shape& shape) : State(shape), center_state_(shape.center_state_) {}
11
12std::ostream& operator<<(std::ostream& os, const Shape& shape) {
13 if (shape.is_empty()) {
14 os << "Empty Shape";
15 } else {
16 os << "Shape " << shape.get_name() << " with state:" << std::endl;
17 os << shape.get_center_state();
18 }
19 return os;
20}
21}
Class to define CartesianPose in cartesian space as 3D position and quaternion based orientation.
Shape(const StateType &type)
Constructor with a type.
Definition: Shape.cpp:4
Abstract class to represent a state.
Definition: State.hpp:25
Core state variables and objects.
std::ostream & operator<<(std::ostream &os, const Ellipsoid &ellipsoid)
Definition: Ellipsoid.cpp:185
StateType
The class types inheriting from State.
Definition: StateType.hpp:13