Struct RigidPose
- Namespace
- BepuPhysics
- Assembly
- BepuPhysics.dll
Represents a rigid transformation.
public struct RigidPose
- Inherited Members
Constructors
RigidPose(Vector3)
Creates a rigid pose with the given position and identity orientation.
public RigidPose(Vector3 position)
Parameters
position
Vector3Position of the pose.
RigidPose(Vector3, Quaternion)
Creates a rigid pose with the given position and orientation.
public RigidPose(Vector3 position, Quaternion orientation)
Parameters
position
Vector3Position of the pose.
orientation
QuaternionOrientation of the pose.
Fields
Orientation
Orientation of the pose.
public Quaternion Orientation
Field Value
Position
Position of the pose.
public Vector3 Position
Field Value
Properties
Identity
Returns a pose with a position at (0,0,0) and identity orientation.
public static RigidPose Identity { get; }
Property Value
Methods
Invert(in RigidPose, out RigidPose)
Inverts the rigid transformation of the pose.
public static void Invert(in RigidPose pose, out RigidPose inverse)
Parameters
MultiplyWithoutOverlap(in RigidPose, in RigidPose, out RigidPose)
Concatenates one rigid transform with another. The resulting transform is equivalent to performing transform a followed by transform b.
public static void MultiplyWithoutOverlap(in RigidPose a, in RigidPose b, out RigidPose result)
Parameters
a
RigidPoseFirst transform to concatenate.
b
RigidPoseSecond transform to concatenate.
result
RigidPoseResult of the concatenation.
ToString()
Returns a string representing the RigidPose as "Position, Orientation".
public override string ToString()
Returns
- string
String representing the RigidPose.
Transform(Vector3, in RigidPose, out Vector3)
Transforms a vector by the rigid pose: v * pose.Orientation + pose.Position.
public static void Transform(Vector3 v, in RigidPose pose, out Vector3 result)
Parameters
v
Vector3Vector to transform.
pose
RigidPosePose to transform the vector with.
result
Vector3Transformed vector.
TransformByInverse(Vector3, in RigidPose, out Vector3)
Transforms a vector by the inverse of a rigid pose: (v - pose.Position) * pose.Orientation^-1.
public static void TransformByInverse(Vector3 v, in RigidPose pose, out Vector3 result)
Parameters
v
Vector3Vector to transform.
pose
RigidPosePose to invert and transform the vector with.
result
Vector3Transformed vector.
Operators
implicit operator RigidPose(Quaternion)
Creates a pose by treating a Quaternion as an orientation in the pose. Position is set to zero.
public static implicit operator RigidPose(Quaternion orientation)
Parameters
orientation
QuaternionOrientation to use in the pose.
Returns
implicit operator RigidPose(Vector3)
Creates a pose by treating a Vector3 as a position. Orientation is set to identity.
public static implicit operator RigidPose(Vector3 position)
Parameters
position
Vector3Position to use in the pose.
Returns
implicit operator RigidPose((Vector3 position, Quaternion orientation))
Creates a pose from a tuple of a position and orientation.
public static implicit operator RigidPose((Vector3 position, Quaternion orientation) poseComponents)
Parameters
poseComponents
(Vector3 position, Quaternion orientation)Position and orientation to use in the pose.