Describes a unit vector in 3D space. This unit vector is also called "Direction". See Also gce_MakeDir which provides functions for more complex unit vector constructions Geom_Direction which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors.
More...
|
| gp_Dir () |
| Creates a direction corresponding to X axis. More...
|
|
| gp_Dir (const gp_Vec &theV) |
| Normalizes the vector theV and creates a direction. Raises ConstructionError if theV.Magnitude() <= Resolution. More...
|
|
| gp_Dir (const gp_XYZ &theCoord) |
| Creates a direction from a triplet of coordinates. Raises ConstructionError if theCoord.Modulus() <= Resolution from gp. More...
|
|
| gp_Dir (const Standard_Real theXv, const Standard_Real theYv, const Standard_Real theZv) |
| Creates a direction with its 3 cartesian coordinates. Raises ConstructionError if Sqrt(theXv*theXv + theYv*theYv + theZv*theZv) <= Resolution Modification of the direction's coordinates If Sqrt (theXv*theXv + theYv*theYv + theZv*theZv) <= Resolution from gp where theXv, theYv ,theZv are the new coordinates it is not possible to construct the direction and the method raises the exception ConstructionError. More...
|
|
void | SetCoord (const Standard_Integer theIndex, const Standard_Real theXi) |
| For this unit vector, assigns the value Xi to: More...
|
|
void | SetCoord (const Standard_Real theXv, const Standard_Real theYv, const Standard_Real theZv) |
| For this unit vector, assigns the values theXv, theYv and theZv to its three coordinates. Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. More...
|
|
void | SetX (const Standard_Real theX) |
| Assigns the given value to the X coordinate of this unit vector. More...
|
|
void | SetY (const Standard_Real theY) |
| Assigns the given value to the Y coordinate of this unit vector. More...
|
|
void | SetZ (const Standard_Real theZ) |
| Assigns the given value to the Z coordinate of this unit vector. More...
|
|
void | SetXYZ (const gp_XYZ &theCoord) |
| Assigns the three coordinates of theCoord to this unit vector. More...
|
|
Standard_Real | Coord (const Standard_Integer theIndex) const |
| Returns the coordinate of range theIndex : theIndex = 1 => X is returned Ithendex = 2 => Y is returned theIndex = 3 => Z is returned Exceptions Standard_OutOfRange if theIndex is not 1, 2, or 3. More...
|
|
void | Coord (Standard_Real &theXv, Standard_Real &theYv, Standard_Real &theZv) const |
| Returns for the unit vector its three coordinates theXv, theYv, and theZv. More...
|
|
Standard_Real | X () const |
| Returns the X coordinate for a unit vector. More...
|
|
Standard_Real | Y () const |
| Returns the Y coordinate for a unit vector. More...
|
|
Standard_Real | Z () const |
| Returns the Z coordinate for a unit vector. More...
|
|
const gp_XYZ & | XYZ () const |
| for this unit vector, returns its three coordinates as a number triplea. More...
|
|
Standard_Boolean | IsEqual (const gp_Dir &theOther, const Standard_Real theAngularTolerance) const |
| Returns True if the angle between the two directions is lower or equal to theAngularTolerance. More...
|
|
Standard_Boolean | IsNormal (const gp_Dir &theOther, const Standard_Real theAngularTolerance) const |
| Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi/2 (normal). More...
|
|
Standard_Boolean | IsOpposite (const gp_Dir &theOther, const Standard_Real theAngularTolerance) const |
| Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi (opposite). More...
|
|
Standard_Boolean | IsParallel (const gp_Dir &theOther, const Standard_Real theAngularTolerance) const |
| Returns true if the angle between this unit vector and the unit vector theOther is equal to 0 or to Pi. Note: the tolerance criterion is given by theAngularTolerance. More...
|
|
Standard_Real | Angle (const gp_Dir &theOther) const |
| Computes the angular value in radians between <me> and <theOther>. This value is always positive in 3D space. Returns the angle in the range [0, PI]. More...
|
|
Standard_Real | AngleWithRef (const gp_Dir &theOther, const gp_Dir &theVRef) const |
| Computes the angular value between <me> and <theOther>. <theVRef> is the direction of reference normal to <me> and <theOther> and its orientation gives the positive sense of rotation. If the cross product <me> ^ <theOther> has the same orientation as <theVRef> the angular value is positive else negative. Returns the angular value in the range -PI and PI (in radians). Raises DomainError if <me> and <theOther> are not parallel this exception is raised when <theVRef> is in the same plane as <me> and <theOther> The tolerance criterion is Resolution from package gp. More...
|
|
void | Cross (const gp_Dir &theRight) |
| Computes the cross product between two directions Raises the exception ConstructionError if the two directions are parallel because the computed vector cannot be normalized to create a direction. More...
|
|
void | operator^= (const gp_Dir &theRight) |
|
gp_Dir | Crossed (const gp_Dir &theRight) const |
| Computes the triple vector product. <me> ^ (V1 ^ V2) Raises the exception ConstructionError if V1 and V2 are parallel or <me> and (V1^V2) are parallel because the computed vector can't be normalized to create a direction. More...
|
|
gp_Dir | operator^ (const gp_Dir &theRight) const |
|
void | CrossCross (const gp_Dir &theV1, const gp_Dir &theV2) |
|
gp_Dir | CrossCrossed (const gp_Dir &theV1, const gp_Dir &theV2) const |
| Computes the double vector product this ^ (theV1 ^ theV2). More...
|
|
Standard_Real | Dot (const gp_Dir &theOther) const |
| Computes the scalar product. More...
|
|
Standard_Real | operator* (const gp_Dir &theOther) const |
|
Standard_Real | DotCross (const gp_Dir &theV1, const gp_Dir &theV2) const |
| Computes the triple scalar product <me> * (theV1 ^ theV2). Warnings : The computed vector theV1' = theV1 ^ theV2 is not normalized to create a unitary vector. So this method never raises an exception even if theV1 and theV2 are parallel. More...
|
|
void | Reverse () |
|
gp_Dir | Reversed () const |
| Reverses the orientation of a direction geometric transformations Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.]. More...
|
|
gp_Dir | operator- () const |
|
void | Mirror (const gp_Dir &theV) |
|
gp_Dir | Mirrored (const gp_Dir &theV) const |
| Performs the symmetrical transformation of a direction with respect to the direction theV which is the center of the symmetry. More...
|
|
void | Mirror (const gp_Ax1 &theA1) |
|
gp_Dir | Mirrored (const gp_Ax1 &theA1) const |
| Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry. More...
|
|
void | Mirror (const gp_Ax2 &theA2) |
|
gp_Dir | Mirrored (const gp_Ax2 &theA2) const |
| Performs the symmetrical transformation of a direction with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection). More...
|
|
void | Rotate (const gp_Ax1 &theA1, const Standard_Real theAng) |
|
gp_Dir | Rotated (const gp_Ax1 &theA1, const Standard_Real theAng) const |
| Rotates a direction. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. More...
|
|
void | Transform (const gp_Trsf &theT) |
|
gp_Dir | Transformed (const gp_Trsf &theT) const |
| Transforms a direction with a "Trsf" from gp. Warnings : If the scale factor of the "Trsf" theT is negative then the direction <me> is reversed. More...
|
|
void | DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const |
| Dumps the content of me into the stream. More...
|
|
Standard_Boolean | InitFromJson (const Standard_SStream &theSStream, Standard_Integer &theStreamPos) |
| Inits the content of me from the stream. More...
|
|
Describes a unit vector in 3D space. This unit vector is also called "Direction". See Also gce_MakeDir which provides functions for more complex unit vector constructions Geom_Direction which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors.