예제 #1
0
 /// <summary>
 /// Pick the shape in the view. Use helper function trace the local bounding box.
 /// </summary>
 /// <param name="rayStart">trace ray start</param>
 /// <param name="rayEnd">trace ray end</param>
 /// <param name="result">esult structure to fill in</param>
 public override void OnTraceShape(ShapeTraceMode_e mode, Vector3F rayStart, Vector3F rayEnd, ref ShapeTraceResult result)
 {
     if (HasEngineInstance() && mode == ShapeTraceMode_e.ShapePicking)
     {
         EngineNode.TraceShape(this, rayStart, rayEnd, ref result);
     }
 }
예제 #2
0
 /// <summary>
 /// Pick the shape in the view. Use helper function trace the local bounding box.
 /// </summary>
 /// <param name="rayStart">trace ray start</param>
 /// <param name="rayEnd">trace ray end</param>
 /// <param name="result">esult structure to fill in</param>
 public override void OnTraceShape(ShapeTraceMode_e mode, Vector3F rayStart, Vector3F rayEnd, ref ShapeTraceResult result)
 {
     if (ConversionUtils.TraceOrientedBoundingBox(LocalBoundingBox, Position, RotationMatrix, rayStart, rayEnd, ref result))
     {
         result.hitShape = this;
     }
 }
예제 #3
0
 public override void OnTraceShape(ShapeTraceMode_e mode, Vector3F rayStart, Vector3F rayEnd, ref ShapeTraceResult result)
 {
     if (mode == ShapeTraceMode_e.ShapePicking && _engineInstance != null)
     {
         _engineInstance.TraceShape(this, rayStart, rayEnd, ref result);
     }
 }
예제 #4
0
 /// <summary>
 /// Overridden trace function
 /// </summary>
 /// <param name="mode"></param>
 /// <param name="rayStart">ray start position</param>
 /// <param name="rayEnd">ray end position</param>
 /// <param name="result">trace result</param>
 public override void OnTraceShape(ShapeTraceMode_e mode, Vector3F rayStart,Vector3F rayEnd, ref ShapeTraceResult result)
 {
     if (mode!=ShapeTraceMode_e.ShapePicking)
     return;
       if (ConversionUtils.TraceOrientedBoundingBox(LocalBoundingBox,Position,RotationMatrix, rayStart,rayEnd, ref result))
     result.hitShape = this;
 }
예제 #5
0
 /// <summary>
 /// Overridden trace function
 /// </summary>
 /// <param name="mode"></param>
 /// <param name="rayStart">ray start position</param>
 /// <param name="rayEnd">ray end position</param>
 /// <param name="result">trace result</param>
 public override void OnTraceShape(ShapeTraceMode_e mode, Vector3F rayStart, Vector3F rayEnd, ref ShapeTraceResult result)
 {
     if (mode == ShapeTraceMode_e.ShapePicking) // accurate picking should only be implemented for picking, not drop to floor
     base.OnTraceShape(mode, rayStart, rayEnd, ref result);
 }
 public override void OnTraceShape(ShapeTraceMode_e mode, Vector3F rayStart, Vector3F rayEnd, ref ShapeTraceResult result)
 {
     if (mode == ShapeTraceMode_e.ShapePicking && _engineInstance != null)
     _engineInstance.TraceShape(this, rayStart, rayEnd, ref result);
 }
예제 #7
0
 /// <summary>
 /// Pick the shape in the view. Use helper function trace the local bounding box.
 /// </summary>
 /// <param name="rayStart">trace ray start</param>
 /// <param name="rayEnd">trace ray end</param>
 /// <param name="result">esult structure to fill in</param>
 public override void OnTraceShape(ShapeTraceMode_e mode, Vector3F rayStart, Vector3F rayEnd, ref ShapeTraceResult result)
 {
     if (HasEngineInstance())
     {
         EngineNode.TraceShape(this, rayStart, rayEnd, ref result);
     }
 }