Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
C3Facet Class Reference

#include <GeoPrimitives.H>

Inheritance diagram for C3Facet:
Collaboration diagram for C3Facet:

Public Member Functions

 C3Facet ()
 
 C3Facet (const C3Point *P1, const C3Point *P2, const C3Point *P3)
 
 C3Facet (const C3Point *P1, const C3Point *P2, const C3Point *P3, const C3Point *P4)
 
 C3Facet (const C3Point &P1, const C3Point &P2, const C3Point &P3)
 
 C3Facet (const C3Point &P1, const C3Point &P2, const C3Point &P3, const C3Point &P4)
 
 C3Facet (const std::vector< const C3Point * > &v)
 
 C3Facet (const C3Facet &face)
 
C3Vector Normal () const
 
C3Point Centroid () const
 
C3Facetoperator= (const C3Facet &face)
 
bool operator== (const C3Facet &face) const
 

Private Member Functions

C3Point_copycreate_point (const C3Point &p)
 
C3Point_create_point ()
 

Private Attributes

bool _mydata
 

Additional Inherited Members

- Public Attributes inherited from vector< T >
elements
 STL member. More...
 

Detailed Description

Definition at line 1604 of file GeoPrimitives.H.

Constructor & Destructor Documentation

C3Facet ( )
inline

Definition at line 1609 of file GeoPrimitives.H.

References C3Facet::_mydata.

1610  {
1611  _mydata = false;
1612  };
C3Facet ( const C3Point P1,
const C3Point P2,
const C3Point P3 
)
inline

Definition at line 1613 of file GeoPrimitives.H.

References C3Facet::_mydata.

1614  {
1615  _mydata = false;
1616  this->resize(3);
1617  (*this)[0] = P1;
1618  (*this)[1] = P2;
1619  (*this)[2] = P3;
1620  };
C3Facet ( const C3Point P1,
const C3Point P2,
const C3Point P3,
const C3Point P4 
)
inline

Definition at line 1621 of file GeoPrimitives.H.

References C3Facet::_mydata.

1622  {
1623  _mydata = false;
1624  this->resize(4);
1625  (*this)[0] = P1;
1626  (*this)[1] = P2;
1627  (*this)[2] = P3;
1628  (*this)[3] = P4;
1629  };
C3Facet ( const C3Point P1,
const C3Point P2,
const C3Point P3 
)
inline

Definition at line 1630 of file GeoPrimitives.H.

References C3Facet::_copycreate_point(), and C3Facet::_mydata.

1631  {
1632  _mydata = true;
1633  this->resize(3);
1634  (*this)[0] = _copycreate_point(P1);
1635  (*this)[1] = _copycreate_point(P2);
1636  (*this)[2] = _copycreate_point(P3);
1637  };
C3Point * _copycreate_point(const C3Point &p)

Here is the call graph for this function:

C3Facet ( const C3Point P1,
const C3Point P2,
const C3Point P3,
const C3Point P4 
)
inline

Definition at line 1638 of file GeoPrimitives.H.

References C3Facet::_copycreate_point(), and C3Facet::_mydata.

1640  {
1641  _mydata = true;
1642  this->resize(4);
1643  (*this)[0] = _copycreate_point(P1);
1644  (*this)[1] = _copycreate_point(P2);
1645  (*this)[2] = _copycreate_point(P3);
1646  (*this)[3] = _copycreate_point(P4);
1647  };
C3Point * _copycreate_point(const C3Point &p)

Here is the call graph for this function:

C3Facet ( const std::vector< const C3Point * > &  v)
inline

Definition at line 1648 of file GeoPrimitives.H.

References pi.

1649  {
1650  std::vector<const C3Point *>::const_iterator pi = v.begin();
1651  while(pi != v.end())
1652  this->push_back(*pi++);
1653  };
const double pi
C3Facet ( const C3Facet face)
inline

Definition at line 1660 of file GeoPrimitives.H.

1661  {
1662  C3Facet::const_iterator fi = face.begin();
1663  while(fi != face.end())
1664  this->push_back(*fi++);
1665  };
Definition: face.h:90

Member Function Documentation

C3Point* _copycreate_point ( const C3Point p)
inlineprivate

Definition at line 1714 of file GeoPrimitives.H.

References C3Vector::Copy().

Referenced by C3Facet::C3Facet().

1715  {
1716  C3Point *rp = new C3Point;
1717  rp->Copy(p);
1718  return(rp);
1719  };
C3Vector & Copy(const C3Vector &v)
C3Vector C3Point

Here is the call graph for this function:

Here is the caller graph for this function:

C3Point* _create_point ( )
inlineprivate

Definition at line 1720 of file GeoPrimitives.H.

1721  {
1722  C3Point *rp = new C3Point;
1723  return(rp);
1724  };
C3Vector C3Point
C3Point Centroid ( ) const
inline

Definition at line 1672 of file GeoPrimitives.H.

References GeoPrim::C3Centroid().

Referenced by Mesh::GenericElement::Inverted(), and Mesh::GenericElement::ShapeOK().

1673  {
1674  return(C3Centroid(*this));
1675  };
C3Point C3Centroid(const PointContainer &pc)

Here is the call graph for this function:

Here is the caller graph for this function:

C3Vector Normal ( ) const
inline

Definition at line 1666 of file GeoPrimitives.H.

Referenced by Mesh::GenericElement::Inverted(), and Mesh::GenericElement::ShapeOK().

1667  {
1668  C3Vector v1(*((*this)[0]),*((*this)[1]));
1669  C3Vector v2(*((*this)[0]),*((*this)[2]));
1670  return(.5*(v1%v2));
1671  };

Here is the caller graph for this function:

C3Facet& operator= ( const C3Facet face)
inline

Definition at line 1676 of file GeoPrimitives.H.

1677  {
1678  this->clear();
1679  C3Facet::const_iterator fi = face.begin();
1680  while(fi != face.end())
1681  this->push_back(*fi++);
1682  return(*this);
1683  };
Definition: face.h:90
bool operator== ( const C3Facet face) const
inline

Definition at line 1684 of file GeoPrimitives.H.

1685  {
1686  C3Facet::const_iterator li = this->begin();
1687  C3Facet::const_iterator fi = face.begin();
1688  if(this->size() != face.size()) return false;
1689  while(li != this->end())
1690  if(!(*(*li++) == *(*fi++)))
1691  return(false);
1692  return(true);
1693  };
Definition: face.h:90

Member Data Documentation

bool _mydata
private

Definition at line 1607 of file GeoPrimitives.H.

Referenced by C3Facet::C3Facet().


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