static void AddBoneLine( HumanBodyBones bone, BoneLine bone_line, params object[] args ) { if( args.Length < 3 || bone == HumanBodyBones.Hips ) { return; } Material mat = (Material)args[0]; float parent_width = (float)args[1]; float child_width = (float)args[2]; if( bone >= HumanBodyBones.LeftThumbProximal && bone <= HumanBodyBones.RightLittleDistal ) { bone_line.AddRenderer( mat, parent_width / 3.0f, child_width / 3.0f, bone_line.transform.parent, bone_line.transform ); } else { bone_line.AddRenderer( mat, parent_width, child_width, bone_line.transform.parent, bone_line.transform ); } }
// remove bone line by transform //static NSH.OnRemoveBoneComponentTransform<BoneLine> delegate_remove_bone_line_tranform = new NSH.OnRemoveBoneComponentTransform<BoneLine>( RemoveBoneLineTransform ); static void RemoveBoneLineTransform(NeuronBones bone, BoneLine bone_line, params object[] args) { bone_line.RemoveRenderer(); }
// remove bone line by animator //static NSH.OnRemoveBoneComponent<BoneLine> delegate_remove_bone_line = new NSH.OnRemoveBoneComponent<BoneLine>( RemoveBoneLine ); static void RemoveBoneLine(HumanBodyBones bone, BoneLine bone_line, params object[] args) { bone_line.RemoveRenderer(); }
static void AddBoneLineTransform( NeuronBones bone, BoneLine bone_line, params object[] args ) { if( args.Length < 3 || bone == NeuronBones.Hips ) { return; } Material mat = (Material)args[0]; float parent_width = (float)args[1]; float child_width = (float)args[2]; if( bone >= NeuronBones.LeftHandThumb1 && bone <= NeuronBones.LeftHandPinky3 || bone >= NeuronBones.RightHandThumb1 && bone <= NeuronBones.RightHandPinky3 ) { bone_line.AddRenderer( mat, parent_width / 3.0f, child_width / 3.0f, bone_line.transform.parent, bone_line.transform ); } else { bone_line.AddRenderer( mat, parent_width, child_width, bone_line.transform.parent, bone_line.transform ); } }
static void RemoveBoneLineTransform( NeuronBones bone, BoneLine bone_line, params object[] args ) { bone_line.RemoveRenderer(); }
static void RemoveBoneLine( HumanBodyBones bone, BoneLine bone_line, params object[] args ) { bone_line.RemoveRenderer(); }