Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract_sdf_collision_shape.cpp File Reference

Bullet collision shape that queries a Tesseract SignedDistanceField directly. More...

#include <tesseract/common/macros.h>
#include <BulletCollision/BroadphaseCollision/btBroadphaseProxy.h>
#include <cmath>
#include <stdexcept>
#include <tesseract/collision/bullet/bullet_utils.h>
#include <tesseract/collision/bullet/tesseract_sdf_collision_shape.h>

Functions

ImplicitSDFShape tesseract::collision::bullet_internal::makeImplicitSdfShape (const btCollisionShape &shape, const btTransform &world_transform)
 The implicit solver's view of a Bullet SDF shape (SDF_SHAPE_PROXYTYPE) placed at world_transform, which must be a TesseractSdfCollisionShape.
bool tesseract::collision::bullet_internal::querySdfShapeContact (const btCollisionShape &shape, const btVector3 &local_point, btScalar max_distance, btScalar &distance, btVector3 &normal)
 Distance and normal at a point in an SDF shape's frame, but only if the distance is within max_distance (a contact threshold): the distance is read first and the normal only for points that pass. shape must be a TesseractSdfCollisionShape.
bool tesseract::collision::bullet_internal::querySdfShapePoint (const btCollisionShape &shape, const btVector3 &local_point, btScalar &distance, btVector3 &normal)
 Distance and normal at a point in an SDF shape's frame. shape must be a TesseractSdfCollisionShape.

Detailed Description

Bullet collision shape that queries a Tesseract SignedDistanceField directly.

License
Software License Agreement (Apache License)
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.

Function Documentation

◆ makeImplicitSdfShape()

ImplicitSDFShape tesseract::collision::bullet_internal::makeImplicitSdfShape ( const btCollisionShape & shape,
const btTransform & world_transform )

The implicit solver's view of a Bullet SDF shape (SDF_SHAPE_PROXYTYPE) placed at world_transform, which must be a TesseractSdfCollisionShape.

The shape must outlive the result.

◆ querySdfShapeContact()

bool tesseract::collision::bullet_internal::querySdfShapeContact ( const btCollisionShape & shape,
const btVector3 & local_point,
btScalar max_distance,
btScalar & distance,
btVector3 & normal )

Distance and normal at a point in an SDF shape's frame, but only if the distance is within max_distance (a contact threshold): the distance is read first and the normal only for points that pass. shape must be a TesseractSdfCollisionShape.

Returns
true if the shape has a value there and it is within max_distance

◆ querySdfShapePoint()

bool tesseract::collision::bullet_internal::querySdfShapePoint ( const btCollisionShape & shape,
const btVector3 & local_point,
btScalar & distance,
btVector3 & normal )

Distance and normal at a point in an SDF shape's frame. shape must be a TesseractSdfCollisionShape.

Returns
false where the shape has no value