|
AnyCAD Rapid API 2026
Help you to create a better world!
|
Defines a non-persistent vector in 3D space. 更多...
Public 成员函数 | |
| GVec (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| GVec () | |
| Creates a zero vector. | |
| GVec (GDir theV) | |
| Creates a unitary vector from a direction theV. | |
| GVec (GXYZ theCoord) | |
| Creates a vector with a triplet of coordinates. | |
| GVec (double theXv, double theYv, double theZv) | |
| Creates a point with its three cartesian coordinates. | |
| GVec (GPnt theP1, GPnt theP2) | |
| Creates a vector from two points. The length of the vector is the distance between theP1 and theP2 | |
| void | SetCoord (int theIndex, double theXi) |
| Changes the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}. | |
| void | SetCoord (double theXv, double theYv, double theZv) |
| For this vector, assigns - the values theXv, theYv and theZv to its three coordinates. | |
| void | SetX (double theX) |
| Assigns the given value to the X coordinate of this vector. | |
| void | SetY (double theY) |
| Assigns the given value to the X coordinate of this vector. | |
| void | SetZ (double theZ) |
| Assigns the given value to the X coordinate of this vector. | |
| void | SetXYZ (GXYZ theCoord) |
| Assigns the three coordinates of theCoord to this vector. | |
| double | Coord (int theIndex) |
| Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raised if theIndex != {1, 2, 3}. | |
| void | Coord (ref double theXv, ref double theYv, ref double theZv) |
| For this vector returns its three coordinates theXv, theYv, and theZv inline | |
| double | X () |
| For this vector, returns its X coordinate. | |
| double | Y () |
| For this vector, returns its Y coordinate. | |
| double | Z () |
| For this vector, returns its Z coordinate. | |
| GXYZ | XYZ () |
| For this vector, returns - its three coordinates as a number triple | |
| bool | IsEqual (GVec theOther, double theLinearTolerance, double theAngularTolerance) |
| Returns True if the two vectors have the same magnitude value and the same direction. The precision values are theLinearTolerance for the magnitude and theAngularTolerance for the direction. | |
| bool | IsNormal (GVec theOther, double theAngularTolerance) |
| Returns True if abs(<me>.Angle(theOther) - PI/2.) <= theAngularTolerance Raises VectorWithNullMagnitude if <me>.Magnitude() <= Resolution or theOther.Magnitude() <= Resolution from gp | |
| bool | IsOpposite (GVec theOther, double theAngularTolerance) |
| Returns True if PI - <me>.Angle(theOther) <= theAngularTolerance Raises VectorWithNullMagnitude if <me>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp | |
| bool | IsParallel (GVec theOther, double theAngularTolerance) |
| Returns True if Angle(<me>, theOther) <= theAngularTolerance or PI - Angle(<me>, theOther) <= theAngularTolerance This definition means that two parallel vectors cannot define a plane but two vectors with opposite directions are considered as parallel. Raises VectorWithNullMagnitude if <me>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp | |
| double | Angle (GVec theOther) |
| Computes the angular value between <me> and <theOther> Returns the angle value between 0 and PI in radian. Raises VectorWithNullMagnitude if <me>.Magnitude() <= Resolution from gp or theOther.Magnitude() <= Resolution because the angular value is indefinite if one of the vectors has a null magnitude. | |
| double | AngleWithRef (GVec theOther, GVec theVRef) |
| Computes the angle, in radians, between this vector and vector theOther. The result is a value between -Pi and Pi. For this, theVRef defines the positive sense of rotation: the angular value is positive, if the cross product this ^ theOther has the same orientation as theVRef relative to the plane defined by the vectors this and theOther. Otherwise, the angular value is negative. Exceptions gp_VectorWithNullMagnitude if the magnitude of this vector, the vector theOther, or the vector theVRef is less than or equal to gp::Resolution(). Standard_DomainError if this vector, the vector theOther, and the vector theVRef are coplanar, unless this vector and the vector theOther are parallel. | |
| double | Magnitude () |
| Computes the magnitude of this vector. | |
| double | SquareMagnitude () |
| Computes the square magnitude of this vector. | |
| void | Add (GVec theOther) |
| Adds two vectors | |
| GVec | Added (GVec theOther) |
| Adds two vectors | |
| void | Subtract (GVec theRight) |
| Subtracts two vectors | |
| GVec | Subtracted (GVec theRight) |
| Subtracts two vectors | |
| void | Multiply (double theScalar) |
| Multiplies a vector by a scalar | |
| GVec | Multiplied (double theScalar) |
| Multiplies a vector by a scalar | |
| void | Divide (double theScalar) |
| Divides a vector by a scalar | |
| GVec | Divided (double theScalar) |
| Divides a vector by a scalar | |
| void | Cross (GVec theRight) |
| computes the cross product between two vectors | |
| GVec | Crossed (GVec theRight) |
| computes the cross product between two vectors | |
| double | CrossMagnitude (GVec theRight) |
| Computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight || | |
| double | CrossSquareMagnitude (GVec theRight) |
| Computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2 | |
| void | CrossCross (GVec theV1, GVec theV2) |
| Computes the triple vector product. <me> ^= (theV1 ^ theV2) | |
| GVec | CrossCrossed (GVec theV1, GVec theV2) |
| Computes the triple vector product. <me> ^ (theV1 ^ theV2) | |
| double | Dot (GVec theOther) |
| computes the scalar product | |
| double | DotCross (GVec theV1, GVec theV2) |
| Computes the triple scalar product <me> * (theV1 ^ theV2). | |
| void | Normalize () |
| normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp. | |
| GVec | Normalized () |
| normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp. | |
| void | Reverse () |
| Reverses the direction of a vector | |
| GVec | Reversed () |
| Reverses the direction of a vector | |
| void | SetLinearForm (double theA1, GVec theV1, double theA2, GVec theV2, double theA3, GVec theV3, GVec theV4) |
| <me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theA3 * theV3 + theV4 | |
| void | SetLinearForm (double theA1, GVec theV1, double theA2, GVec theV2, double theA3, GVec theV3) |
| <me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theA3 * theV3 | |
| void | SetLinearForm (double theA1, GVec theV1, double theA2, GVec theV2, GVec theV3) |
| <me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theV3 | |
| void | SetLinearForm (double theA1, GVec theV1, double theA2, GVec theV2) |
| <me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 | |
| void | SetLinearForm (double theA1, GVec theV1, GVec theV2) |
| <me> is set to the following linear form : theA1 * theV1 + theV2 | |
| void | SetLinearForm (GVec theV1, GVec theV2) |
| <me> is set to the following linear form : theV1 + theV2 | |
| void | Mirror (GVec theV) |
| GVec | Mirrored (GVec theV) |
| Performs the symmetrical transformation of a vector with respect to the vector theV which is the center of the symmetry. | |
| void | Mirror (GAx1 theA1) |
| GVec | Mirrored (GAx1 theA1) |
| Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry. | |
| void | Mirror (GAx2 theA2) |
| GVec | Mirrored (GAx2 theA2) |
| Performs the symmetrical transformation of a vector with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection). | |
| void | Rotate (GAx1 theA1, double theAng) |
| GVec | Rotated (GAx1 theA1, double theAng) |
| Rotates a vector. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. | |
| void | Scale (double theS) |
| GVec | Scaled (double theS) |
| Scales a vector. theS is the scaling value. | |
| void | Transform (GTrsf theT) |
| Transforms a vector with the transformation theT. | |
| GVec | Transformed (GTrsf theT) |
| Transforms a vector with the transformation theT. | |
| GVec (Vector3d p) | |
| GVec (Vector3 p) | |
| GVec | Clone () |
| override bool | Equals (object obj) |
| 判断是否相等 | |
| override int | GetHashCode () |
| 返回对象的哈希值 | |
| override string | ToString () |
| 转换成字符串 | |
属性 | |
| double | x [get, set] |
| double | y [get, set] |
| double | z [get, set] |
Defines a non-persistent vector in 3D space.
向量
| override bool AnyCAD.Foundation.GVec.Equals | ( | object | obj | ) |
判断是否相等
| obj | 比较的对象 |
| override int AnyCAD.Foundation.GVec.GetHashCode | ( | ) |
返回对象的哈希值
| override string AnyCAD.Foundation.GVec.ToString | ( | ) |
转换成字符串