AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
GXYZ类 参考

Public 成员函数

 GXYZ ()
 
 GXYZ (double theX, double theY, double theZ)
 
void SetCoord (double theX, double theY, double theZ)
 
void SetCoord (int theIndex, double theXi)
 
void SetX (double theX)
 
void SetY (double theY)
 
void SetZ (double theZ)
 
double Coord (int theIndex)
 
void Coord (double[] theX, double[] theY, double[] theZ)
 
double X ()
 
double Y ()
 
double Z ()
 
double Modulus ()
 
double SquareModulus ()
 
boolean IsEqual (GXYZ theOther, double theTolerance)
 
void Add (GXYZ theOther)
 
GXYZ Added (GXYZ theOther)
 
void Cross (GXYZ theOther)
 
GXYZ Crossed (GXYZ theOther)
 
double CrossMagnitude (GXYZ theRight)
 
double CrossSquareMagnitude (GXYZ theRight)
 
void CrossCross (GXYZ theCoord1, GXYZ theCoord2)
 
GXYZ CrossCrossed (GXYZ theCoord1, GXYZ theCoord2)
 
void Divide (double theScalar)
 
GXYZ Divided (double theScalar)
 
double Dot (GXYZ theOther)
 
double DotCross (GXYZ theCoord1, GXYZ theCoord2)
 
void Multiply (double theScalar)
 
void Multiply (GXYZ theOther)
 
void Multiply (GMat theMatrix)
 
GXYZ Multiplied (double theScalar)
 
GXYZ Multiplied (GXYZ theOther)
 
GXYZ Multiplied (GMat theMatrix)
 
void Normalize ()
 
GXYZ Normalized ()
 
void Reverse ()
 
GXYZ Reversed ()
 
void Subtract (GXYZ theOther)
 
GXYZ Subtracted (GXYZ theOther)
 
void SetLinearForm (double theA1, GXYZ theXYZ1, double theA2, GXYZ theXYZ2, double theA3, GXYZ theXYZ3, GXYZ theXYZ4)
 
void SetLinearForm (double theA1, GXYZ theXYZ1, double theA2, GXYZ theXYZ2, double theA3, GXYZ theXYZ3)
 
void SetLinearForm (double theA1, GXYZ theXYZ1, double theA2, GXYZ theXYZ2, GXYZ theXYZ3)
 
void SetLinearForm (double theA1, GXYZ theXYZ1, double theA2, GXYZ theXYZ2)
 
void SetLinearForm (double theA1, GXYZ theXYZ1, GXYZ theXYZ2)
 
void SetLinearForm (GXYZ theXYZ1, GXYZ theXYZ2)
 

详细描述

This class describes a cartesian coordinate entity in 3D space {X,Y,Z}. This entity is used for algebraic calculation. This entity can be transformed with a "Trsf" or a "GTrsf" from package "gp". It is used in vectorial computations or for holding this type of information in data structures.

构造及析构函数说明

◆ GXYZ() [1/2]

GXYZ.GXYZ ( )

Creates an XYZ object with zero coordinates (0,0,0)

◆ GXYZ() [2/2]

GXYZ.GXYZ ( double theX,
double theY,
double theZ )

creates an XYZ with given coordinates

成员函数说明

◆ Add()

void GXYZ.Add ( GXYZ theOther)

<me>.X() = <me>.X() + theOther.X() <me>.Y() = <me>.Y() + theOther.Y() <me>.Z() = <me>.Z() + theOther.Z()

◆ Added()

GXYZ GXYZ.Added ( GXYZ theOther)

new.X() = <me>.X() + theOther.X() new.Y() = <me>.Y() + theOther.Y() new.Z() = <me>.Z() + theOther.Z()

◆ Coord()

double GXYZ.Coord ( int theIndex)

returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raises OutOfRange if theIndex != {1, 2, 3}.

◆ Cross()

void GXYZ.Cross ( GXYZ theOther)

