Skip to main content

WeaponParts API

Interface ID 7, version 2.1 (2.1, ROCK 1.0.4, adds setLooseItemModels and clearLooseItemModels; request minor 0 when you do not call them). Mods built against 2.0 keep working. Include <ROCK/WeaponParts.h>. Namespace rock::api::weaponparts. Permissions: Read (1), Write (2). The parts of the equipped weapon: contacts, classification evidence, part targets and drives, grip state, part poses, the model's sources, collision suppression, grab points, and authored state for loose weapon items. Physical reload mods (DIAMOND) are built on it.

Per-weapon calls take a weapon slot: a slot at or above kMaxWeaponSlots returns InvalidArgument, and slot 1 returns TargetUnavailable (clearing it is a no-op).

Entry points​

FunctionPermissionThreadPurpose
queryContactReadGameThe part nearest a world point within radiusGame.
copyEvidenceDetailsReadGameEach generated collider and how ROCK classified it, up to kMaxEvidenceDetails (100).
copyEvidencePointsReadGameOne collider's points, up to kMaxEvidencePoints (252).
setPartTargetsWriteGameReplaces the owner's selection of grabbable parts, up to kMaxTargets (128).
clearPartTargetsWriteGameRemoves the owner's selection on the slot.
setDriveTargetsWriteGamePoses part sources for a lease, up to kMaxDrives (64).
clearDriveTargetsWriteGameRemoves the owner's drives on the slot.
getGripStateReadAnyThe latest published grip of a hand.
queryTargetResolutionReadGameWhich owner's target wins for a part, and its grab mode.
copyPartPosesReadGameCurrent part poses, up to kMaxPoses (128).
copyDriveResultsReadGameWhat happened to each drive this frame.
copySourcesReadGameThe weapon model's nodes, up to kMaxSources (4096).
querySourcePoseReadGameOne source's parent-local, weapon-root-local and world transforms.
querySourcePathReadGameOne source's parent key and child index.
setCollisionSuppressionWriteGameStops chosen sources' generated bodies from colliding, renewed each frame.
clearCollisionSuppressionWriteGameRestores them.
setGrabPointsWriteGamePlaces grab points in the owner's AttachOnly parts.
clearGrabPointsWriteGameRemoves them.
setItemStateWriteAnyAuthored node state of a loose weapon item.
moveItemStateWriteAnyFollows an item between identities; moving to owner 0 removes it.
clearItemStatesWriteAnyRemoves the owner's item states.
getSampleReadAnyIdentity of the current publication.
setLooseItemModelsWriteAny2.1. Makes every loose reference of a misc item show an object mod's model, with collision built from it; up to kMaxLooseItemModels pairs.
clearLooseItemModelsWriteAny2.1. Removes the owner's pairs.

Copy calls take a capacity at most the matching kMax... constant (CapacityFull otherwise), report the total and copy min(capacity, total).

Sources and keys​

Sources are the weapon model's nodes. ROCK names them with opaque sourceKey values that hold only for one weaponGenerationKey; a key of another generation returns GenerationMismatch. Keys come from copySources, contacts, evidence and poses. copySources reports each node's parentKey (0 is the weapon root).

Part targets and drives​

setPartTargets(owner, slot, targets, count) replaces the owner's whole selection: which parts (by body, source key, source name, part kind or role) the owner's group may grab, with GrabMode::FullTwoHandAuthority or AttachOnly. A name selector resolves to its source now (Ambiguous if it does not). Without TargetFlag::NonExclusive, an active selection rejects grips on other parts.

setDriveTargets poses part sources in weapon-root or source-parent space (DriveSpace) for leaseFrames (1 to kMaxDriveLeaseFrames, 120); renew to keep them. copyDriveResults reports each drive as Applied, Unresolved, StaleGeneration, MissingParent, LostPriority, InvalidTransform, CapacityRejected or Restored. A withdrawn target or drive shows up as a failed renew.

