NeoPZ
Public Member Functions | Private Attributes | List of all members
TPZPlane Class Reference

Implements a plane (stores the plane equation). Utility. More...

#include <pzplane.h>

Collaboration diagram for TPZPlane:
[legend]

Public Member Functions

 TPZPlane ()
 Simple constructor. More...
 
 ~TPZPlane ()
 Destructor. More...
 
int SetPlane (const TPZVec< REAL > &p1, const TPZVec< REAL > &p2, const TPZVec< REAL > &p3)
 Computes the equation of the plane from three given points. More...
 
bool Belongs (const TPZVec< REAL > &point)
 Check whether the point belongs at the plane. More...
 
bool Belongs (const TPZVec< REAL > &ponto1, const TPZVec< REAL > &ponto2, const TPZVec< REAL > &ponto3)
 Checks whether the current plane coincides with the plane formed by three given points. More...
 

Private Attributes

TPZVec< REAL > fCoef
 Coefficients of the plane with equation: fCoef[0]*x + fCoef[1]*y + fCoef[2]*z + fCoef[3] = 0. More...
 

Detailed Description

Implements a plane (stores the plane equation). Utility.

Author
Renato Gomes Damas

Definition at line 19 of file pzplane.h.

Constructor & Destructor Documentation

◆ TPZPlane()

TPZPlane::TPZPlane ( )

Simple constructor.

Definition at line 12 of file pzplane.cpp.

◆ ~TPZPlane()

TPZPlane::~TPZPlane ( )

Destructor.

Definition at line 14 of file pzplane.cpp.

Member Function Documentation

◆ Belongs() [1/2]

bool TPZPlane::Belongs ( const TPZVec< REAL > &  ponto)

Check whether the point belongs at the plane.

Verifica se o ponto[3] pertence ao plano. Se pertencer retorna 1, caso contrário 0.

Definition at line 87 of file pzplane.cpp.

References fabs.

◆ Belongs() [2/2]

bool TPZPlane::Belongs ( const TPZVec< REAL > &  ponto1,
const TPZVec< REAL > &  ponto2,
const TPZVec< REAL > &  ponto3 
)

Checks whether the current plane coincides with the plane formed by three given points.

Verifica se o plano coincide com plano formado pelos três pontos passados. Se pertencer retorna 1, caso contrário 0.

verificando se os pontos estão alinhados

Definition at line 102 of file pzplane.cpp.

References fabs, and TPZNumeric::ProdVetorial().

◆ SetPlane()

int TPZPlane::SetPlane ( const TPZVec< REAL > &  p1,
const TPZVec< REAL > &  p2,
const TPZVec< REAL > &  p3 
)

Computes the equation of the plane from three given points.

Dado três pontos calcula a equação do plano que os contém.

Definition at line 18 of file pzplane.cpp.

References matrix, MatrixDet(), TPZNumeric::ProdVetorial(), and TPZNumeric::SortArray3().

Member Data Documentation

◆ fCoef

TPZVec<REAL> TPZPlane::fCoef
private

Coefficients of the plane with equation: fCoef[0]*x + fCoef[1]*y + fCoef[2]*z + fCoef[3] = 0.

Definition at line 39 of file pzplane.h.


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