Beispiel #1
0
 internal static extern void Internal_DrawBoundingBox(ref BoundingBox box, ref Color color, float duration, bool depthTest);
Beispiel #2
0
 /// <summary>
 /// Writes the BoundingBox to the binary stream.
 /// </summary>
 /// <param name="stream">The stream.</param>
 /// <param name="value">The value to write.</param>
 public static void Write(this BinaryWriter stream, BoundingBox value)
 {
     stream.Write(value.Minimum);
     stream.Write(value.Maximum);
 }
Beispiel #3
0
 /// <summary>
 /// Determines if there is an intersection between the current object and a <see cref="BoundingBox" />.
 /// </summary>
 /// <param name="box">The box to test.</param>
 /// <param name="point">
 /// When the method completes, contains the point of intersection,
 /// or <see cref="Vector3.Zero" /> if there was no intersection.
 /// </param>
 /// <returns>Whether the two objects intersected.</returns>
 public bool Intersects(ref BoundingBox box, out Vector3 point)
 {
     return(CollisionsHelper.RayIntersectsBox(ref this, ref box, out point));
 }
Beispiel #4
0
 /// <summary>
 /// Determines if there is an intersection between the current object and a <see cref="BoundingBox" />.
 /// </summary>
 /// <param name="box">The box to test.</param>
 /// <param name="distance">
 /// When the method completes, contains the distance of the intersection,
 /// or 0 if there was no intersection.
 /// </param>
 /// <returns>Whether the two objects intersected.</returns>
 public bool Intersects(ref BoundingBox box, out float distance)
 {
     return(CollisionsHelper.RayIntersectsBox(ref this, ref box, out distance));
 }
Beispiel #5
0
 /// <summary>
 /// Determines if there is an intersection between the current object and a <see cref="BoundingBox" />.
 /// </summary>
 /// <param name="box">The box to test.</param>
 /// <returns>Whether the two objects intersected.</returns>
 public bool Intersects(BoundingBox box)
 {
     return(Intersects(ref box));
 }
Beispiel #6
0
 /// <summary>
 /// Determines if there is an intersection between the current object and a <see cref="BoundingBox" />.
 /// </summary>
 /// <param name="box">The box to test.</param>
 /// <returns>Whether the two objects intersected.</returns>
 public PlaneIntersectionType Intersects(ref BoundingBox box)
 {
     return(CollisionsHelper.PlaneIntersectsBox(ref this, ref box));
 }
 /// <summary>
 /// Draws the box.
 /// </summary>
 /// <param name="box">The box.</param>
 /// <param name="color">The color.</param>
 /// <param name="duration">The duration (in seconds). Use 0 to draw it only once.</param>
 /// <param name="depthTest">If set to <c>true</c> depth test will be performed, otherwise depth will be ignored.</param>
 public static void DrawBox(BoundingBox box, Color color, float duration = 0.0f, bool depthTest = true)
 {
 }