getGripState reports gripKind (FiringGrip, SupportFullAuthority, SupportVisualOnly, PartCarry, AttachOnly), the part, weapon slot, the target owner and group the grip went through, and the hand in part space.

Collision suppression​

Stops the weapon's generated bodies whose source is one of sourceKeys, or a descendant, from colliding. Visibility, transforms and body existence are unchanged. One owner per weapon (OwnerConflict otherwise); 1 to kMaxCollisionSources (16) sources, lease 1 or 2 frames, sample at most one frame old. Clear, expiry, owner, generation or weapon loss restores the bodies.

Grab points​

setGrabPoints(owner, slot, points, count) places 1 to kMaxGrabPoints (32) points in part sources of the owner's AttachOnly groups; register the targets first (TargetUnavailable otherwise). Ids are unique within a group; handMask is left 1, right 2; the radius is in (0, 64] game units. The palm or the index, middle or pinky probe reaches the nearest point within both its radius and the hand-probe radius. The hand seats on the nearest collider surface of the group's parts within the radius, in the currently driven pose, keeping its approach rotation, and follows the moving part. No surface means no grab. The groups' parts are never grabbed through ordinary surfaces. A replaced set affects new grabs only.

Loose item state​

setItemState(owner, key, state) describes a loose weapon item by native identity (ItemKey: weapon form, plus inventory owner and ExtraUniqueID, or the dropped reference and 0): up to kMaxItemParts (96) node paths relative to the model's Weapon node, each with a parent-local transform and a hidden flag (hiding applies to the subtree and its generated collision). States persist until removed or the owner is lost; serialize your own and republish after a load. Calls may come from native serialization callbacks.

Loose item models​

setLooseItemModels(owner, models, count) (2.1) replaces the owner's set of up to kMaxLooseItemModels { baseFormId, modelFormId } pairs (count 0 clears it). Every loose reference of baseFormId, a misc item such as the loose mod an object mod becomes when it is taken off, then shows the model of the object mod modelFormId instead of its own geometry, centred on the reference. ROCK puts the model on the reference each time the engine loads its 3D, before the engine shows it, so a reference ROCK drops into a hand already has it when the hand closes. The reference's own geometry stays in its model, hidden; the object mod's material swap is not applied.

Such a reference collides with convex hulls ROCK builds from that model, held or not, and keeps them while it rests; its native collision comes back when the pair is removed or the reference unloads. A reference already in the world changes at its next model load.

A base another owner registered returns OwnerConflict, a base listed twice InvalidArgument, and a base that is not a misc item or a model that is not an object mod with a model TargetInvalid; nothing changes then. clearLooseItemModels(owner) removes the owner's set, as does owner loss. Both calls may come from native serialization callbacks, so a mod restoring its set from its co-save has it in place before the loaded cells show their references.

Values​

PartKind (0-28): Receiver, Barrel, Handguard, Foregrip, Pump, Stock, Grip, Magazine, Magwell, Bolt, Slide, ChargingHandle, BreakAction, Cylinder, Chamber, Shell, Round, LaserCell, Lever, Sight, Accessory, CosmeticAmmo, Other, LaserSight, Flashlight, LaserFlashlightCombo, Scope, MuzzleDevice, Bipod. ActionRole: None, Bolt, Slide, ChargingHandle, Pump, BreakAction, Cylinder, Lever, Latch. ClassificationSource: NameToken, SlotAnchor, RigAnchor, AttachmentEvidence. TargetFlag: MatchBodyId, MatchSourceKey, MatchSourceName, MatchPartKind, MatchReloadRole, MatchSupportRole, MatchSocketRole, MatchActionRole, NonExclusive. kNoBody (0x7FFFFFFF) marks a missing body.

Declarations​

Complete public declarations: ROCK/WeaponParts.h
ROCK/WeaponParts.h
#pragma once
#include "Abi.h"

