Drake
point_pair.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Eigen/Dense>
4 #include <Eigen/StdVector>
5 
6 #include "Element.h"
7 #include "drake/drakeCollision_export.h"
8 
9 namespace DrakeCollision {
10 
12 struct DRAKECOLLISION_EXPORT PointPair {
13  PointPair() {}
14 
15  PointPair(const Element* elementA, const Element* elementB,
16  const Eigen::Vector3d& ptA, const Eigen::Vector3d& ptB,
17  const Eigen::Vector3d& normal, double distance)
18  : elementA(elementA), elementB(elementB),
19  idA(elementA->getId()), idB(elementB->getId()),
20  ptA(ptA), ptB(ptB),
21  normal(normal),
22  distance(distance) {}
23 
25  const Element* elementA{nullptr};
26 
28  const Element* elementB{nullptr};
29 
31  ElementId idA{0};
32 
34  ElementId idB{0};
35 
37  Eigen::Vector3d ptA;
38 
40  Eigen::Vector3d ptB;
41 
44  Eigen::Vector3d normal;
45 
47  double distance{};
48 };
49 
50 } // namespace DrakeCollision
Eigen::Vector3d normal
Outwards normal on body B.
Definition: point_pair.h:44
PointPair(const Element *elementA, const Element *elementB, const Eigen::Vector3d &ptA, const Eigen::Vector3d &ptB, const Eigen::Vector3d &normal, double distance)
Definition: point_pair.h:15
Definition: Element.h:25
PointPair()
Definition: point_pair.h:13
Definition: bullet_model.cc:17
Eigen::Vector3d ptB
Collision point on the surface of body B.
Definition: point_pair.h:40
uintptr_t ElementId
Definition: Element.h:23
Structure containing the results of a collision query.
Definition: point_pair.h:12
Eigen::Vector3d ptA
Collision point on the surface of body A.
Definition: point_pair.h:37