<me>.X() = <me>.Y() * theOther.Z() - <me>.Z() * theOther.Y() <me>.Y() = <me>.Z() * theOther.X() - <me>.X() * theOther.Z() <me>.Z() = <me>.X() * theOther.Y() - <me>.Y() * theOther.X()

◆ CrossCross()

void GXYZ.CrossCross ( GXYZ theCoord1,
GXYZ theCoord2 )

Triple vector product Computes <me> = <me>.Cross(theCoord1.Cross(theCoord2))

◆ CrossCrossed()

GXYZ GXYZ.CrossCrossed ( GXYZ theCoord1,
GXYZ theCoord2 )

Triple vector product computes New = <me>.Cross(theCoord1.Cross(theCoord2))

◆ Crossed()

GXYZ GXYZ.Crossed ( GXYZ theOther)

new.X() = <me>.Y() * theOther.Z() - <me>.Z() * theOther.Y() new.Y() = <me>.Z() * theOther.X() - <me>.X() * theOther.Z() new.Z() = <me>.X() * theOther.Y() - <me>.Y() * theOther.X()

◆ CrossMagnitude()

double GXYZ.CrossMagnitude ( GXYZ theRight)

Computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||

◆ CrossSquareMagnitude()

double GXYZ.CrossSquareMagnitude ( GXYZ theRight)

Computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2

◆ Divide()

void GXYZ.Divide ( double theScalar)

divides <me> by a real.

◆ Divided()

GXYZ GXYZ.Divided ( double theScalar)

divides <me> by a real.

◆ Dot()

double GXYZ.Dot ( GXYZ theOther)

computes the scalar product between <me> and theOther

◆ DotCross()

double GXYZ.DotCross ( GXYZ theCoord1,
GXYZ theCoord2 )

computes the triple scalar product

◆ IsEqual()

boolean GXYZ.IsEqual ( GXYZ theOther,
double theTolerance )

Returns True if he coordinates of this XYZ object are equal to the respective coordinates Other, within the specified tolerance theTolerance. I.e.: abs(<me>.X() - theOther.X()) <= theTolerance and abs(<me>.Y() - theOther.Y()) <= theTolerance and abs(<me>.Z() - theOther.Z()) <= theTolerance.

◆ Modulus()

double GXYZ.Modulus ( )

computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this XYZ object.

◆ Multiplied() [1/3]

GXYZ GXYZ.Multiplied ( double theScalar)

New.X() = <me>.X() * theScalar; New.Y() = <me>.Y() * theScalar; New.Z() = <me>.Z() * theScalar;

◆ Multiplied() [2/3]

GXYZ GXYZ.Multiplied ( GMat theMatrix)

New = theMatrix * <me>

◆ Multiplied() [3/3]

GXYZ GXYZ.Multiplied ( GXYZ theOther)

new.X() = <me>.X() * theOther.X(); new.Y() = <me>.Y() * theOther.Y(); new.Z() = <me>.Z() * theOther.Z();

◆ Multiply() [1/3]

void GXYZ.Multiply ( double theScalar)

<me>.X() = <me>.X() * theScalar; <me>.Y() = <me>.Y() * theScalar; <me>.Z() = <me>.Z() * theScalar;

◆ Multiply() [2/3]

void GXYZ.Multiply ( GMat theMatrix)

<me> = theMatrix * <me>

◆ Multiply() [3/3]

void GXYZ.Multiply ( GXYZ theOther)

<me>.X() = <me>.X() * theOther.X(); <me>.Y() = <me>.Y() * theOther.Y(); <me>.Z() = <me>.Z() * theOther.Z();

◆ Normalize()

void GXYZ.Normalize ( )

<me>.X() = <me>.X()/ <me>.Modulus() <me>.Y() = <me>.Y()/ <me>.Modulus() <me>.Z() = <me>.Z()/ <me>.Modulus() Raised if <me>.Modulus() <= Resolution from gp

◆ Normalized()

GXYZ GXYZ.Normalized ( )