// Weapon parts of the equipped weapons, addressed by weapon slot: contacts,
// evidence, part targets and drives, grip state, poses, sources, collision
// suppression, grab points, authored state for loose weapon items, and the
// models loose item references show (2.1).
#pragma pack(push, 8)
namespace rock::api::weaponparts {
inline constexpr InterfaceId kInterfaceId = InterfaceId::WeaponParts;
inline constexpr std::uint32_t kMajor = 2;
inline constexpr std::uint32_t kMinor = 1;
inline constexpr std::uint32_t kMaxEvidenceDetails = 100;
inline constexpr std::uint32_t kMaxEvidencePoints = 252;
inline constexpr std::uint32_t kMaxPoses = 128;
inline constexpr std::uint32_t kMaxTargets = 128;
inline constexpr std::uint32_t kMaxDrives = 64;
inline constexpr std::uint32_t kMaxDriveLeaseFrames = 120;
inline constexpr std::uint32_t kMaxSources = 4096;
inline constexpr std::uint32_t kMaxCollisionSources = 16;
inline constexpr std::uint32_t kMaxGrabPoints = 32;
inline constexpr std::uint32_t kMaxItemParts = 96;
// 2.1. Entries one owner's setLooseItemModels accepts.
inline constexpr std::uint32_t kMaxLooseItemModels = 32768;
inline constexpr std::uint32_t kNoBody = 0x7FFF'FFFF;

// ------------------------------------------------------------------
// Part vocabulary
// ------------------------------------------------------------------

enum class PartKind : std::uint32_t
{
Receiver = 0,
Barrel = 1,
Handguard = 2,
Foregrip = 3,
Pump = 4,
Stock = 5,
Grip = 6,
Magazine = 7,
Magwell = 8,
Bolt = 9,
Slide = 10,
ChargingHandle = 11,
BreakAction = 12,
Cylinder = 13,
Chamber = 14,
Shell = 15,
Round = 16,
LaserCell = 17,
Lever = 18,
Sight = 19,
Accessory = 20,
CosmeticAmmo = 21,
Other = 22,
LaserSight = 23,
Flashlight = 24,
LaserFlashlightCombo = 25,
Scope = 26,
MuzzleDevice = 27,
Bipod = 28,
};

enum class ActionRole : std::uint32_t
{
None = 0,
Bolt = 1,
Slide = 2,
ChargingHandle = 3,
Pump = 4,
BreakAction = 5,
Cylinder = 6,
Lever = 7,
Latch = 8,
};

enum class ClassificationSource : std::uint32_t
{
NameToken = 0,
SlotAnchor = 1,
RigAnchor = 2,
AttachmentEvidence = 3,
};

// ------------------------------------------------------------------
// Contacts and evidence
// ------------------------------------------------------------------

struct ContactQuery
{
std::uint32_t size{ sizeof(ContactQuery) };
std::uint32_t version{ 1 };
Point3 pointGame{};
float radiusGame{ 0.0f };
std::uint32_t flags{ 0 };
};

// The weapon part nearest the query point. Keys are opaque source keys of
// the weapon generation.
struct ContactResult
{
std::uint32_t size{ sizeof(ContactResult) };
std::uint32_t version{ 1 };
std::uint32_t weaponSlot{ 0 };
std::uint32_t valid{ 0 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t partKind{ 0 };
std::uint32_t reloadRole{ 0 };
std::uint32_t supportRole{ 0 };
std::uint32_t socketRole{ 0 };
std::uint32_t actionRole{ 0 };
std::uint64_t interactionKey{ 0 };
std::uint64_t sourceKey{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
float probeDistanceGame{ 0.0f };
};

// One generated collider and how ROCK classified its part.
struct EvidenceDetail
{
std::uint32_t size{ sizeof(EvidenceDetail) };
std::uint32_t version{ 1 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t partKind{ 0 };
std::uint32_t reloadRole{ 0 };
std::uint32_t supportRole{ 0 };
std::uint32_t socketRole{ 0 };
std::uint32_t actionRole{ 0 };
std::uint32_t fallbackGripPose{ 0 };
std::uint32_t pointCount{ 0 };
std::uint64_t interactionKey{ 0 };
std::uint64_t sourceKey{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
Bounds3 localBoundsGame{};
std::uint32_t omodFormId{ 0 };
std::uint32_t attachPointFormId{ 0 };
std::uint32_t classificationSource{ 0 };
char sourceName[64]{};
};

// ------------------------------------------------------------------
// Part targets and drives
// ------------------------------------------------------------------

enum class GrabMode : std::uint32_t
{
None = 0,
FullTwoHandAuthority = 1,
AttachOnly = 2,
};

enum class TargetFlag : std::uint32_t
{
None = 0,
MatchBodyId = 1u << 0,
MatchSourceKey = 1u << 1,
MatchSourceName = 1u << 2,
MatchPartKind = 1u << 3,
MatchReloadRole = 1u << 4,
MatchSupportRole = 1u << 5,
MatchSocketRole = 1u << 6,
MatchActionRole = 1u << 7,
NonExclusive = 1u << 8,
};

// Selects which parts the owner's group may grab, and how.
struct Target
{
std::uint32_t size{ sizeof(Target) };
std::uint32_t version{ 1 };
std::uint32_t flags{ 0 };
GrabMode grabMode{ GrabMode::None };
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t sourceKey{ 0 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t partKind{ 0 };
std::uint32_t reloadRole{ 0 };
std::uint32_t supportRole{ 0 };
std::uint32_t socketRole{ 0 };
std::uint32_t actionRole{ 0 };
std::uint32_t groupId{ 0 };
std::uint32_t priority{ 0 };
char sourceName[64]{};
};

enum class DriveSpace : std::uint32_t
{
WeaponRootLocal = 0,
SourceParentLocal = 1,
};

// Poses one part source for 1..kMaxDriveLeaseFrames frames.
struct DriveTarget
{
std::uint32_t size{ sizeof(DriveTarget) };
std::uint32_t version{ 1 };
std::uint32_t flags{ 0 };
DriveSpace driveSpace{ DriveSpace::WeaponRootLocal };
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t sourceKey{ 0 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t groupId{ 0 };
std::uint32_t priority{ 0 };
std::uint32_t leaseFrames{ 1 };
Transform targetTransform{};
char sourceName[64]{};
};

struct ResolutionQuery
{
std::uint32_t size{ sizeof(ResolutionQuery) };
std::uint32_t version{ 1 };
std::uint64_t weaponGenerationKey{ 0 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t partKind{ 0 };
std::uint32_t reloadRole{ 0 };
std::uint32_t supportRole{ 0 };
std::uint32_t socketRole{ 0 };
std::uint32_t actionRole{ 0 };
std::uint64_t sourceKey{ 0 };
char sourceName[64]{};
};

// Which owner's target wins for the queried part.
struct ResolutionResult
{
std::uint32_t size{ sizeof(ResolutionResult) };
std::uint32_t version{ 1 };
OwnerToken winningOwner{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t frameIndex{ 0 };
std::uint32_t whitelistActive{ 0 };
std::uint32_t matched{ 0 };
GrabMode grabMode{ GrabMode::None };
std::uint32_t groupId{ 0 };
std::uint32_t priority{ 0 };
};

enum class DriveApplication : std::uint32_t
{
Unknown = 0,
Applied = 1,
Unresolved = 2,
StaleGeneration = 3,
MissingParent = 4,
LostPriority = 5,
InvalidTransform = 6,
CapacityRejected = 7,
Restored = 8,
};

struct DriveResult
{
std::uint32_t size{ sizeof(DriveResult) };
std::uint32_t version{ 1 };
std::uint64_t frameIndex{ 0 };
OwnerToken owner{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t groupId{ 0 };
std::uint32_t priority{ 0 };
DriveApplication result{ DriveApplication::Unknown };
Transform appliedSourceParentLocal{};
char sourceName[64]{};
};

// ------------------------------------------------------------------
// Grip state and poses
// ------------------------------------------------------------------

enum class GripKind : std::uint32_t
{
None = 0,
FiringGrip = 1,
SupportFullAuthority = 2,
SupportVisualOnly = 3,
PartCarry = 4,
AttachOnly = 5,
};

enum class GripLocalSpace : std::uint32_t
{
WeaponRootLocal = 0,
PartSourceLocal = 1,
};

// What one hand grips on which weapon slot's part.
struct GripState
{
std::uint32_t size{ sizeof(GripState) };
std::uint32_t version{ 1 };
Hand hand{ Hand::None };
GripKind gripKind{ GripKind::None };
std::uint32_t active{ 0 };
std::uint32_t attachOnly{ 0 };
std::uint64_t gripSequence{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
std::uint32_t weaponSlot{ 0 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t partKind{ 0 };
std::uint32_t reloadRole{ 0 };
std::uint32_t supportRole{ 0 };
std::uint32_t socketRole{ 0 };
std::uint32_t actionRole{ 0 };
std::uint32_t omodFormId{ 0 };
std::uint64_t sourceKey{ 0 };
OwnerToken targetOwner{ 0 };
std::uint32_t targetGroupId{ 0 };
GrabMode targetGrabMode{ GrabMode::None };
std::uint32_t attachPointFormId{ 0 };
std::uint32_t classificationSource{ 0 };
std::uint32_t authoredSupportGrip{ 0 };
std::uint32_t hasHandPartLocal{ 0 };
GripLocalSpace handPartLocalSpace{ GripLocalSpace::WeaponRootLocal };
Transform handPartLocal{};
char sourceName[64]{};
};

enum class PoseFlag : std::uint32_t
{
None = 0,
Valid = 1u << 0,
SourceParentLocalValid = 1u << 1,
WeaponRootLocalValid = 1u << 2,
};

struct PartPose
{
std::uint32_t size{ sizeof(PartPose) };
std::uint32_t version{ 1 };
std::uint64_t frameIndex{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t sourceKey{ 0 };
std::uint32_t bodyId{ kNoBody };
std::uint32_t partKind{ 0 };
std::uint32_t omodFormId{ 0 };
std::uint32_t attachPointFormId{ 0 };
std::uint32_t flags{ 0 };
std::uint32_t actionRole{ 0 };
Transform sourceParentLocal{};
Transform weaponRootLocal{};
char sourceName[64]{};
};

// ------------------------------------------------------------------
// Sources
// ------------------------------------------------------------------

// One node of the weapon model. parentKey 0 is the weapon root.
struct Source
{
std::uint32_t size{ sizeof(Source) };
std::uint32_t version{ 1 };
std::uint32_t bodyId{ kNoBody };
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t sourceKey{ 0 };
std::uint64_t parentKey{ 0 };
Transform sourceParentLocal{};
char name[64]{};
};

struct SourcePose
{
std::uint32_t size{ sizeof(SourcePose) };
std::uint32_t version{ 1 };
Sample sample{};
std::uint32_t valid{ 0 };
std::uint32_t weaponSlot{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t sourceKey{ 0 };
Transform sourceParentLocal{};
Transform weaponRootLocal{};
Transform world{};
};

// ------------------------------------------------------------------
// Collision suppression
// ------------------------------------------------------------------

/*
* Stops the weapon's generated bodies whose source is one of sourceKeys,
* or a descendant, from colliding. Visibility, transforms and body
* existence are unchanged. One owner per weapon; the owner's whole
* selection is replaced atomically. 1..kMaxCollisionSources sources, lease
* 1..2 frames, sample at most one frame old. Clear, expiry, owner,
* generation or weapon loss restores the bodies. Renew each frame.
*/
struct CollisionSuppression
{
std::uint32_t size{ sizeof(CollisionSuppression) };
std::uint32_t version{ 1 };
std::uint32_t leaseFrames{ 2 };
std::uint32_t sourceCount{ 0 };
Sample sample{};
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t sourceKeys[kMaxCollisionSources]{};
};

// ------------------------------------------------------------------
// Grab points
// ------------------------------------------------------------------

/*
* A point in a part source where a hand may take an AttachOnly target of
* the owner's group. The palm or the index, middle or pinky finger probes
* select the nearest point within both its radius and the hand-probe
* radius; the hand seats at the nearest collider surface of the group's
* part within the radius, using the currently driven pose, keeping the
* approaching hand rotation, and the relation follows the moving part.
* No matching surface means no acquisition. Configured groups never
* acquire through whole-part surfaces. handMask: left 1, right 2.
*/
struct GrabPoint
{
std::uint32_t size{ sizeof(GrabPoint) };
std::uint32_t version{ 1 };
std::uint32_t pointId{ 0 };
std::uint32_t groupId{ 0 };
std::uint64_t weaponGenerationKey{ 0 };
std::uint64_t sourceKey{ 0 };
std::uint32_t handMask{ 3 };
float radiusGame{ 3.0f };
Point3 pointInSource{};
};

// ------------------------------------------------------------------
// Loose weapon item state
// ------------------------------------------------------------------

// Exact native item identity: weapon form, plus the inventory owner and
// ExtraUniqueID, or the dropped reference and 0.
struct ItemKey
{
std::uint32_t weapon{ 0 };
std::uint32_t owner{ 0 };
std::uint32_t unique{ 0 };
bool operator==(const ItemKey&) const = default;
};

// path is relative to the model's Weapon node; local is the parent-local
// transform. hidden applies to the subtree and its generated collision.
struct ItemPart
{
char path[256]{};
Transform local{};
std::uint32_t hidden{ 0 };
};

struct ItemState
{
std::uint32_t size{ sizeof(ItemState) };
std::uint32_t version{ 1 };
std::uint32_t count{ 0 };
ItemPart parts[kMaxItemParts]{};
};

/*
* 2.1. Every loose reference of baseFormId (a misc item, such as the loose
* mod an object mod becomes when it is taken off) shows the model of the
* object mod modelFormId in place of its own geometry, centred on the
* reference, and collides with hulls ROCK generates from that model.
*/
struct LooseItemModel
{
std::uint32_t size{ sizeof(LooseItemModel) };
std::uint32_t version{ 1 };
std::uint32_t baseFormId{ 0 };
std::uint32_t modelFormId{ 0 };
};

// Permission bits are local to this interface major. Discovery grants none.
enum class Permission : std::uint32_t { Read = 1, Write = 2 };
inline constexpr std::uint32_t kSupportedPermissions = 3;

/*
* Per-weapon calls take weaponSlot < kMaxWeaponSlots (InvalidArgument
* otherwise). A slot ROCK does not publish yet returns TargetUnavailable;
* clearing it is a no-op. Slot 1 serves copyEvidenceDetails, copySources,
* querySourcePose and source-parent-local drives by source key of the bones
* its animation graph writes; a source pose of a driven bone reports what
* the graph evaluated, before the drive. Copy calls report the total in
* outCount and copy min(capacity, total). Game thread unless noted.
*/
struct Api
{
static constexpr InterfaceId interfaceId = kInterfaceId;
static constexpr std::uint32_t majorVersion = kMajor;
static constexpr std::uint32_t minorVersion = kMinor;
// Read.
Status(ROCK_CALL* queryContact)(OwnerToken owner, std::uint32_t weaponSlot, const ContactQuery* query, ContactResult* outResult) noexcept;
Status(ROCK_CALL* copyEvidenceDetails)(OwnerToken owner, std::uint32_t weaponSlot, EvidenceDetail* outDetails, std::uint32_t capacity, std::uint32_t* outCount) noexcept;
Status(ROCK_CALL* copyEvidencePoints)(OwnerToken owner, std::uint32_t weaponSlot, std::uint32_t bodyId, Point3* outPoints, std::uint32_t capacity, std::uint32_t* outCount) noexcept;
// Write. Replaces the owner's whole selection on the slot.
Status(ROCK_CALL* setPartTargets)(OwnerToken owner, std::uint32_t weaponSlot, const Target* targets, std::uint32_t count) noexcept;
Status(ROCK_CALL* clearPartTargets)(OwnerToken owner, std::uint32_t weaponSlot) noexcept;
Status(ROCK_CALL* setDriveTargets)(OwnerToken owner, std::uint32_t weaponSlot, const DriveTarget* targets, std::uint32_t count) noexcept;
Status(ROCK_CALL* clearDriveTargets)(OwnerToken owner, std::uint32_t weaponSlot) noexcept;
// Read, any thread. The latest published grip of a hand.
Status(ROCK_CALL* getGripState)(OwnerToken owner, Hand hand, GripState* outState) noexcept;
// Read.
Status(ROCK_CALL* queryTargetResolution)(OwnerToken owner, std::uint32_t weaponSlot, const ResolutionQuery* query, ResolutionResult* outResult) noexcept;
Status(ROCK_CALL* copyPartPoses)(OwnerToken owner, std::uint32_t weaponSlot, PartPose* outPoses, std::uint32_t capacity, std::uint32_t* outCount) noexcept;
Status(ROCK_CALL* copyDriveResults)(OwnerToken owner, std::uint32_t weaponSlot, DriveResult* outResults, std::uint32_t capacity, std::uint32_t* outCount) noexcept;
Status(ROCK_CALL* copySources)(OwnerToken owner, std::uint32_t weaponSlot, std::uint64_t weaponGenerationKey, Source* outSources, std::uint32_t capacity, std::uint32_t* outCount) noexcept;
Status(ROCK_CALL* querySourcePose)(OwnerToken owner, std::uint32_t weaponSlot, std::uint64_t weaponGenerationKey, std::uint64_t sourceKey, SourcePose* outPose) noexcept;
Status(ROCK_CALL* querySourcePath)(OwnerToken owner, std::uint32_t weaponSlot, std::uint64_t weaponGenerationKey, std::uint64_t sourceKey, std::uint64_t* outParentKey, std::uint32_t* outChildIndex) noexcept;
// Write.
Status(ROCK_CALL* setCollisionSuppression)(OwnerToken owner, std::uint32_t weaponSlot, const CollisionSuppression* request) noexcept;
Status(ROCK_CALL* clearCollisionSuppression)(OwnerToken owner, std::uint32_t weaponSlot) noexcept;
// Write. Register the AttachOnly targets first; 1..kMaxGrabPoints,
// ids unique within a group, replaced atomically. A grip in progress
// keeps its baseline.
Status(ROCK_CALL* setGrabPoints)(OwnerToken owner, std::uint32_t weaponSlot, const GrabPoint* points, std::uint32_t count) noexcept;
Status(ROCK_CALL* clearGrabPoints)(OwnerToken owner, std::uint32_t weaponSlot) noexcept;
// Write, any thread (also native serialization callbacks). A state
// stays until moved, removed (move to owner 0), cleared or its owner
// is lost; republish after a load.
Status(ROCK_CALL* setItemState)(OwnerToken owner, const ItemKey* key, const ItemState* state) noexcept;
Status(ROCK_CALL* moveItemState)(OwnerToken owner, const ItemKey* from, const ItemKey* to) noexcept;
Status(ROCK_CALL* clearItemStates)(OwnerToken owner) noexcept;
// Any thread.
Status(ROCK_CALL* getSample)(OwnerToken owner, Sample* outSample) noexcept;
// 2.1. Write, any thread (also native serialization callbacks, so a
// load registers them before its cells load). Replaces the owner's loose item models
// (count 0 clears). A base another owner registered: OwnerConflict; a
// base listed twice: InvalidArgument; a base that is not a misc item
// or a model that is not an object mod with a model: TargetInvalid.
// References already in the world change at their next model load.
Status(ROCK_CALL* setLooseItemModels)(OwnerToken owner, const LooseItemModel* models, std::uint32_t count) noexcept;
Status(ROCK_CALL* clearLooseItemModels)(OwnerToken owner) noexcept;
};
}
#pragma pack(pop)