A shape associated with an orientation.
 /// <summary>
 /// Constructs a minkowski sum shape.
 /// A minkowski sum can be created from more than two objects; use the other constructors.
 /// The sum will be recentered on its local origin.  The computed center is outputted by the other constructor.
 /// </summary>
 /// <param name="firstShape">First entry in the sum.</param>
 /// <param name="secondShape">Second entry in the sum.</param>
 public MinkowskiSumShape(OrientedConvexShapeEntry firstShape, OrientedConvexShapeEntry secondShape)
 {
     shapes.Add(firstShape);
     shapes.Add(secondShape);
     UpdateConvexShapeInfo();
     shapes.Changed += ShapesChanged;
 }
예제 #2
0
 /// <summary>
 /// Constructs a minkowski sum shape.
 /// A minkowski sum can be created from more than two objects; use the other constructors.
 /// The sum will be recentered on its local origin.
 /// </summary>
 /// <param name="firstShape">First entry in the sum.</param>
 /// <param name="secondShape">Second entry in the sum.</param>
 /// <param name="center">Center of the minkowski sum computed pre-recentering.</param>
 public MinkowskiSumShape(OrientedConvexShapeEntry firstShape, OrientedConvexShapeEntry secondShape, out Vector3 center)
     : this(firstShape, secondShape)
 {
     center = -localOffset;
 }
예제 #3
0
 /// <summary>
 /// Constructs a minkowski sum shape.
 /// A minkowski sum can be created from more than two objects; use the other constructors.
 /// The sum will be recentered on its local origin.  The computed center is outputted by the other constructor.
 /// </summary>
 /// <param name="firstShape">First entry in the sum.</param>
 /// <param name="secondShape">Second entry in the sum.</param>
 public MinkowskiSumShape(OrientedConvexShapeEntry firstShape, OrientedConvexShapeEntry secondShape)
 {
     shapes.Add(firstShape);
     shapes.Add(secondShape);
     shapes.Changed += ShapesChanged;
     OnShapeChanged();
     localOffset = -ComputeCenter();
 }
예제 #4
0
 /// <summary>
 /// Constructs a minkowski sum shape.
 /// A minkowski sum can be created from more than two objects; use the other constructors.
 /// The sum will be recentered on its local origin.
 /// </summary>
 /// <param name="firstShape">First entry in the sum.</param>
 /// <param name="secondShape">Second entry in the sum.</param>
 /// <param name="center">Center of the minkowski sum computed pre-recentering.</param>
 public MinkowskiSumShape(OrientedConvexShapeEntry firstShape, OrientedConvexShapeEntry secondShape, out Vector3 center)
     : this(firstShape, secondShape)
 {
     center = -localOffset;
 }