internal PlayerModel( int playerIndex, int asioChannel, HolofunkModel holofunkModel) { m_playerIndex = playerIndex; m_asioChannel = asioChannel; m_parent = holofunkModel; // TODO: EVIL INIT ORDER DEPENDENCY: hand models contain state machines, which update scene graphs on initialization! m_playerSceneGraph = new PlayerSceneGraph(holofunkModel.SceneGraph, playerIndex, asioChannel); m_leftHandModel = new PlayerHandModel(this, false); m_rightHandModel = new PlayerHandModel(this, true); // the microphone has only per-loop parameters m_microphoneParameters = AllEffects.CreateParameterMap(); }
public PlayerHandSceneGraph(PlayerSceneGraph parent, bool isRight) { m_parent = parent; m_isRight = isRight; RootNode = new GroupNode(parent.RootNode, Transform.Identity, isRight ? "Left Hand" : "Right Hand"); m_handGroup = new GroupNode(RootNode, Transform.Identity, isRight ? "Right Group" : "Left Group"); m_handMikeSignal = new TrackNode( m_handGroup, new Transform(Vector2.Zero, new Vector2(MagicNumbers.LoopieScale)), "MikeSignal", parent.Content, -1, null, true, () => parent.Audio.LevelRatio(parent.Channel) * 0.5f, () => m_handMikeSignalColor, () => Color.White, // TODO: revive beat meter on current recording () => new Duration<Sample>(0), () => 0, () => m_handMikeSignalColor, () => 1f); m_handNode = new SpriteNode(m_handGroup, isRight ? "Right Hand" : "Left Hand", null); m_handNode.Origin = new Vector2(0.5f); m_handNode.SetSecondaryViewOption(SecondaryViewOption.PositionMirrored | SecondaryViewOption.TextureMirrored); m_effectLabelGroup = new GroupNode(m_handGroup, Transform.Identity, "Effect label group"); m_effectLabelGroup.SetSecondaryViewOption(SecondaryViewOption.PositionMirrored); m_effectLabels = MakeEffectLabels(m_effectLabelGroup); m_armPoseLabel = new TextNode(RootNode, "Elbow label"); m_armPoseLabel.Alignment = isRight ? Alignment.TopLeft : Alignment.TopRight; m_armPoseLabel.SetSecondaryViewOption(SecondaryViewOption.Hidden); }
internal PlayerTimeSpaceSceneGraph(PlayerSceneGraph parent) : base() { m_parent = parent; }