API Reference — dna/layers/RBFBehaviorReader
class RBFBehaviorReader : public virtual BehaviorReader
Query all RBF (Radial Basis Function) pose and control data associated with a rig. Use this interface when you need to read RBF solver inputs — pose names, joint output indices, blend shape channel indices, animated map indices, joint output values, scale factors, and control names — without modifying them.
When to use this
Reach for RBFBehaviorReader when you need read-only access to a rig's RBF behavior layer — for example, to inspect pose configurations, iterate over RBF controls, or extract solver outputs for downstream processing. For write operations, use the paired RBFBehaviorWriter interface instead.
Method groups
| Group | Methods |
|---|---|
| RBF Poses | getRBFPoseCount, getRBFPoseName, getRBFPoseJointOutputIndices, getRBFPoseBlendShapeChannelOutputIndices, getRBFPoseAnimatedMapOutputIndices, getRBFPoseJointOutputValues, getRBFPoseScale |
| RBF Pose Controls | getRBFPoseControlCount, getRBFPoseControlName |
Example
// reader is a concrete Reader implementation (not RBFBehaviorReader directly)
const std::uint16_t poseCount = reader->getRBFPoseCount();
for (std::uint16_t i = 0u; i < poseCount; ++i) {
StringView poseName = reader->getRBFPoseName(i);
float scale = reader->getRBFPoseScale(i);
ConstArrayView<std::uint16_t> jointIndices = reader->getRBFPoseJointOutputIndices(i);
ConstArrayView<float> jointValues = reader->getRBFPoseJointOutputValues(i);
// process pose outputs...
}
const std::uint16_t controlCount = reader->getRBFPoseControlCount();
for (std::uint16_t c = 0u; c < controlCount; ++c) {
StringView controlName = reader->getRBFPoseControlName(c);
// enumerate distinct RBF controls...
}
Constraints
- All
poseIndexarguments must be less thangetRBFPoseCount(); indices at or beyond this bound produce undefined behavior. - All
poseControlIndexarguments must be less thangetRBFPoseControlCount(). getRBFPoseControlCount()returns the number of distinct output control indices across all RBF poses — not the sum of per-pose control counts.
Watch out for
- Do not subclass
RBFBehaviorReaderdirectly. Implementations must inherit fromReaderitself, not from this interface — inheriting fromRBFBehaviorReaderbypasses requiredReaderinfrastructure. getRBFPoseControlCount()counts unique controls only. This is distinct from the per-pose index arrays returned bygetRBFPoseBlendShapeChannelOutputIndices,getRBFPoseJointOutputIndices, andgetRBFPoseAnimatedMapOutputIndices, which may reference the same control index in multiple poses.