Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType > Class Template Reference

A ball-and-socket joint between two points. More...

#include <BallJoint.hpp>

Public Types

Type aliases
using value_type = Scalar
 Our scalar type.
using line_segment_t = LineSegmentType
 Our line segment type.

Public Member Functions

Constructors and destructor
 BallJoint ()
 Default constructor for owning BallJoints. Default initialize the line segment.
 BallJoint ()=delete
 No default constructor for viewing BallJointss.
 BallJoint (const line_segment_t &line_segment)
 Constructor to initialize the underlying line segment.
template<mundy::ValidLineSegmentType OtherLineSegmentType>
 BallJoint (const OtherLineSegmentType &line_segment)
 Constructor to initialize the underlying line segment.
 ~BallJoint ()=default
 Destructor.
 BallJoint (const BallJoint< value_type, line_segment_t, ownership_t > &other)
 Deep copy constructor.
template<typename OtherBallJointType>
 BallJoint (const OtherBallJointType &other)
 Deep copy constructor.
 BallJoint (BallJoint< value_type, line_segment_t, ownership_t > &&other)
 Deep move constructor.
template<typename OtherBallJointType>
 BallJoint (OtherBallJointType &&other)
 Deep move constructor.
Operators
BallJoint< value_type, line_segment_t, ownership_t > & operator= (const BallJoint< value_type, line_segment_t, ownership_t > &other)
 Copy assignment operator.
template<typename OtherBallJointType>
BallJoint< value_type, line_segment_t, ownership_t > & operator= (const OtherBallJointType &other)
 Copy assignment operator.
BallJoint< value_type, line_segment_t, ownership_t > & operator= (BallJoint< value_type, line_segment_t, ownership_t > &&other)
 Move assignment operator.
template<typename OtherBallJointType>
BallJoint< value_type, line_segment_t, ownership_t > & operator= (OtherBallJointType &&other)
 Move assignment operator.
Accessors
const line_segment_tline_segment () const
 Accessor for the line segment.
line_segment_tline_segment ()
 Accessor for the line segment.

Setters

template<mundy::ValidLineSegmentType OtherLineSegmentType>
void set_line_segment (const OtherLineSegmentType &line_segment)
 Set the line segment.

Detailed Description

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
class mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >

The BallJoint is a simple mechanical joint that constrains two points to have zero separation. It does not have any physical properties beyond those of its underlying geometry. Although, depending on the use case, it will be augmented to include a finite spring constant (if imposed as a soft constraint) or three Lagrange multipliers (if imposed as a hard constraint).

Member Typedef Documentation

◆ value_type

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
using mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::value_type = Scalar

◆ line_segment_t

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
using mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::line_segment_t = LineSegmentType

Constructor & Destructor Documentation

◆ BallJoint() [1/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( )
inline

◆ BallJoint() [2/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( )
delete

◆ BallJoint() [3/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( const line_segment_t & line_segment)
inline

◆ BallJoint() [4/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
template<mundy::ValidLineSegmentType OtherLineSegmentType>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( const OtherLineSegmentType & line_segment)
inline

◆ ~BallJoint()

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::~BallJoint ( )
default

◆ BallJoint() [5/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( const BallJoint< value_type, line_segment_t, ownership_t > & other)
inline

◆ BallJoint() [6/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
template<typename OtherBallJointType>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( const OtherBallJointType & other)
inline

◆ BallJoint() [7/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( BallJoint< value_type, line_segment_t, ownership_t > && other)
inline

◆ BallJoint() [8/8]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
template<typename OtherBallJointType>
mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::BallJoint ( OtherBallJointType && other)
inline

Member Function Documentation

◆ operator=() [1/4]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
BallJoint< value_type, line_segment_t, ownership_t > & mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::operator= ( const BallJoint< value_type, line_segment_t, ownership_t > & other)
inline

◆ operator=() [2/4]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
template<typename OtherBallJointType>
BallJoint< value_type, line_segment_t, ownership_t > & mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::operator= ( const OtherBallJointType & other)
inline

◆ operator=() [3/4]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
BallJoint< value_type, line_segment_t, ownership_t > & mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::operator= ( BallJoint< value_type, line_segment_t, ownership_t > && other)
inline

◆ operator=() [4/4]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
template<typename OtherBallJointType>
BallJoint< value_type, line_segment_t, ownership_t > & mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::operator= ( OtherBallJointType && other)
inline

◆ line_segment() [1/2]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
const line_segment_t & mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::line_segment ( ) const
inline

◆ line_segment() [2/2]

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
line_segment_t & mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::line_segment ( )
inline

◆ set_line_segment()

template<typename Scalar, mundy::ValidLineSegmentType LineSegmentType = mundy::LineSegment<Scalar>, typename OwnershipType = mundy::Ownership::Owns>
template<mundy::ValidLineSegmentType OtherLineSegmentType>
void mundy::BallJoint< Scalar, LineSegmentType, OwnershipType >::set_line_segment ( const OtherLineSegmentType & line_segment)
inline
Parameters
[in]line_segmentThe new line segment.