|
AGX Dynamics
2.37.2.0
|
A TileSpecification determines where in the world a 2D TileId is located and contains utility methods for coordinate transforms. More...
#include <TileSpecification.h>
Public Member Functions | |
| TileSpecification (agx::Vec3 refPoint, agx::Quat refRotation, agx::Real tileSize, size_t marginSize, size_t resolution, agx::Real maxDepth) | |
| Constructor. More... | |
| TileSpecification () | |
| agx::Vec3 | convertTilePositionToWorld (agxTerrain::TileId id, agx::Vec2 tilePos) const |
| Convert a local position in a tile to world coordinates. More... | |
| agx::Vec3 | convertTilePositionToWorld (agxTerrain::TileId id, agx::Vec3 tilePos) const |
| The 2D version of this method is the same as calling this method with agx::Vec3(x,y,0) More... | |
| agxTerrain::TileId | convertWorldCoordinateToTileId (agx::Vec3 worldPos) const |
| agx::Vec3 | convertWorldCoordinateToTilePosition (agx::Vec3 worldPos) const |
| Return position in coordinate system defined by the XY-plane with local Z upwards. More... | |
| agx::Real | getMaximumDepth () const |
| agx::Vec3 | getReferencePoint () const |
| agx::Quat | getReferenceRotation () const |
| agx::Vec3 | getTileCenter (agxTerrain::TileId id) const |
| Return the local center position for tile id in the plane with tiles. More... | |
| size_t | getTileMarginSize () const |
| size_t | getTileResolution () const |
| agx::Real | getTileSize () const |
| The full size of a tile. More... | |
| agx::AffineMatrix4x4 | getTileTransform (agxTerrain::TileId id, agx::Real zPos=0) const |
| Return the transform that can be used to place the tile id correctly. More... | |
| agx::AffineMatrix4x4 | getTileTransform (agxTerrain::TileId id, agx::Vec3 localOffset) const |
| Return a transform that can be used to position something at localOffset in the tile with id. More... | |
A TileSpecification determines where in the world a 2D TileId is located and contains utility methods for coordinate transforms.
Definition at line 69 of file TileSpecification.h.
| agxTerrain::TileSpecification::TileSpecification | ( | agx::Vec3 | refPoint, |
| agx::Quat | refRotation, | ||
| agx::Real | tileSize, | ||
| size_t | marginSize, | ||
| size_t | resolution, | ||
| agx::Real | maxDepth | ||
| ) |
Constructor.
| refPoint | Reference point for 2d-grid used to positioning terrain tiles |
| refRotation | Reference rotation for 2d-grid |
| tileSize | Size in meter for a grid tile |
| marginSize | Number of height values that should overlap on neighbor tiles |
| resolution | Resolution for the tiles |
| maxDepth | Maximum excavation depth for a tile |
| agxTerrain::TileSpecification::TileSpecification | ( | ) |
| agx::Vec3 agxTerrain::TileSpecification::convertTilePositionToWorld | ( | agxTerrain::TileId | id, |
| agx::Vec2 | tilePos | ||
| ) | const |
Convert a local position in a tile to world coordinates.
| id | Which tile |
| tilePos | local position in tile |
Definition at line 218 of file TileSpecification.h.
| agx::Vec3 agxTerrain::TileSpecification::convertTilePositionToWorld | ( | agxTerrain::TileId | id, |
| agx::Vec3 | tilePos | ||
| ) | const |
The 2D version of this method is the same as calling this method with agx::Vec3(x,y,0)
| id | Which tile |
| tilePos | local position in tile |
| agxTerrain::TileId agxTerrain::TileSpecification::convertWorldCoordinateToTileId | ( | agx::Vec3 | worldPos | ) | const |
| agx::Vec3 agxTerrain::TileSpecification::convertWorldCoordinateToTilePosition | ( | agx::Vec3 | worldPos | ) | const |
Return position in coordinate system defined by the XY-plane with local Z upwards.
Definition at line 224 of file TileSpecification.h.
| agx::Real agxTerrain::TileSpecification::getMaximumDepth | ( | ) | const |
Definition at line 213 of file TileSpecification.h.
| agx::Vec3 agxTerrain::TileSpecification::getReferencePoint | ( | ) | const |
Definition at line 188 of file TileSpecification.h.
| agx::Quat agxTerrain::TileSpecification::getReferenceRotation | ( | ) | const |
Definition at line 193 of file TileSpecification.h.
| agx::Vec3 agxTerrain::TileSpecification::getTileCenter | ( | agxTerrain::TileId | id | ) | const |
Return the local center position for tile id in the plane with tiles.
| size_t agxTerrain::TileSpecification::getTileMarginSize | ( | ) | const |
Definition at line 203 of file TileSpecification.h.
| size_t agxTerrain::TileSpecification::getTileResolution | ( | ) | const |
Definition at line 208 of file TileSpecification.h.
| agx::Real agxTerrain::TileSpecification::getTileSize | ( | ) | const |
The full size of a tile.
Definition at line 198 of file TileSpecification.h.
| agx::AffineMatrix4x4 agxTerrain::TileSpecification::getTileTransform | ( | agxTerrain::TileId | id, |
| agx::Real | zPos = 0 |
||
| ) | const |
Return the transform that can be used to place the tile id correctly.
Definition at line 231 of file TileSpecification.h.
References agx::AffineMatrix4x4T< Real >::translate().
| agx::AffineMatrix4x4 agxTerrain::TileSpecification::getTileTransform | ( | agxTerrain::TileId | id, |
| agx::Vec3 | localOffset | ||
| ) | const |
Return a transform that can be used to position something at localOffset in the tile with id.
Definition at line 240 of file TileSpecification.h.
References agx::AffineMatrix4x4T< Real >::translate().