// TODO CODE DEBT refactor this into a TextureProvider and a TextureSet private static void ensureTexturesLoaded() { if (textures[0] != null) return; textures[0] = new TextureSet(TDVBasicGame.Default, "f1"); textures[0].causeLoadContent(); textures[1] = new TextureSet(TDVBasicGame.Default, "f2"); textures[1].causeLoadContent(); textures[2] = new TextureSet(TDVBasicGame.Default, "m1"); textures[2].causeLoadContent(); textures[3] = new TextureSet(TDVBasicGame.Default, "m2"); textures[3].causeLoadContent(); }
internal void DrawSkirtBone(JointCollection jointCollection, TextureSet textures) { if (jointCollection[JointType.HipCenter].TrackingState != JointTrackingState.Tracked)return; Vector2 start = this.mapMethod(jointCollection[JointType.HipCenter].Position); Vector2 end; if (jointCollection[JointType.KneeRight].TrackingState != JointTrackingState.Tracked && jointCollection[JointType.KneeLeft].TrackingState != JointTrackingState.Tracked ) { end = this.mapMethod(jointCollection[JointType.HipCenter].Position); end.Y += 150; // make the skirt directly below in worst case } else if (jointCollection[JointType.KneeRight].TrackingState != JointTrackingState.Tracked) { end = this.mapMethod(jointCollection[JointType.KneeLeft].Position); end.X = start.X; } else if (jointCollection[JointType.KneeLeft].TrackingState != JointTrackingState.Tracked) { end = this.mapMethod(jointCollection[JointType.KneeRight].Position); end.X = start.X; } else { end = this.mapMethod(jointCollection[JointType.KneeLeft].Position); end += this.mapMethod(jointCollection[JointType.KneeRight].Position); end.X /= 2; end.Y /= 2; } float depth = jointCollection[JointType.HipCenter].Position.Z; DrawBoneLike(depth, start, end, textures.pelvisTexture); }
public BackCharacterElements(CartoonElements cartooner, Microsoft.Kinect.Skeleton skeleton, TextureSet ts) { this.skeleton = skeleton; this.cartooner = cartooner; this.textures = ts; }