QUGaR 0.0.4
Loading...
Searching...
No Matches
ref_system.hpp
Go to the documentation of this file.
1// --------------------------------------------------------------------------
2//
3// Copyright (C) 2025-present by Pablo Antolin
4//
5// This file is part of the QUGaR library.
6//
7// SPDX-License-Identifier: MIT
8//
9// --------------------------------------------------------------------------
10
11#ifndef QUGAR_IMPL_REF_SYSTEM_HPP
12#define QUGAR_IMPL_REF_SYSTEM_HPP
13
20
21#include <qugar/point.hpp>
22
23namespace qugar::impl {
24
34template<int dim> class RefSystem
35{
36public:
44
51 explicit RefSystem(const Point<dim> &origin);
52
63 RefSystem(const Point<dim> &origin, const Point<dim> &axis);
64
79 template<int dim_aux = dim>
80 requires(dim_aux == dim && dim == 3)
81 RefSystem(const Point<dim> &origin, const Point<dim> &axis_x, const Point<dim> &axis_y);
82
83private:
90 RefSystem(const Point<dim> &origin, const std::array<Point<dim>, dim> &basis);
91
92public:
96 const Point<dim> &get_origin() const;
97
101 const std::array<Point<dim>, dim> &get_basis() const;
102
110 [[nodiscard]] bool is_Cartesian_oriented() const;
111
112private:
115
117 std::array<Point<dim>, dim> basis_;
118};
119
120
121}// namespace qugar::impl
122
123
124#endif// QUGAR_IMPL_REF_SYSTEM_HPP
A class representing a reference system in a given dimension.
Definition ref_system.hpp:35
const Point< dim > & get_origin() const
Gets the origin point of the reference system.
RefSystem(const Point< dim > &origin)
Constructs a RefSystem object with the specified origin point.
RefSystem()
Constructs a new RefSystem object.
const std::array< Point< dim >, dim > & get_basis() const
Gets the orthonormal basis of the reference system.
Point< dim > origin_
Origin.
Definition ref_system.hpp:114
std::array< Point< dim >, dim > basis_
Orthonormal basis.
Definition ref_system.hpp:117
RefSystem(const Point< dim > &origin, const Point< dim > &axis)
Constructs a reference system with a specified origin.
RefSystem(const Point< dim > &origin, const Point< dim > &axis_x, const Point< dim > &axis_y)
Constructs a reference system with a specified origin and two axes.
bool is_Cartesian_oriented() const
Checks if the reference system is Cartesian oriented.
RefSystem(const Point< dim > &origin, const std::array< Point< dim >, dim > &basis)
Constructs a reference system with a specified origin and basis.
Definition affine_transf.hpp:28
Vector< T, dim > Point
Class representing a dim-dimensional Point.
Definition point.hpp:34
Definition and implementation of Point class.