Table of Contents

Class PairZr

Namespace
Hi.Geom
Assembly
HiGeom.dll

Value pair of Z and R.

public class PairZr : IMakeXmlSource, IExpandToBox3d, IEqualityOperators<PairZr, PairZr, bool>, IAdditionOperators<PairZr, PairZr, PairZr>, ISubtractionOperators<PairZr, PairZr, PairZr>, IMultiplyOperators<PairZr, double, PairZr>, IDivisionOperators<PairZr, double, PairZr>
Inheritance
PairZr
Implements
Inherited Members
Extension Methods

Constructors

PairZr()

Ctor.

public PairZr()

PairZr(PairZr)

Copy ctor.

public PairZr(PairZr src)

Parameters

src PairZr

PairZr(double, double)

Ctor.

public PairZr(double z, double r)

Parameters

z double

see Z

r double

see R

PairZr(string)

Ctor.

public PairZr(string src)

Parameters

src string

PairZr(XElement)

Ctor.

public PairZr(XElement src)

Parameters

src XElement

XML

Properties

R

R value.

public double R { get; set; }

Property Value

double

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Z

Z value.

public double Z { get; set; }

Property Value

double

ZR

(x,y)=(z,r).

public Vec2d ZR { get; set; }

Property Value

Vec2d

Methods

Equals(PairZr)

public bool Equals(PairZr other)

Parameters

other PairZr

Returns

bool

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

ExpandToBox3d(Box3d)

Expands the destination box. This function is usually used to compute the bounding box of elements.

public void ExpandToBox3d(Box3d dst)

Parameters

dst Box3d

Destination box

GenCircle(int)

Generates a collection of Vec3d points forming a circle at the Z coordinate with radius R.

public IEnumerable<Vec3d> GenCircle(int posNum)

Parameters

posNum int

The number of points to generate around the circle

Returns

IEnumerable<Vec3d>

An enumerable collection of Vec3d points

GenPolarCircle(int)

Generates a collection of Polar3d points forming a circle at the Z coordinate with radius R.

public IEnumerable<Polar3d> GenPolarCircle(int posNum)

Parameters

posNum int

The number of points to generate around the circle

Returns

IEnumerable<Polar3d>

An enumerable collection of Polar3d points

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MakeXmlSource(string, string)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

Returns

XElement

An XML element representing the object's state

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator +(PairZr, PairZr)

Addition operator that adds two PairZr instances.

public static PairZr operator +(PairZr left, PairZr right)

Parameters

left PairZr

The left operand

right PairZr

The right operand

Returns

PairZr

A new PairZr instance with the sum of Z and R values

operator /(PairZr, double)

Division operator that divides a PairZr instance by a scalar value.

public static PairZr operator /(PairZr left, double right)

Parameters

left PairZr

The PairZr instance

right double

The scalar value

Returns

PairZr

A new PairZr instance with Z and R values divided by the scalar

operator ==(PairZr, PairZr)

Equality operator that compares two PairZr instances.

public static bool operator ==(PairZr left, PairZr right)

Parameters

left PairZr

The left operand

right PairZr

The right operand

Returns

bool

True if both instances are equal; otherwise, false

operator !=(PairZr, PairZr)

Inequality operator that compares two PairZr instances.

public static bool operator !=(PairZr left, PairZr right)

Parameters

left PairZr

The left operand

right PairZr

The right operand

Returns

bool

True if the instances are not equal; otherwise, false

operator *(PairZr, double)

Multiplication operator that multiplies a PairZr instance by a scalar value.

public static PairZr operator *(PairZr left, double right)

Parameters

left PairZr

The PairZr instance

right double

The scalar value

Returns

PairZr

A new PairZr instance with Z and R values multiplied by the scalar

operator -(PairZr, PairZr)

Subtraction operator that subtracts one PairZr instance from another.

public static PairZr operator -(PairZr a, PairZr b)

Parameters

a PairZr

The left operand

b PairZr

The right operand to subtract

Returns

PairZr

A new PairZr instance with the difference of Z and R values