Skip to content

Commit

Permalink
Merge pull request #67 from asalzburger/feat-backward-compatible-vies
Browse files Browse the repository at this point in the history
feat: backward compatibility
  • Loading branch information
asalzburger authored Apr 22, 2024
2 parents d69808b + cfdaa9d commit 05404f2
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions core/include/actsvg/core/views.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,21 @@ struct x_y {
}
return c;
}

/** A planar view operator, asuming a contour in x/y plane
*
* @tparam point3_container is a 3D-point container, where elements
* of a single p3 object can be accessed via [] operators
*
* @param vertices_ the vertices of the surface, they are
* assumed to be in global/display coorindates
*
* @return a 2D contour array
*/
template <typename point3_container>
contour operator()(const point3_container &vertices_) const {
return path(vertices_);
}
};

/// z_r projection view
Expand Down Expand Up @@ -132,6 +147,21 @@ struct z_r {
}
return c;
}

/** A planar view operator
*
* @tparam point3_container is a 3D-point container, where elements
* of a single p3 object can be accessed via [] operators
*
* @param vertices_ the vertices of the surface, they are
* assumed to be in global/display coorindates
*
* @return a 2D contour array
*/
template <typename point3_container>
contour operator()(const point3_container &vertices_) const {
return path(vertices_);
}
};

// z-phi projection view
Expand Down Expand Up @@ -202,6 +232,21 @@ struct z_phi {
}
return c;
}

/** A planar view operator
*
* @tparam point3_container is a 3D-point container, where elements
* of a single p3 object can be accessed via [] operators
*
* @param vertices_ the vertices of the surface, they are
* assumed to be in global/display coorindates
*
* @return a 2D contour array
*/
template <typename point3_container>
contour operator()(const point3_container &vertices_) const {
return path(vertices_);
}
};

// z_rphi projection view
Expand Down Expand Up @@ -253,6 +298,21 @@ struct z_rphi {
}
return c;
}

/** A planar view operator
*
* @tparam point3_container is a 3D-point container, where elements
* of a single p3 object can be accessed via [] operators
*
* @param vertices_ the vertices of the surface, they are
* assumed to be in global/display coorindates
*
* @return a 2D contour array
*/
template <typename point3_container>
contour operator()(const point3_container &vertices_) const {
return path(vertices_);
}
};

} // namespace views
Expand Down

0 comments on commit 05404f2

Please sign in to comment.