Go to the documentation of this file.
38 #ifndef FCL_SHAPE_PLANE_INL_H
39 #define FCL_SHAPE_PLANE_INL_H
92 return std::abs(n.dot(p) - d);
101 if(n[1] == (
S)0.0 && n[2] == (
S)0.0)
105 this->aabb_local.min_[0] = this->aabb_local.max_[0] = -d;
107 this->aabb_local.min_[0] = this->aabb_local.max_[0] = d;
109 else if(n[0] == (
S)0.0 && n[2] == (
S)0.0)
113 this->aabb_local.min_[1] = this->aabb_local.max_[1] = -d;
115 this->aabb_local.min_[1] = this->aabb_local.max_[1] = d;
117 else if(n[0] == (
S)0.0 && n[1] == (
S)0.0)
121 this->aabb_local.min_[2] = this->aabb_local.max_[2] = -d;
123 this->aabb_local.min_[2] = this->aabb_local.max_[2] = d;
126 this->aabb_center = this->aabb_local.center();
127 this->aabb_radius = (this->aabb_local.min_ - this->aabb_center).norm();
131 template <
typename S>
138 template <
typename S>
141 std::stringstream ss;
142 ss << std::setprecision(precision);
143 ss <<
"Plane<" << S_str <<
">(" << n[0] <<
", " << n[1] <<
", " << n[2]
144 <<
", " << d <<
");";
149 template <
typename S>
167 template <
typename S>
177 S d = a.
d + n.dot(tf.translation());
static const char * value()
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
NODE_TYPE getNodeType() const override
Get node type: a plane.
void unitNormalTest()
Turn non-unit normal into unit.
void computeLocalAABB() override
Compute AABB.
template Halfspace< double > transform(const Halfspace< double > &a, const Transform3< double > &tf)
S signedDistance(const Vector3< S > &p) const
Base class for all basic geometric shapes.
Eigen::Matrix< S, 3, 1 > Vector3
Vector3< S > n
Plane normal.
template class FCL_EXPORT Plane< double >
S distance(const Vector3< S > &p) const
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
std::string representation(int precision=20) const
Create a string that should be sufficient to recreate this shape. This is akin to the repr() implemen...
fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48