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;
 }
Esempio n. 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;
 }
Esempio n. 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();
 }
 /// <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;
 }