Blender V5.3
blender::bke::PChanBoneT< PoseChannelT, BoneT > Struct Template Reference

#include <BKE_pose.hh>

Public Member Functions

 PChanBoneT (PoseChannelT *pchan, BoneT *bone)
 PChanBoneT ()
template<typename OtherPChan, typename OtherBone>
requires std::convertible_to<OtherPChan *, PoseChannelT *> && std::convertible_to<OtherBone *, BoneT *>
 PChanBoneT (const PChanBoneT< OtherPChan, OtherBone > &other)

Public Attributes

PoseChannelT * pchan
BoneT * bone

Detailed Description

template<typename PoseChannelT, typename BoneT>
struct blender::bke::PChanBoneT< PoseChannelT, BoneT >

Pairing of a pose channel with its corresponding armature bone.

This struct allows code which already has both pointers can pass them around without repeating the armature bone lookup. Currently this lookup is cheap (just following a pointer), but in the future it will become more expensive (array index lookup to find that pointer, then follow it).

Both pointers are expected to both be null, or both be non-null and refer to matching data (i.e. bone is the Bone that pchan currently resolves to via its armature index).

This type is non-owning. It must not outlive either pointers.

Definition at line 60 of file BKE_pose.hh.

Constructor & Destructor Documentation

◆ PChanBoneT() [1/3]

template<typename PoseChannelT, typename BoneT>
blender::bke::PChanBoneT< PoseChannelT, BoneT >::PChanBoneT ( PoseChannelT * pchan,
BoneT * bone )
inline

Definition at line 64 of file BKE_pose.hh.

◆ PChanBoneT() [2/3]

template<typename PoseChannelT, typename BoneT>
blender::bke::PChanBoneT< PoseChannelT, BoneT >::PChanBoneT ( )
inline

Default constructor for nullptr values.

This constructor is here to allow arrays of PChanBoneT to be pre-allocated.

Definition at line 75 of file BKE_pose.hh.

◆ PChanBoneT() [3/3]

template<typename PoseChannelT, typename BoneT>
template<typename OtherPChan, typename OtherBone>
requires std::convertible_to<OtherPChan *, PoseChannelT *> && std::convertible_to<OtherBone *, BoneT *>
blender::bke::PChanBoneT< PoseChannelT, BoneT >::PChanBoneT ( const PChanBoneT< OtherPChan, OtherBone > & other)
inline

Definition at line 83 of file BKE_pose.hh.

Member Data Documentation

◆ bone

◆ pchan


The documentation for this struct was generated from the following file: