Point3f
References[StructLayout(LayoutKind.Sequential, Pack = 4, Size = 12)]
[DebuggerDisplay("({m_x}, {m_y}, {m_z})")]
[Serializable]
public struct Point3f : IEquatable<Point3f>, IComparable<Point3f>, IComparable, IEpsilonFComparable<Point3f>, IFormattable
Represents the three coordinates of a point in three-dimensional space, using float-precision floating point numbers.
Constructors
Properties
Each coordinate of the point must pass the RhinoMath.IsValidSingle(float) test.
Gets the value of a point at location RhinoMath.UnsetValue,RhinoMath.UnsetValue,RhinoMath.UnsetValue.
Methods
Computes the distance between two points.
Parameters:
| other (Point3f) | Other point for distance measurement. |
Returns: The length of the line between this and the other point; or 0 if any of the points is not valid.
Computes the squared distance between two points.
Parameters:
| other (Point3f) | Other point for distance measurement. |
Returns: The squared length of the line between this and the other point; or 0 if any of the points is not valid.
Check that all values in other are within epsilon of the values in this
Implements: EpsilonEquals
Equals
#Determines whether the specified System.Object is a Point3f and has the same values as the present point.
Parameters:
| obj (object) | The specified object. |
Returns: true if obj is Point3f and has the same coordinates as this; otherwise false.
Overrides: ValueType.Equals
Determines whether the specified Point3f has the same values as the present point.
Parameters:
| point (Point3f) | The specified point. |
Returns: true if point has the same coordinates as this; otherwise false.
GetHashCode
#Computes a hash code for the present point.
Returns: A non-unique integer that represents this point.
Overrides: ValueType.GetHashCode
Subtracts a point from another point.
(Provided for languages that do not support operator overloading. You can use the - operator otherwise)
Parameters:
| obj (object) |
ToString
#Constructs the string representation for the current point.
Returns: The point representation in the form X,Y,Z.
Overrides: ValueType.ToString
Formats the value of the current instance using the specified format.
Parameters:
| format (string) | The format to use. -or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation. |
| formatProvider (IFormatProvider) | The provider to use to format the value. -or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system. |
Returns: The value of the current instance in the specified format.
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| Point3f | + | Point3f | Point3f | Adds a point to another point. |
| Point3f | == | Point3f | bool | Determines whether two points have equal values. |
| Point3f | > | Point3f | bool | Determines whether the first specified point comes after (has superior sorting value than) the second point. Coordinates evaluation priority is first X, then Y, then Z. |
| Point3f | >= | Point3f | bool | Determines whether the first specified point comes after (has superior sorting value than) the second point, or it is equal to it. Coordinates evaluation priority is first X, then Y, then Z. |
| Point3f | != | Point3f | bool | Determines whether two points have different values. |
| Point3f | < | Point3f | bool | Determines whether the first specified point comes before (has inferior sorting value than) the second point. Coordinates evaluation priority is first X, then Y, then Z. |
| Point3f | <= | Point3f | bool | Determines whether the first specified point comes before (has inferior sorting value than) the second point, or it is equal to it. Coordinates evaluation priority is first X, then Y, then Z. |
| float | * | Point3f | Point3f | Multiplies a point by a factor. |
| Point3f | * | float | Point3f | Multiplies a point by a factor. |
| Point3f | - | Point3f | Vector3f | Subtracts a point from another point. |