Ignition Physics

API Reference

2.0.0
GetBoundingBox.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef IGNITION_PHYSICS_GETBOUNDINGBOX_HH_
19 #define IGNITION_PHYSICS_GETBOUNDINGBOX_HH_
20 
25 
26 namespace ignition
27 {
28  namespace physics
29  {
31  using GetLinkBoundingBoxRequiredFeatures = FeatureList<
32  GetShapeBoundingBox,
33  GetShapeFromLink,
35  class IGNITION_PHYSICS_VISIBLE GetLinkBoundingBox
36  : public virtual
37  FeatureWithRequirements<GetLinkBoundingBoxRequiredFeatures>
38  {
39  public: template <typename PolicyT, typename FeaturesT>
40  class Link
41  : public virtual GetShapeFromLink::Link<PolicyT, FeaturesT>
42  {
43  public: using AlignedBoxType =
44  typename FromPolicy<PolicyT>::template Use<AlignedBox>;
45 
55  public: AlignedBoxType GetAxisAlignedBoundingBox(
56  const FrameID &_referenceFrame = FrameID::World()) const;
57  };
58  };
59 
65  class IGNITION_PHYSICS_VISIBLE GetModelBoundingBox
66  : public virtual
67  FeatureWithRequirements<GetModelBoundingBoxRequiredFeatures>
68  {
69  public: template <typename PolicyT, typename FeaturesT>
70  class Model
71  : public virtual GetLinkFromModel::Model<PolicyT, FeaturesT>
72  {
73  public: using AlignedBoxType =
74  typename FromPolicy<PolicyT>::template Use<AlignedBox>;
75 
85  public: AlignedBoxType GetAxisAlignedBoundingBox(
86  const FrameID &_referenceFrame = FrameID::World()) const;
87  };
88  };
89 
90  // see Shape.hh for GetShapeBoundingBox
91  }
92 }
93 
94 #include <ignition/physics/detail/GetBoundingBox.hh>
95 
96 #endif
Definition: GetBoundingBox.hh:35
If your feature is known to require any other features, then you should have your feature class inher...
Definition: FeatureList.hh:108
static const FrameID & World()
Get a reference to the world Frame.
This struct is used to conveniently convert from a policy to a geometric type. Example usage: ...
Definition: Geometry.hh:69
Definition: GetEntities.hh:211
This feature will apply frame semantics to Model objects.
Definition: FrameSemantics.hh:190
Definition: GetBoundingBox.hh:70
typename FromPolicy< PolicyT >::template Use< AlignedBox > AlignedBoxType
Definition: GetBoundingBox.hh:74
Definition: GetEntities.hh:208
FeatureList< GetShapeBoundingBox, GetShapeFromLink, LinkFrameSemantics > GetLinkBoundingBoxRequiredFeatures
Definition: GetBoundingBox.hh:34
Use a FeatureList to aggregate a list of Features.
Definition: FeatureList.hh:51
Definition: GetBoundingBox.hh:65
Container for specifying Frame IDs. We do not want to use a generic integer type for this...
Definition: FrameID.hh:46
This feature will apply frame semantics to Link objects.
Definition: FrameSemantics.hh:164