Class DirectionByVector
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
A class for defining directions by a Vector3D. Despite this class just wraps a Vector3D, we need it in order to get a class which is derived from DirectionDefinitionBase.
[Serializable]
public class DirectionByVector : DirectionDefinitionBase, IEquatable<IObjectBase>, ICloneable, ISerializable, IDeserializationCallback
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationDirectionByVector
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
DirectionByVector()
Default constructor, creating a (0, 0, 1) direction.
public DirectionByVector()
DirectionByVector(DirectionByVector)
Copy constructor.
public DirectionByVector(DirectionByVector directionToCopy)
Parameters
directionToCopyDirectionByVectorDirection object to copy.
DirectionByVector(Vector3D)
Constructor with all parameters.
public DirectionByVector(Vector3D vector)
Parameters
vectorVector3DVector which represents the direction.
Properties
DefinitionType
Gets the DirectionDefinitionType.
public override DirectionDefinitionType DefinitionType { get; }
Property Value
Vector
The vector which represents the direction.
public Vector3D Vector { get; set; }
Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override DirectionDefinitionBase Clone()
Returns
- DirectionDefinitionBase
A new object that is a copy of this instance.
CorrespondingVector3D()
Gets the vector resulting from the implemented direction definition.
public override Vector3D CorrespondingVector3D()
Returns
- Vector3D
The vector resulting from the implemented direction definition.
Equals(object, EqualityIntent)
Determines whether the specified object is equal to this instance. Please note: If just the resulting direction of this and the otherObject shall be compared, a comparison of CorrespondingVector3D should be done.
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 physical equality.
Returns
ToString()
Overridden ToString method.
public override string ToString()