-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ign -> gz Header Migration : ign-physics (#346)
* Move header files with git mv Signed-off-by: methylDragon <[email protected]> * Create redirection aliases Signed-off-by: methylDragon <[email protected]> * Migrate sources in src, test, examples, and include Signed-off-by: methylDragon <[email protected]> * Migrate CMake files Signed-off-by: methylDragon <[email protected]>
- Loading branch information
1 parent
b52a3f2
commit ce03083
Showing
185 changed files
with
9,311 additions
and
8,146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (C) 2022 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
#include <gz/physics/bullet-plugin/Export.hh> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (C) 2018 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
#ifndef GZ_PHYSICS_DARTSIM_WORLD_HH_ | ||
#define GZ_PHYSICS_DARTSIM_WORLD_HH_ | ||
|
||
#include <dart/simulation/World.hpp> | ||
|
||
#include <gz/physics/FeatureList.hh> | ||
|
||
namespace ignition { | ||
namespace physics { | ||
namespace dartsim { | ||
|
||
///////////////////////////////////////////////// | ||
class RetrieveWorld : public virtual Feature | ||
{ | ||
public: template <typename PolicyT, typename FeaturesT> | ||
class World : public virtual Feature::World<PolicyT, FeaturesT> | ||
{ | ||
/// \brief Get the underlying dartsim world for this World object. | ||
public: dart::simulation::WorldPtr GetDartsimWorld(); | ||
}; | ||
|
||
public: template <typename PolicyT> | ||
class Implementation : public virtual Feature::Implementation<PolicyT> | ||
{ | ||
public: virtual dart::simulation::WorldPtr GetDartsimWorld( | ||
const Identity &_worldID) = 0; | ||
}; | ||
}; | ||
|
||
///////////////////////////////////////////////// | ||
//! [feature template] | ||
template <typename PolicyT, typename FeaturesT> | ||
dart::simulation::WorldPtr RetrieveWorld::World<PolicyT, FeaturesT> | ||
::GetDartsimWorld() | ||
{ | ||
return this->template Interface<RetrieveWorld>() | ||
->GetDartsimWorld(this->identity); | ||
} | ||
//! [feature template] | ||
|
||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (C) 2022 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
#include <gz/physics/dartsim-plugin/Export.hh> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
heightmap/include/gz/physics/heightmap/HeightmapShape.hh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/* | ||
* Copyright (C) 2021 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
#ifndef GZ_PHYSICS_HEIGHTMAP_HEIGHTMAPSHAPE_HH_ | ||
#define GZ_PHYSICS_HEIGHTMAP_HEIGHTMAPSHAPE_HH_ | ||
|
||
#include <string> | ||
|
||
#include <gz/common/geospatial/HeightmapData.hh> | ||
|
||
#include <gz/physics/DeclareShapeType.hh> | ||
#include <gz/physics/Geometry.hh> | ||
|
||
namespace ignition | ||
{ | ||
namespace physics | ||
{ | ||
namespace heightmap | ||
{ | ||
IGN_PHYSICS_DECLARE_SHAPE_TYPE(HeightmapShape) | ||
|
||
///////////////////////////////////////////////// | ||
class GetHeightmapShapeProperties | ||
: public virtual FeatureWithRequirements<HeightmapShapeCast> | ||
{ | ||
public: template <typename PolicyT, typename FeaturesT> | ||
class HeightmapShape : public virtual Entity<PolicyT, FeaturesT> | ||
{ | ||
public: using Dimensions = | ||
typename FromPolicy<PolicyT>::template Use<LinearVector>; | ||
|
||
/// \brief Get the size of the heightmap in meters. | ||
/// \returns The size of the heightmap. | ||
public: Dimensions GetSize() const; | ||
}; | ||
|
||
public: template <typename PolicyT> | ||
class Implementation : public virtual Feature::Implementation<PolicyT> | ||
{ | ||
public: using Dimensions = | ||
typename FromPolicy<PolicyT>::template Use<LinearVector>; | ||
|
||
public: virtual Dimensions GetHeightmapShapeSize( | ||
const Identity &_heightmapID) const = 0; | ||
}; | ||
}; | ||
|
||
///////////////////////////////////////////////// | ||
/// \brief Attach a heightmap shape to a link. | ||
class AttachHeightmapShapeFeature | ||
: public virtual FeatureWithRequirements<HeightmapShapeCast> | ||
{ | ||
public: template <typename PolicyT, typename FeaturesT> | ||
class Link : public virtual Feature::Link<PolicyT, FeaturesT> | ||
{ | ||
public: using PoseType = | ||
typename FromPolicy<PolicyT>::template Use<Pose>; | ||
|
||
public: using Dimensions = | ||
typename FromPolicy<PolicyT>::template Use<LinearVector>; | ||
|
||
public: using ShapePtrType = HeightmapShapePtr<PolicyT, FeaturesT>; | ||
|
||
/// \brief Attach a heightmap shape to a link. | ||
/// \param[in] _name Shape's name. | ||
/// \param[in] _heightmapData Contains the 3D data for the heigthtmap. | ||
/// \param[in] _pose Position in the world. | ||
/// \param[in] _size Heightmap total size in meters. | ||
/// \param[in] _subSampling Increase sampling to improve resolution. | ||
public: ShapePtrType AttachHeightmapShape( | ||
const std::string &_name, | ||
const common::HeightmapData &_heightmapData, | ||
const PoseType &_pose, | ||
const Dimensions &_size, | ||
int _subSampling = 1); | ||
}; | ||
|
||
public: template <typename PolicyT> | ||
class Implementation : public virtual Feature::Implementation<PolicyT> | ||
{ | ||
public: using PoseType = | ||
typename FromPolicy<PolicyT>::template Use<Pose>; | ||
|
||
public: using Dimensions = | ||
typename FromPolicy<PolicyT>::template Use<LinearVector>; | ||
|
||
public: virtual Identity AttachHeightmapShape( | ||
const Identity &_linkID, | ||
const std::string &_name, | ||
const common::HeightmapData &_heightmapData, | ||
const PoseType &_pose, | ||
const Dimensions &_size, | ||
int _subSampling) = 0; | ||
}; | ||
}; | ||
} | ||
} | ||
} | ||
|
||
#include <gz/physics/heightmap/detail/HeightmapShape.hh> | ||
|
||
#endif // GZ_PHYSICS_HEIGHTMAP_HEIGHTMAPSHAPE_HH_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.