geometric representation of a cuboid
More...
#include <shapes.h>
|
| Cuboid () |
| constructor for initialization with all points set to [0,0,0]
|
|
| ~Cuboid () |
| virtual destructor
|
|
| Cuboid (Eigen::Vector3d p0, Eigen::Vector3d p1, Eigen::Vector3d p2, Eigen::Vector3d p3, Eigen::Vector3d p4, Eigen::Vector3d p5, Eigen::Vector3d p6, Eigen::Vector3d p7) |
| constructor from six provided points (vector3) More...
|
|
| Cuboid (std::vector< Eigen::Vector3d > points) |
| constructor from a std::vector of provided points More...
|
|
| Cuboid (Eigen::Vector3d center, Eigen::Vector3d size, Eigen::Quaterniond orientation) |
| constructor from a provided center point, size and orientation More...
|
|
const std::vector< Eigen::Vector3d > | vertices () const |
| getter for all vertices (vector3) of this cuboid More...
|
|
const Eigen::Vector3d | center () const |
| getter for the center point More...
|
|
const Rectangle | getRectangle (int face_idx) const |
| getter for one side corresponding to a provided index More...
|
|
const std::vector< Eigen::Vector3d > | intersectionRay (Ray r, double epsilon=1e-4) const |
| calculate the intersection between this cuboid and a provided ray within a given tolerance. Can result in 0, 1 or 2 intersection points More...
|
|
geometric representation of a cuboid
◆ Cuboid() [1/3]
mrs_lib::geometry::Cuboid::Cuboid |
( |
Eigen::Vector3d |
p0, |
|
|
Eigen::Vector3d |
p1, |
|
|
Eigen::Vector3d |
p2, |
|
|
Eigen::Vector3d |
p3, |
|
|
Eigen::Vector3d |
p4, |
|
|
Eigen::Vector3d |
p5, |
|
|
Eigen::Vector3d |
p6, |
|
|
Eigen::Vector3d |
p7 |
|
) |
| |
constructor from six provided points (vector3)
- Parameters
-
p0 | vector3 |
p1 | vector3 |
p2 | vector3 |
p3 | vector3 |
p4 | vector3 |
p5 | vector3 |
p6 | vector3 |
p7 | vector3 |
◆ Cuboid() [2/3]
mrs_lib::geometry::Cuboid::Cuboid |
( |
std::vector< Eigen::Vector3d > |
points | ) |
|
constructor from a std::vector of provided points
- Parameters
-
points | std::vector<vector3> |
◆ Cuboid() [3/3]
mrs_lib::geometry::Cuboid::Cuboid |
( |
Eigen::Vector3d |
center, |
|
|
Eigen::Vector3d |
size, |
|
|
Eigen::Quaterniond |
orientation |
|
) |
| |
constructor from a provided center point, size and orientation
- Parameters
-
center | vector3 |
size | vector3 |
orientation | quaternion |
◆ center()
const Eigen::Vector3d mrs_lib::geometry::Cuboid::center |
( |
| ) |
const |
getter for the center point
- Returns
- vector3
◆ getRectangle()
const Rectangle mrs_lib::geometry::Cuboid::getRectangle |
( |
int |
face_idx | ) |
const |
getter for one side corresponding to a provided index
- Parameters
-
face_idx | index of the side to lookup points for |
- Returns
- rectangle representing the cuboid side
◆ intersectionRay()
const std::vector< Eigen::Vector3d > mrs_lib::geometry::Cuboid::intersectionRay |
( |
Ray |
r, |
|
|
double |
epsilon = 1e-4 |
|
) |
| const |
calculate the intersection between this cuboid and a provided ray within a given tolerance. Can result in 0, 1 or 2 intersection points
- Parameters
-
r | ray to check intersection with |
epsilon | tolerance for the calculation |
- Returns
- std::vector<vector3> list of intersection points (depending on the geometry, can yield 0, 1 or 2 points)
◆ vertices()
const std::vector< Eigen::Vector3d > mrs_lib::geometry::Cuboid::vertices |
( |
| ) |
const |
getter for all vertices (vector3) of this cuboid
- Returns
- std::vector<vector3>
The documentation for this class was generated from the following files:
- include/mrs_lib/geometry/shapes.h
- src/geometry/shapes.cpp