New.X() = <me>.X()/ <me>.Modulus() New.Y() = <me>.Y()/ <me>.Modulus() New.Z() = <me>.Z()/ <me>.Modulus() Raised if <me>.Modulus() <= Resolution from gp

◆ Reverse()

void GXYZ.Reverse ( )

<me>.X() = -<me>.X() <me>.Y() = -<me>.Y() <me>.Z() = -<me>.Z()

◆ Reversed()

GXYZ GXYZ.Reversed ( )

New.X() = -<me>.X() New.Y() = -<me>.Y() New.Z() = -<me>.Z()

◆ SetCoord() [1/2]

void GXYZ.SetCoord ( double theX,
double theY,
double theZ )

For this XYZ object, assigns the values theX, theY and theZ to its three coordinates

◆ SetCoord() [2/2]

void GXYZ.SetCoord ( int theIndex,
double theXi )

modifies the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raises OutOfRange if theIndex != {1, 2, 3}.

◆ SetLinearForm() [1/6]

void GXYZ.SetLinearForm ( double theA1,
GXYZ theXYZ1,
double theA2,
GXYZ theXYZ2 )

<me> is set to the following linear form : theA1 * theXYZ1 + theA2 * theXYZ2

◆ SetLinearForm() [2/6]

void GXYZ.SetLinearForm ( double theA1,
GXYZ theXYZ1,
double theA2,
GXYZ theXYZ2,
double theA3,
GXYZ theXYZ3 )

<me> is set to the following linear form : theA1 * theXYZ1 + theA2 * theXYZ2 + theA3 * theXYZ3

◆ SetLinearForm() [3/6]

void GXYZ.SetLinearForm ( double theA1,
GXYZ theXYZ1,
double theA2,
GXYZ theXYZ2,
double theA3,
GXYZ theXYZ3,
GXYZ theXYZ4 )

<me> is set to the following linear form : theA1 * theXYZ1 + theA2 * theXYZ2 + theA3 * theXYZ3 + theXYZ4

◆ SetLinearForm() [4/6]

void GXYZ.SetLinearForm ( double theA1,
GXYZ theXYZ1,
double theA2,
GXYZ theXYZ2,
GXYZ theXYZ3 )

<me> is set to the following linear form : theA1 * theXYZ1 + theA2 * theXYZ2 + theXYZ3

◆ SetLinearForm() [5/6]

void GXYZ.SetLinearForm ( double theA1,
GXYZ theXYZ1,
GXYZ theXYZ2 )

<me> is set to the following linear form : theA1 * theXYZ1 + theXYZ2

◆ SetLinearForm() [6/6]

void GXYZ.SetLinearForm ( GXYZ theXYZ1,
GXYZ theXYZ2 )

<me> is set to the following linear form : theXYZ1 + theXYZ2

◆ SetX()

void GXYZ.SetX ( double theX)

Assigns the given value to the X coordinate

◆ SetY()

void GXYZ.SetY ( double theY)

Assigns the given value to the Y coordinate

◆ SetZ()

void GXYZ.SetZ ( double theZ)

Assigns the given value to the Z coordinate

◆ SquareModulus()

double GXYZ.SquareModulus ( )

Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this XYZ object.

◆ Subtract()

void GXYZ.Subtract ( GXYZ theOther)

<me>.X() = <me>.X() - theOther.X() <me>.Y() = <me>.Y() - theOther.Y() <me>.Z() = <me>.Z() - theOther.Z()

◆ Subtracted()

GXYZ GXYZ.Subtracted ( GXYZ theOther)

new.X() = <me>.X() - theOther.X() new.Y() = <me>.Y() - theOther.Y() new.Z() = <me>.Z() - theOther.Z()

◆ X()

double GXYZ.X ( )

Returns the X coordinate

◆ Y()

double GXYZ.Y ( )

Returns the Y coordinate

◆ Z()

double GXYZ.Z ( )

Returns the Z coordinate