Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.5new_solver
      Class Index
      File List
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads

VTriangle surface. More...

#include <vtriangle.hpp>

Inheritance diagram for VTriangleSurface:
VTriangleSurfaceSolid

Public Member Functions

 VTriangleSurface (double vertex_matching_eps=1.0e-9)
 Constructor for vertex triangle surface. More...
 
 ~VTriangleSurface ()
 Destructor. More...
 
void set_vertex_matching_eps (double vertex_matching_eps)
 Set vertex matching tolerance. More...
 
uint32_t vertexc (void) const
 Return vertex count. More...
 
const Vec3Dvertex (uint32_t i) const
 Return vertex i coordinates. More...
 
uint32_t trianglec (void) const
 Return triangle count. More...
 
const VTriangletriangle (uint32_t i) const
 Return triangle i. More...
 
uint32_t add_vertex_no_check (const Vec3D &x)
 Add a vertex x without checking. More...
 
uint32_t add_vertex (const Vec3D &x)
 Add a vertex x with duplicate vertex elimination. More...
 
uint32_t add_triangle (const Vec3D &x1, const Vec3D &x2, const Vec3D &x3)
 Add a triangle consiting of vertices x1, x2 and x3 with duplicate vertex elimination. More...
 
uint32_t add_triangle (const Vec3D x[3])
 Add a triangle consiting of vertices x with duplicate vertex elimination. More...
 
uint32_t add_triangle (uint32_t v1, uint32_t v2, uint32_t v3)
 Add a triangle consiting of already defined vertices v1, v2 and v3. More...
 
uint32_t add_triangle (const uint32_t v[3])
 Add a triangle consiting of already defined vertices v. More...
 
void clear (void)
 Clear surface. More...
 
void debug_print (std::ostream &os) const
 Debug print. More...
 

Protected Attributes

std::vector< Vec3D_vertex
 List of vertices for surface triangles. More...
 
std::vector< VTriangle_triangle
 List of surface triangles. More...
 

Detailed Description

VTriangle surface.

Surface mesh constructed of vertex triangles and vertices.

VTriangleSurface can be constructed triangle-by-triangle with internal elimination of duplicated vertices. Construction of of surface with external (more intelligent) vertex handling is also possible.

Constructor & Destructor Documentation

VTriangleSurface::VTriangleSurface ( double  vertex_matching_eps = 1.0e-9)

Constructor for vertex triangle surface.

The vertex matching tolerance can be set with vertex_matching_eps (defaults to 1.0e-9).

VTriangleSurface::~VTriangleSurface ( )

Destructor.

Member Function Documentation

uint32_t VTriangleSurface::add_triangle ( const Vec3D x1,
const Vec3D x2,
const Vec3D x3 
)

Add a triangle consiting of vertices x1, x2 and x3 with duplicate vertex elimination.

The vertices are assumed to be defined with right-hand ordering for defining outside direction. Each vertex of the triangle is checked against all vertices in the surface for duplicate entries. A vertex pairs closer than vertex_matching_eps are considered to be equal.

Returns the index of the new triangle.

uint32_t VTriangleSurface::add_triangle ( const Vec3D  x[3])

Add a triangle consiting of vertices x with duplicate vertex elimination.

Convenience function.

uint32_t VTriangleSurface::add_triangle ( uint32_t  v1,
uint32_t  v2,
uint32_t  v3 
)
inline

Add a triangle consiting of already defined vertices v1, v2 and v3.

uint32_t VTriangleSurface::add_triangle ( const uint32_t  v[3])
inline

Add a triangle consiting of already defined vertices v.

Convenience function.

uint32_t VTriangleSurface::add_vertex ( const Vec3D x)

Add a vertex x with duplicate vertex elimination.

Returns the index of the (new or old) vertex.

uint32_t VTriangleSurface::add_vertex_no_check ( const Vec3D x)
inline

Add a vertex x without checking.

Returns the index of the new vertex.

void VTriangleSurface::clear ( void  )

Clear surface.

void VTriangleSurface::debug_print ( std::ostream &  os) const

Debug print.

void VTriangleSurface::set_vertex_matching_eps ( double  vertex_matching_eps)

Set vertex matching tolerance.

Defaults to 1.0e-9.

const VTriangle& VTriangleSurface::triangle ( uint32_t  i) const
inline

Return triangle i.

uint32_t VTriangleSurface::trianglec ( void  ) const
inline

Return triangle count.

const Vec3D& VTriangleSurface::vertex ( uint32_t  i) const
inline

Return vertex i coordinates.

uint32_t VTriangleSurface::vertexc ( void  ) const
inline

Return vertex count.

Member Data Documentation

std::vector<VTriangle> VTriangleSurface::_triangle
protected

List of surface triangles.

std::vector<Vec3D> VTriangleSurface::_vertex
protected

List of vertices for surface triangles.


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


Reference manual for Ion Beam Simulator 1.0.5new_solver
Generated by Doxygen 1.8.5 on Tue May 19 2015 09:15:44.