0024023: Revamp the OCCT Handle -- general
[occt.git] / src / Geom / Geom_Vector.cxx
CommitLineData
b311480e 1// Created on: 1993-03-10
2// Created by: JCV
3// Copyright (c) 1993-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
7fd59977 17#include <Geom_Vector.ixx>
18
19typedef Geom_Vector Vector;
7fd59977 20typedef gp_Ax1 Ax1;
21typedef gp_Ax2 Ax2;
22typedef gp_Pnt Pnt;
23typedef gp_Trsf Trsf;
24
7fd59977 25void Geom_Vector::Reverse () { gpVec.Reverse(); }
26
27Standard_Real Geom_Vector::X () const { return gpVec.X(); }
28
29Standard_Real Geom_Vector::Y () const { return gpVec.Y(); }
30
31Standard_Real Geom_Vector::Z () const { return gpVec.Z(); }
32
33const gp_Vec& Geom_Vector::Vec () const { return gpVec; }
34
c04c30b3 35Handle(Geom_Vector) Geom_Vector::Reversed () const
7fd59977 36{
c04c30b3 37 Handle(Geom_Vector) V = Handle(Geom_Vector)::DownCast(Copy());
7fd59977 38 V->Reverse();
39 return V;
40}
41
42
c04c30b3 43Standard_Real Geom_Vector::Angle (const Handle(Geom_Vector)& Other) const {
7fd59977 44
45 return gpVec.Angle (Other->Vec());
46}
47
48
49Standard_Real Geom_Vector::AngleWithRef (
c04c30b3 50const Handle(Geom_Vector)& Other, const Handle(Geom_Vector)& VRef) const {
7fd59977 51
52 return gpVec.AngleWithRef (Other->Vec(), VRef->Vec());
53}
54
55
56void Geom_Vector::Coord (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const {
57
58 gpVec.Coord (X, Y, Z);
59}
60
61
c04c30b3 62Standard_Real Geom_Vector::Dot (const Handle(Geom_Vector)& Other) const {
7fd59977 63
64 return gpVec.Dot (Other->Vec());
65}
66
67
68Standard_Real Geom_Vector::DotCross (
c04c30b3 69const Handle(Geom_Vector)& V1, const Handle(Geom_Vector)& V2) const {
7fd59977 70
71 return gpVec.DotCross (V1->Vec(), V2->Vec());
72}
73
74
75