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());