Class OrientedPlane
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
Class describing planes with a right-hand orientation. Data are stored in parametrized form, i.e. as one point and two vectors. The third base vector gives the orientated normal vector.
public class OrientedPlane : ObjectBase, IEquatable<IObjectBase>, ICloneable
- Inheritance
-
ObjectBaseOrientedPlane
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
OrientedPlane(CartesianCoordinateSystem, CoordinatePlane)
Constructor that gets a CartesianCoordinateSystem from which one plane is extracted.
public OrientedPlane(CartesianCoordinateSystem coordinateSystemToGetPlaneFrom, CoordinatePlane plane)
Parameters
coordinateSystemToGetPlaneFromCartesianCoordinateSystemCartesianCoordinateSystem to extract the plane from.
planeCoordinatePlaneWhich plane shall be extracted?
OrientedPlane(CoordinateSystemBaseVectors, Position)
Constructor with CoordinateSystemBaseVectors and a separate Position which define the plane.
public OrientedPlane(CoordinateSystemBaseVectors baseVectors, Position pos)
Parameters
baseVectorsCoordinateSystemBaseVectorsThe two vectors that span the plane (XAxis and YAxis), and the orientated normal vector (ZAxis).
posPositionOne point that lies in the plane.
OrientedPlane(OrientedPlane)
Copy constructor.
public OrientedPlane(OrientedPlane orientedPLane)
Parameters
orientedPLaneOrientedPlaneOriented plane to be copied.
OrientedPlane(Position, Position, Position)
Construct an OrientedPlane from three non-collinear points defined in same (reference) coordinate system The reference coordinate system is defined via point1.ReferenceCoordinateSystem and point2.ReferenceCoordinateSystem and point3.ReferenceCoordinateSystem, respectively. The first point will be the origin.
public OrientedPlane(Position point1, Position point2, Position point3)
Parameters
OrientedPlane(Position, Vector3D)
Constructor to create the plane from one point and the normal vector of the plane. IMPORTANT: The parameters DO NOT define certain directions of the base vectors! These will be somewhat arbitrary. So, please use this constructor only if the zeta-Rotation of this plane doesn't matter!
public OrientedPlane(Position pointInPlane, Vector3D normalVector)
Parameters
pointInPlanePositionThe point in the plane.
normalVectorVector3DThe normal vector of the plane, relative to the reference CS of the parameter pointInPlane.
OrientedPlane(Position, Vector3D, Vector3D)
Constructor to create the plane from one point and two vectors in the plane.
public OrientedPlane(Position pointInPlane, Vector3D xAxis, Vector3D yAxis)
Parameters
pointInPlanePositionThe point in the plane.
xAxisVector3Dx-Axis of the coordinate system whose x-y-plane is the OrientedPlane.
yAxisVector3Dy-Axis of the coordinate system whose x-y-plane is the OrientedPlane.
Properties
BaseVectors
The two vectors that span the plane (XAxis and YAxis), and the orientated normal vector (ZAxis).
public CoordinateSystemBaseVectors BaseVectors { get; set; }
Property Value
GetPositioningReference
Property to get the coordinate system that serves as reference for this object
public CartesianCoordinateSystem GetPositioningReference { get; }
Property Value
IsDefinedAbsolutely
Are the plane position and orientation defined absolutely?
public bool IsDefinedAbsolutely { get; }
Property Value
NormalVector
Get the normalized normal vector of the plane
public Vector3D NormalVector { get; }
Property Value
PlaneAsCoordinateSystem
Get this plane as a coordinate system (x-y-plane, with normal vector z)
public CartesianCoordinateSystem PlaneAsCoordinateSystem { get; }
Property Value
Position
One point that lies in the plane.
public Position Position { get; set; }
Property Value
Methods
Clone()
Clones the current object.
public override object Clone()
Returns
- object
Deep copy of this object.
Equals(object, EqualityIntent)
Determines whether the specified object is equal to this instance.
public override bool Equals(object otherObject, EqualityIntent equalityIntent)
Parameters
otherObjectobjectThe object to compare with this instance.
equalityIntentEqualityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.
Returns
ImplicitRepresentation(out double, out double, out double, out double, bool)
Gives the implicit representation of the plane Ax + By + Cz = D. As the normal vector (BaseVectors.ZAxis) is already normalized (|BaseVectors.ZAxis| = 1), the resulting parameters are equal to those of HESS's normal form, except for the sign
public void ImplicitRepresentation(out double A, out double B, out double C, out double D, bool hessNormalForm = false)
Parameters
AdoubleReturns the parameter A.
BdoubleReturns the parameter B.
CdoubleReturns the parameter C.
DdoubleReturns the parameter D.
hessNormalFormboolIf set to
true, the signs are corrected so that the parameters give the HESS's normal form. Optional parameter,falseby default.
SetPositioningReference(IProvidesPositioningReferences, string)
Method to set the PositioningReferenceProvider and the key for the coordinate system that serves as positioning reference
public void SetPositioningReference(IProvidesPositioningReferences referenceProvider, string key)
Parameters
referenceProviderIProvidesPositioningReferencesObject which provides the coordinate system that serves as reference for this position.
keystringKey for the coordinate system (contained by PositioningReferenceProvider) which shall serve as reference for this position