23#ifndef VCL_MESH_COMPONENTS_COORDINATE_H
24#define VCL_MESH_COMPONENTS_COORDINATE_H
26#include "bases/component.h"
28#include <vclib/concepts/mesh/components/coordinate.h>
29#include <vclib/space/core/point.h>
58template<Po
intConcept P,
typename ParentElemType =
void,
bool OPT = false>
61 Coordinate<P, ParentElemType, OPT>,
65 !std::is_same_v<ParentElemType, void>,
68 using Base = Component<
73 !std::is_same_v<ParentElemType, void>,
95 const P&
coord()
const {
return Base::data(); }
105 template<
typename Element>
106 void importFrom(
const Element& v,
bool =
true)
113 void serialize(std::ostream& os)
const {
coord().serialize(os); }
115 void deserialize(std::istream& is) {
coord().deserialize(is); }
132bool isCoordinateAvailableOn(
const ElementConcept
auto& element)
134 return isComponentAvailableOn<CompId::COORDINATE>(element);
152template<
typename Scalar,
typename ElementType =
void,
bool OPT = false>
167template<
typename ElementType =
void,
bool OPT = false>
182template<
typename ElementType =
void,
bool OPT = false>
The Element class.
Definition element.h:57
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The Coordinate class represents a N-Dimensional point that will be part of an Element (e....
Definition coordinate.h:67
P & coord()
Returns a reference of the coordinate of the element.
Definition coordinate.h:101
P CoordType
Expose the type of the Coordinate.
Definition coordinate.h:80
const P & coord() const
Returns a const reference of the coordinate of the element.
Definition coordinate.h:95
Coordinate()=default
Initilizes the Coordinate to (0, 0, 0).
HasCoordinate concept is satisfied only if a Element class provides the types and member functions sp...
Definition coordinate.h:39