Characteristic | Locus |
---|---|
Namespace | Meadow.Foundation.Graphics |
Assembly | MicroGraphics.dll |
Syntax
public struct Point3d
Constructors
Point3d(Int32, Int32, Int32)
Create a new Point3d struct
Declaration
public Point3d(int x = 0, int y = 0, int z = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | X value |
System.Int32 | y | Y value |
System.Int32 | z | Z value |
Properties
Empty
Create an empty / zero Point3d struct
Declaration
public static Point3d Empty { get; }
Property Value
Type | Description |
---|---|
Point3d |
IsEmpty
Is the struct empty / zero?
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Length
Length
Declaration
public double Length { get; }
Property Value
Type | Description |
---|---|
System.Double |
X
The X value
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Y
The Y value
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Z
The Z value
Declaration
public int Z { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Equals(Object)
Indicates whether this instance is equal to the specified object
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object instance to compare to |
Returns
Type | Description |
---|---|
System.Boolean | True if both instances are equal, false otherwise |
GetHashCode()
Returns the hash code for this instance
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | An int that represents the hash code for this instance |
Offset(Point3d)
Offset the current value
Declaration
public void Offset(Point3d point3d)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point3d | The point3d value to offset |
Offset(Int32, Int32, Int32)
Offset the Point3d values
Declaration
public void Offset(int x, int y, int z)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | X offset amount |
System.Int32 | y | Y offset amount |
System.Int32 | z | Z offset amount |
ToString()
String representation of the Point3d values
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The string |
Operators
Addition(Point3d, Point3d)
Translates the specified Point by the specified Size.
Declaration
public static Point3d operator +(Point3d point3d, Point3d amount3d)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point3d | The Point3d instance to translate. |
Point3d | amount3d | The Point3d instance to translate point with. |
Returns
Type | Description |
---|---|
Point3d | A new Point3d instance translated by size. |
Equality(Point3d, Point3d)
Compares two instances for equality
Declaration
public static bool operator ==(Point3d left, Point3d right)
Parameters
Type | Name | Description |
---|---|---|
Point3d | left | The first instance |
Point3d | right | The second instance |
Returns
Type | Description |
---|---|
System.Boolean | True if left is equal to right, false otherwise |
Inequality(Point3d, Point3d)
Compares two instances for inequality
Declaration
public static bool operator !=(Point3d left, Point3d right)
Parameters
Type | Name | Description |
---|---|---|
Point3d | left | The first instance |
Point3d | right | The second instance |
Returns
Type | Description |
---|---|
System.Boolean | True if left is not equal to right, false otherwise |
Subtraction(Point3d, Point3d)
Subtract the specified Point by another Point3d values
Declaration
public static Point3d operator -(Point3d point3d, Point3d amount3d)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point3d | The Point3d instance to translate |
Point3d | amount3d | The amount to subtract |
Returns
Type | Description |
---|---|
Point3d | A new Point3d instance translated by the amount |