Back to index

salome-gui  6.5.0
Public Member Functions | Private Member Functions | Private Attributes
Plane Class Reference

Class for the representation plane in the 3D. More...

#include <VTKViewer_ArcBuilder.h>

List of all members.

Public Member Functions

 Plane (const Pnt &thePnt1, const Pnt &thePnt2, const Pnt &thePnt3)
 Constructor.
 ~Plane ()
 Destructor.
double A () const
double B () const
double C () const
Vec GetNormale () const

Private Member Functions

void CalculatePlane (const Pnt &thePnt1, const Pnt &thePnt2, const Pnt &thePnt3)

Private Attributes

double myA
double myB
double myC

Detailed Description

Class for the representation plane in the 3D.

Definition at line 123 of file VTKViewer_ArcBuilder.h.


Constructor & Destructor Documentation

Plane::Plane ( const Pnt thePnt1,
const Pnt thePnt2,
const Pnt thePnt3 
)

Constructor.

Definition at line 170 of file VTKViewer_ArcBuilder.cxx.

{
  CalculatePlane(thePnt1,thePnt2,thePnt3);
}

Here is the call graph for this function:

Destructor.

Definition at line 178 of file VTKViewer_ArcBuilder.cxx.

{}

Member Function Documentation

double Plane::A ( ) const [inline]

Definition at line 129 of file VTKViewer_ArcBuilder.h.

{return myA;}
double Plane::B ( ) const [inline]

Definition at line 130 of file VTKViewer_ArcBuilder.h.

{return myB;}
double Plane::C ( ) const [inline]

Definition at line 131 of file VTKViewer_ArcBuilder.h.

{return myC;} 
void Plane::CalculatePlane ( const Pnt thePnt1,
const Pnt thePnt2,
const Pnt thePnt3 
) [private]

Definition at line 191 of file VTKViewer_ArcBuilder.cxx.

                                                                                    {
  
  double x1 = thePnt1.GetXYZ().X();
  double x2 = thePnt2.GetXYZ().X();
  double x3 = thePnt3.GetXYZ().X();
  
  double y1 = thePnt1.GetXYZ().Y();
  double y2 = thePnt2.GetXYZ().Y();
  double y3 = thePnt3.GetXYZ().Y();
  
  double z1 = thePnt1.GetXYZ().Z();
  double z2 = thePnt2.GetXYZ().Z();
  double z3 = thePnt3.GetXYZ().Z();
  
  myA = y1*(z2 - z3) + y2*(z3 - z1) + y3*(z1 - z2);
  myB = z1*(x2 - x3) + z2*(x3 - x1) + z3*(x1 - x2);
  myC = x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2);
  
#ifdef _MY_DEBUG_
  cout<<"Plane A: "<<myA<<endl;
  cout<<"Plane B: "<<myB<<endl;
  cout<<"Plane C: "<<myC<<endl;
#endif  

} 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 184 of file VTKViewer_ArcBuilder.cxx.

                           {
  return Vec(myA,myB,myC);
}

Here is the caller graph for this function:


Member Data Documentation

double Plane::myA [private]

Definition at line 139 of file VTKViewer_ArcBuilder.h.

double Plane::myB [private]

Definition at line 140 of file VTKViewer_ArcBuilder.h.

double Plane::myC [private]

Definition at line 141 of file VTKViewer_ArcBuilder.h.


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