33 #ifndef DART_DYNAMICS_DETAIL_INVERSEKINEMATICSPTR_HPP_
34 #define DART_DYNAMICS_DETAIL_INVERSEKINEMATICSPTR_HPP_
47 template <
class IkType,
class JacobianNodePtrT>
72 template <
class OtherIkT,
class OtherJacNodePtrT>
80 operator std::shared_ptr<element_type>()
const {
return mIK; }
83 template <
class OtherIkT>
90 template <
class OtherIkT,
class OtherJacNodePtrT>
99 template <
class SharedPtrT>
114 operator bool()
const {
return (
nullptr !=
mIK); }
142 void set(
const std::shared_ptr<IkType>& sptr)
160 template <
class OtherIkT,
class OtherJacNodeT>
168 template <
class OtherIkT,
class OtherJacNodeT>
172 return !( *
this == _rhs );
176 template <
class OtherIkT,
class OtherJacNodeT>
184 template <
class OtherIkT,
class OtherJacNodeT>
192 template <
class OtherIkT,
class OtherJacNodeT>
196 return (*
this < _rhs) || (*
this == _rhs);
200 template <
class OtherIkT,
class OtherJacNodeT>
204 return (*
this > _rhs) || (*
this == _rhs);
212 std::shared_ptr<element_type>
mIK;
220 template <
class IkType,
class BodyNodeT>
224 return nullptr == _ik.
get();
228 template <
class IkType,
class BodyNodeT>
232 return nullptr == _ik.
get();
236 template <
class IkType,
class BodyNodeT>
240 return nullptr != _ik.
get();
244 template <
class IkType,
class BodyNodeT>
248 return nullptr != _ik.
get();
257 template <
class InverseKinematicsT,
class JacobianNodePtrT>
270 template <
class PtrType>
277 template <
class PtrType>
290 if(
nullptr == jacNode)
298 template <
class OtherIkT,
class OtherJacNodePtrT>
313 template <
class OtherIkT,
class OtherJacNodeT>
315 OtherIkT, OtherJacNodeT>& _ptr)
TemplateInverseKinematicsPtr is a templated class that enables users to create a reference-counting I...
Definition: InverseKinematicsPtr.hpp:49
TemplateInverseKinematicsPtr()=default
Default constructor.
bool operator<(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_rhs) const
Less than.
Definition: InverseKinematicsPtr.hpp:177
TemplateInverseKinematicsPtr & operator=(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodePtrT > &_ptr)
Assignment operator.
Definition: InverseKinematicsPtr.hpp:91
element_type & operator*() const
Dereferencing operator.
Definition: InverseKinematicsPtr.hpp:117
bool operator>(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_rhs) const
Greater than.
Definition: InverseKinematicsPtr.hpp:185
bool operator>=(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_rhs) const
Greater than or equal to.
Definition: InverseKinematicsPtr.hpp:201
TemplateInverseKinematicsPtr(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodePtrT > &_ptr)
Constructor that takes in a strong InverseKinematicsPtr.
Definition: InverseKinematicsPtr.hpp:73
bool operator!=(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_rhs) const
Inequality.
Definition: InverseKinematicsPtr.hpp:169
JacobianNodePtrT mJacNodePtr
Pointer to the Node associated with the IK module.
Definition: InverseKinematicsPtr.hpp:215
TemplateInverseKinematicsPtr(const std::shared_ptr< OtherIkT > &sptr)
Constructor that takes in a shared_ptr.
Definition: InverseKinematicsPtr.hpp:84
TemplateInverseKinematicsPtr(const std::shared_ptr< element_type > &sptr)
Constructor that accepts a shared_ptr.
Definition: InverseKinematicsPtr.hpp:57
std::shared_ptr< element_type > get_shared() const
Get the shared_ptr held by this InverseKinematicsPtr.
Definition: InverseKinematicsPtr.hpp:132
bool operator<=(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_rhs) const
Less than or equal to.
Definition: InverseKinematicsPtr.hpp:193
IkType element_type
Definition: InverseKinematicsPtr.hpp:54
std::shared_ptr< element_type > mIK
Pointer to the IK module.
Definition: InverseKinematicsPtr.hpp:212
bool operator==(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_rhs) const
Equality.
Definition: InverseKinematicsPtr.hpp:161
void set(const std::shared_ptr< IkType > &sptr)
Set the InverseKinematics module for this InverseKinematicsPtr from a shared_ptr.
Definition: InverseKinematicsPtr.hpp:142
element_type * get() const
Get the raw pointer.
Definition: InverseKinematicsPtr.hpp:123
TemplateInverseKinematicsPtr(std::nullptr_t)
Constructor that accepts a nullptr.
Definition: InverseKinematicsPtr.hpp:63
element_type * operator->() const
Dereferencing operation.
Definition: InverseKinematicsPtr.hpp:120
TemplateWeakInverseKinematicsPtr is a templated class that enables users to create a non-reference-ho...
Definition: InverseKinematicsPtr.hpp:259
TemplateInverseKinematicsPtr< InverseKinematicsT, JacobianNodePtrT > lock() const
Locks the InverseKinematics module to ensure that the referenced module is currently still available.
Definition: InverseKinematicsPtr.hpp:287
void set(const TemplateWeakInverseKinematicsPtr< OtherIkT, OtherJacNodeT > &_ptr)
Set using a weak pointer.
Definition: InverseKinematicsPtr.hpp:314
void set(const TemplateInverseKinematicsPtr< OtherIkT, OtherJacNodePtrT > &_ptr)
Set using a strong pointer.
Definition: InverseKinematicsPtr.hpp:299
TemplateWeakInverseKinematicsPtr & operator=(const PtrType &_ptr)
Assignment operator for various templated pointer types.
Definition: InverseKinematicsPtr.hpp:278
TemplateWeakInverseKinematicsPtr()=default
Default constructor.
JacobianNodePtrT mWeakJacNode
Weak pointer to the JacobianNode.
Definition: InverseKinematicsPtr.hpp:327
std::weak_ptr< InverseKinematicsT > mWeakIK
Weak pointer to the IK module.
Definition: InverseKinematicsPtr.hpp:324
TemplateWeakInverseKinematicsPtr(const PtrType &_ptr)
Constructor for various pointer types.
Definition: InverseKinematicsPtr.hpp:271
InverseKinematicsT element_type
Definition: InverseKinematicsPtr.hpp:264
bool operator==(const TemplateInverseKinematicsPtr< IkType, BodyNodeT > &_ik, std::nullptr_t)
Definition: InverseKinematicsPtr.hpp:221
bool operator!=(const TemplateInverseKinematicsPtr< IkType, BodyNodeT > &_ik, std::nullptr_t)
Definition: InverseKinematicsPtr.hpp:237
Definition: BulletCollisionDetector.cpp:63