Open CASCADE Technology  6.9.1
Public Member Functions | Static Public Member Functions
Graphic3d_Vector Class Reference

This class allows the creation and update of a 3D vector. More...

#include <Graphic3d_Vector.hxx>

Public Member Functions

 Graphic3d_Vector ()
 Creates a vector with 1.0, 0.0, 0.0 coordinates. More...
 
 Graphic3d_Vector (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ)
 Creates a vector with <AX>, <AY>, <AZ> coordinates. More...
 
 Graphic3d_Vector (const Graphic3d_Vertex &APoint1, const Graphic3d_Vertex &APoint2)
 Creates a vector from 2 points <APoint1> and <APoint2>. More...
 
void Normalize ()
 Normalises <me>. Category: Methods to modify the class definition Warning: Raises VectorError if <me> is null. More...
 
void SetCoord (const Standard_Real Xnew, const Standard_Real Ynew, const Standard_Real Znew)
 Modifies the coordinates of the vector <me>. More...
 
void SetXCoord (const Standard_Real Xnew)
 Modifies the X coordinate of the vector <me>. More...
 
void SetYCoord (const Standard_Real Ynew)
 Modifies the Y coordinate of the vector <me>. More...
 
void SetZCoord (const Standard_Real Znew)
 Modifies the Z coordinate of the vector <me>. More...
 
void Coord (Standard_Real &AX, Standard_Real &AY, Standard_Real &AZ) const
 Returns the coordinates of the vector <me>. More...
 
Standard_Boolean IsNormalized () const
 Returns Standard_True if <me> has length 1. More...
 
Standard_Boolean LengthZero () const
 Returns Standard_True if <me> has length zero. More...
 
Standard_Real X () const
 Returns the X coordinates of the vector <me>. More...
 
Standard_Real Y () const
 Returns the Y coordinate of the vector <me>. More...
 
Standard_Real Z () const
 Returns the Z coordinate of the vector <me>. More...
 

Static Public Member Functions

static Standard_Boolean IsParallel (const Graphic3d_Vector &AV1, const Graphic3d_Vector &AV2)
 Returns Standard_True if the vector <AV1> and <AV2> are parallel. More...
 
static Standard_Real NormeOf (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ)
 Returns the norm of the vector <AX>, <AY>, <AZ>. More...
 
static Standard_Real NormeOf (const Graphic3d_Vector &AVector)
 Returns the norm of the vector <AVector>. More...
 

Detailed Description

This class allows the creation and update of a 3D vector.

Constructor & Destructor Documentation

Graphic3d_Vector::Graphic3d_Vector ( )

Creates a vector with 1.0, 0.0, 0.0 coordinates.

Graphic3d_Vector::Graphic3d_Vector ( const Standard_Real  AX,
const Standard_Real  AY,
const Standard_Real  AZ 
)

Creates a vector with <AX>, <AY>, <AZ> coordinates.

Graphic3d_Vector::Graphic3d_Vector ( const Graphic3d_Vertex APoint1,
const Graphic3d_Vertex APoint2 
)

Creates a vector from 2 points <APoint1> and <APoint2>.

Member Function Documentation

void Graphic3d_Vector::Coord ( Standard_Real AX,
Standard_Real AY,
Standard_Real AZ 
) const

Returns the coordinates of the vector <me>.

Standard_Boolean Graphic3d_Vector::IsNormalized ( ) const

Returns Standard_True if <me> has length 1.

static Standard_Boolean Graphic3d_Vector::IsParallel ( const Graphic3d_Vector AV1,
const Graphic3d_Vector AV2 
)
static

Returns Standard_True if the vector <AV1> and <AV2> are parallel.

Standard_Boolean Graphic3d_Vector::LengthZero ( ) const

Returns Standard_True if <me> has length zero.

void Graphic3d_Vector::Normalize ( )

Normalises <me>. Category: Methods to modify the class definition Warning: Raises VectorError if <me> is null.

static Standard_Real Graphic3d_Vector::NormeOf ( const Standard_Real  AX,
const Standard_Real  AY,
const Standard_Real  AZ 
)
static

Returns the norm of the vector <AX>, <AY>, <AZ>.

static Standard_Real Graphic3d_Vector::NormeOf ( const Graphic3d_Vector AVector)
static

Returns the norm of the vector <AVector>.

void Graphic3d_Vector::SetCoord ( const Standard_Real  Xnew,
const Standard_Real  Ynew,
const Standard_Real  Znew 
)

Modifies the coordinates of the vector <me>.

void Graphic3d_Vector::SetXCoord ( const Standard_Real  Xnew)

Modifies the X coordinate of the vector <me>.

void Graphic3d_Vector::SetYCoord ( const Standard_Real  Ynew)

Modifies the Y coordinate of the vector <me>.

void Graphic3d_Vector::SetZCoord ( const Standard_Real  Znew)

Modifies the Z coordinate of the vector <me>.

Standard_Real Graphic3d_Vector::X ( ) const

Returns the X coordinates of the vector <me>.

Standard_Real Graphic3d_Vector::Y ( ) const

Returns the Y coordinate of the vector <me>.

Standard_Real Graphic3d_Vector::Z ( ) const

Returns the Z coordinate of the vector <me>.


The documentation for this class was generated from the following file: