Bone CreateBone(double radius, double z1, double z2, Brush brush) { Bone bone = new Bone(radius, 1.5, brush, brush, brush); bone.SetLocation(new Point3D(0, 0, z1), new Point3D(0, 0, z2)); Children.Add(bone); return(bone); }
/// <summary> /// Visualize roll angle and direction to origin (or height above ground). /// </summary> public void Update(CameraBox Camera) { Vector3D leftDirection = Camera.LeftDirection.Rotate(Camera.LookDirection, -Camera.RollAngle); double length = 0.007; Point3D position = Camera.Position + (Camera.NearPlaneDistance + 1.1 * length) * Camera.LookDirection; Point3D pt = position + length * leftDirection; horizon.SetLocation(pt, pt + 2 * (position - pt)); Vector3D toTarget = TargetPoint - position; toTarget.Normalize(); targetIndicator.SetLocation(position, position + length * toTarget); }
Bone CreateBone(double radius, double z1, double z2, Brush brush) { Bone bone = new Bone(radius, 1.5, brush, brush, brush); bone.SetLocation(new Point3D(0, 0, z1), new Point3D(0, 0, z2)); Children.Add(bone); return bone; }