public virtual void ConnectToAnimationComponent(AnimationComponent animationComponent) { foreach (SceneNode child in mChildren) { child.ConnectToAnimationComponent(animationComponent); } }
public override void ConnectToAnimationComponent(AnimationComponent animationComponent) { foreach (KeyValuePair<TraversalContext.MaterialFlags, EffectApplication> kvp in mMaterials) { if (kvp.Value.ParamSetters.ContainsKey(ParamSetter.Category.Skin)) ((SkinParamSetter)(kvp.Value.ParamSetters[ParamSetter.Category.Skin])).AnimationComponent = animationComponent; } }
protected virtual void ComponentsCreatedHandler(object sender, EventArgs e) { AnimationComponent animationComponent = Owner.GetComponent <AnimationComponent>(ComponentType.Animation); if (animationComponent != null) { SceneGraph.ConnectToAnimationComponent(animationComponent); } }
public override void ConnectToAnimationComponent(AnimationComponent animationComponent) { foreach (KeyValuePair <TraversalContext.MaterialFlags, EffectApplication> kvp in mMaterials) { if (kvp.Value.ParamSetters.ContainsKey(ParamSetter.Category.Skin)) { ((SkinParamSetter)(kvp.Value.ParamSetters[ParamSetter.Category.Skin])).AnimationComponent = animationComponent; } } }
public override void Set(Effect effect, RenderContext context, Matrix transform) { if (AnimationComponent != null) { EffectRegistry.Params[effect][EffectRegistry.POSEDBONES_PARAM_NAME].SetValue(AnimationComponent.GetCurrentPose()); EffectRegistry.Params[effect][EffectRegistry.WEIGHTS_PER_VERT_PARAM_NAME].SetValue(AnimationComponent.Animations.WeightsPerVert); } else { EffectRegistry.Params[effect][EffectRegistry.POSEDBONES_PARAM_NAME].SetValue(AnimationComponent.BindPose); EffectRegistry.Params[effect][EffectRegistry.WEIGHTS_PER_VERT_PARAM_NAME].SetValue(4); } }
public SkinParamSetter() { AnimationComponent = null; }