Antiprism 0.23
Public Member Functions

geom_if Class Reference

Geometry Interface. More...

#include <geom.h>

Inheritance diagram for geom_if:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~geom_if ()
 Destructor.
 operator bool () const
 Check whether geometry is set.
virtual const vector< vec3d > & verts () const =0
 Read access to the vertices.
virtual vector< vec3d > & raw_verts ()=0
 Read/Write access to the vertices.
virtual const vec3dverts (int v_idx) const =0
 Read access to a vertex.
virtual const vector< vector
< int > > & 
edges () const =0
 Read access to the edges.
virtual vector< vector< int > > & raw_edges ()=0
 Read/Write access to the edges.
virtual const vector< int > & edges (int e_idx) const =0
 Read access to an edge.
virtual int edges (int e_idx, int v_no) const =0
 Get the index number of a vertex of an edge.
vec3d edge_v (int e_idx, int v_no) const
 Get the coordinates of a vertex of an edge.
virtual const vector< vector
< int > > & 
faces () const =0
 Read access to the faces.
virtual vector< vector< int > > & raw_faces ()=0
 Read/Write access to the faces.
virtual const vector< int > & faces (int f_idx) const =0
 Read access to a face.
virtual int faces (int f_idx, int v_no) const =0
 Get the index number of a vertex of a face.
virtual int faces_mod (int f_idx, int v_no) const
 Get the index number of a vertex of a face mod the size of the face.
vec3d face_v (int f_idx, int v_no) const
 Get the coordinates of a vertex of an face.
virtual int add_vert (vec3d vert)
 Add a vertex.
virtual int add_verts (const vector< vec3d > &vrts)
 Add several vertices.
virtual int add_face (const vector< int > &face)
 Add a face.
virtual int add_face (int v1,...)
 Add a face made from integer arguments.
virtual int add_faces (const vector< vector< int > > &fces)
 Add several faces.
virtual int add_edge (const vector< int > edge)
 Add an edge.
virtual int add_edge (int v_idx1, int v_idx2)
 Add an edge from vertex index numbers.
virtual int add_edges (const vector< vector< int > > &edgs)
 Add several edges.
virtual int add_edge_raw (const vector< int > &edge)
 Add an edge without checking it is valid.
virtual int add_edges_raw (const vector< vector< int > > &edgs)
 Add several edges without checking they are valid.
virtual void delete_vert (int v_idx, map< int, int > *vert_map=0)
 Delete a vertex.
virtual void delete_verts (const vector< int > &v_idxs, map< int, int > *vert_map=0)
 Delete several vertices.
virtual void delete_edges (const vector< int > &e_idxs, map< int, int > *edge_map=0)
 Delete several edges.
virtual void delete_faces (const vector< int > &f_idxs, map< int, int > *face_map=0)
 Delete several faces.
virtual void clear_verts ()
 Delete all the vertices.
virtual void clear_edges ()
 Delete all the edges.
virtual void clear_faces ()
 Delete all the faces.
virtual void clear_all ()
 Delete all the vertices, edges and faces.
virtual void append (const geom_if &geom)
 Append a geometry.
void verts_merge (map< int, int > &vmap)
 Merge some of the vertices.
virtual void add_missing_impl_edges ()
 Add missing implicit edges.
int add_hull (string qh_args="", char *errmsg=0)
 Add the faces of the convex hull to the geometry.
int set_hull (string qh_args="", char *errmsg=0)
 Set the geometry to its convex hull.
vector< vec3dget_star (char type='v', vec3d centre=vec3d(0, 0, 0))
 Get a star of vectors to use for making a zonohedron.
bool set_zono (const vector< vec3d > &star, char *errmsg=0)
 Set the geometry to a zonohedron made from a star.
bool set_geodesic_planar (const geom_if &base, int m, int n=0)
 Set planar geodesic division.
bool set_geodesic_sphere (const geom_if &base, int m, int n=0, vec3d cent=vec3d(0, 0, 0))
 Set spherical geodesic division.
void sphere_projection (vec3d centre=vec3d(0, 0, 0), double radius=1.0)
 Project the vertices onto a sphere.
int orient (vector< vector< int > > *parts=0)
 Orient the geometry (if possible.)
bool orient (int type, char *errmsg=0)
 Orient the geometry (if possible.)
void orient_reverse ()
 Reverse the orientation of all the faces.
void transform (const mat3d &trans)
 Apply a transformation matrix.
void sym_align ()
 Align a polyhedron with the standard alignment for its symmetry type.
void triangulate (col_val col=col_val(), unsigned int winding=TESS_WINDING_NONZERO, vector< int > *fmap=0)
 Triangulate (tesselate) the faces.
vec3d centroid () const
 Get the centroid of all the vertices.
void face_cents (vector< vec3d > &ctds) const
 Get all the face centroids.
void face_norms (vector< vec3d > &norms, bool allow_zero=false) const
 Get all the face normals.
vec3d face_cent (int f_idx) const
 Get a face centroid, for a face index.
vec3d face_cent (const vector< int > &face) const
 Get a face centroid, for a face.
vec3d face_norm (int f_idx, bool allow_zero=false) const
 Get a face normal, for a face index.
vec3d face_norm (const vector< int > &face, bool allow_zero=false) const
 Get a face normal, for a face.
vec3d face_nearpt (int f_idx, vec3d P) const
 Get the nearest point on a face to another point, for a face index.
vec3d face_nearpt (const vector< int > &face, vec3d P) const
 Get the nearest point on a face to another point, for a face.
vec3d edge_cent (int e_idx) const
 Get an edge centre (the centroid), for an edge index.
vec3d edge_cent (const vector< int > &edge) const
 Get an edge centre (the centroid), for an edge.
vec3d edge_vec (int e_idx) const
 Get the vector between the ends of an edge, for an edge index.
vec3d edge_vec (const vector< int > &edge) const
 Get the vector between the ends of an edge, for an edge.
vec3d edge_vec (int v_idx0, int v_idx1) const
 Get the vector between two vertices by vertex index.
vec3d edge_nearpt (int e_idx, vec3d P) const
 Get the nearest point on an edge to another point, for a edge index.
vec3d edge_nearpt (const vector< int > &edge, vec3d P) const
 Get the nearest point on an edge to another point, for an edge.
double edge_len (int e_idx) const
 Get the length of an edge, for an edge index.
double edge_len (const vector< int > &edge) const
 Get the length of an edge, for an edge.
virtual bool read (string file_name="", char *errmsg=0)
 Read geometry from a file.
virtual bool read (FILE *file, char *errmsg=0)
 Read geometry from a file stream.
virtual bool read_resource (string res_name="", char *errmsg=0)
 Read resource geometry from resource model name.
virtual bool write (string file_name="", char *errmsg=0, int sig_dgts=DEF_SIG_DGTS) const
 Write geometry to a file.
virtual void write (FILE *file, int sig_dgts=DEF_SIG_DGTS) const
 Write geometry to a file stream.
virtual bool write_crds (string file_name="", char *errmsg=0, const char *sep=" ", int sig_dgts=DEF_SIG_DGTS) const
 Write coordinates to a file.
virtual void write_crds (FILE *file, const char *sep=" ", int sig_dgts=DEF_SIG_DGTS) const
 Write coordinates to a file stream.
bool is_oriented () const
 Check if geomtery is consistently oriented.
geom_info get_info () const
 Get geom_info object.
void get_impl_edges (vector< vector< int > > &edgs) const
 Get implicit edges.

Detailed Description

Geometry Interface.


Member Function Documentation

int geom_if::add_edge ( const vector< int >  edge) [virtual]

Add an edge.

The edge is added only if it is not already present in the edge list.

Parameters:
edgeedge to add.
Returns:
index number of edge in edge list.
int geom_if::add_edge ( int  v_idx1,
int  v_idx2 
) [virtual]

Add an edge from vertex index numbers.

Parameters:
v_idx1index number of first vertex.
v_idx2index number of second vertex.
Returns:
index number of edge in edge list.
int geom_if::add_edge_raw ( const vector< int > &  edge) [virtual]

Add an edge without checking it is valid.

This function is much faster than add_edge(). The edge should have the lowest vertex index first. The edge should not already be included in the edge list.

Parameters:
edgeedge to add.
Returns:
index number of newly added edge.
int geom_if::add_edges ( const vector< vector< int > > &  edgs) [virtual]

Add several edges.

Each edge is added only if it is not already present in the edge list.

Parameters:
edgsedges to add.
Returns:
index number of last added edge in edge list.
int geom_if::add_edges_raw ( const vector< vector< int > > &  edgs) [virtual]

Add several edges without checking they are valid.

This function is much faster than add_edges(). The edges should have the lowest vertex index first. The edges should not already be included in the edge list.

Parameters:
edgsedges to add.
Returns:
index number of last added edge.
int geom_if::add_face ( int  v1,
  ... 
) [virtual]

Add a face made from integer arguments.

The final argument must be a dummy value of -1.

Parameters:
v1the first index
...further indexes in the face, and a final -1 to terminate.
Returns:
index number of newly added face.
int geom_if::add_face ( const vector< int > &  face) [virtual]

Add a face.

Parameters:
faceface to add.
Returns:
index number of newly added face.
int geom_if::add_faces ( const vector< vector< int > > &  fces) [virtual]

Add several faces.

Parameters:
fcesfaces to add.
Returns:
index number of last added face.
int geom_if::add_hull ( string  qh_args = "",
char *  errmsg = 0 
)

Add the faces of the convex hull to the geometry.

Parameters:
qh_argsadditional arguments to pass to qhull (unsupported, may not work, check output.)
errmsgan array at least MSG_SZ chars long to return any error message.
Returns:
order or dimension 3, 2, 1 or 0. or -1 if qhull fails and the error is detailed in errmsg.
void geom_if::add_missing_impl_edges ( ) [virtual]

Add missing implicit edges.

Add implicit edges (edges of faces) to the edge list if they are not already included

Reimplemented in col_geom_v.

int geom_if::add_vert ( vec3d  vert) [virtual]

Add a vertex.

Parameters:
vertvertex to add.
Returns:
index number of newly added vertex.
int geom_if::add_verts ( const vector< vec3d > &  vrts) [virtual]

Add several vertices.

Parameters:
vrtsvertices to add.
Returns:
index number of last added vertex.
void geom_if::append ( const geom_if geom) [virtual]

Append a geometry.

Include the elements of a geometry after the current set of elements

Reimplemented in col_geom_v.

vec3d geom_if::centroid ( ) const [inline]

Get the centroid of all the vertices.

Returns:
The coordinates of the centroid.
void geom_if::delete_edges ( const vector< int > &  e_idxs,
map< int, int > *  edge_map = 0 
) [virtual]

Delete several edges.

Parameters:
e_idxsedge index numbers to delete
edge_mapa map of old index numbers to new index numbers, deleted edges map to index -1.

Reimplemented in col_geom_v.

void geom_if::delete_faces ( const vector< int > &  f_idxs,
map< int, int > *  face_map = 0 
) [virtual]

Delete several faces.

Parameters:
f_idxsface index numbers to delete
face_mapa map of old index numbers to new index numbers, deleted faces map to index -1.

Reimplemented in col_geom_v.

void geom_if::delete_vert ( int  v_idx,
map< int, int > *  vert_map = 0 
) [virtual]

Delete a vertex.

When deleting several vertices is is more efficient to use delete_verts().

Parameters:
v_idxvertex index number to delete
vert_mapa map of old index numbers to new index numbers, deleted vertices map to index -1.
void geom_if::delete_verts ( const vector< int > &  v_idxs,
map< int, int > *  vert_map = 0 
) [virtual]

Delete several vertices.

Parameters:
v_idxsvertex index numbers to delete
vert_mapa map of old index numbers to new index numbers, deleted vertices map to index -1.

Reimplemented in col_geom_v.

vec3d geom_if::edge_cent ( int  e_idx) const [inline]

Get an edge centre (the centroid), for an edge index.

Parameters:
e_idxedge index number.
Returns:
The coordinates of the centre.
vec3d geom_if::edge_cent ( const vector< int > &  edge) const [inline]

Get an edge centre (the centroid), for an edge.

Parameters:
edgecontains the two vertex index numbers.
Returns:
The coordinates of the centre.
double geom_if::edge_len ( int  e_idx) const [inline]

Get the length of an edge, for an edge index.

Parameters:
e_idxedge index number.
Returns:
The length of the edge.
double geom_if::edge_len ( const vector< int > &  edge) const [inline]

Get the length of an edge, for an edge.

Parameters:
edgecontains the two vertex index numbers.
Returns:
The length of the edge.
vec3d geom_if::edge_nearpt ( int  e_idx,
vec3d  P 
) const [inline]

Get the nearest point on an edge to another point, for a edge index.

Parameters:
e_idxedge index number.
Pthe point
Returns:
The coordinates of the nearest point to P on the line of the edge.
vec3d geom_if::edge_nearpt ( const vector< int > &  edge,
vec3d  P 
) const [inline]

Get the nearest point on an edge to another point, for an edge.

Parameters:
edgecontains the two vertex index numbers.
Pthe point
Returns:
The coordinates of the nearest point to P on the line of the edge.
vec3d geom_if::edge_v ( int  e_idx,
int  v_no 
) const [inline]

Get the coordinates of a vertex of an edge.

Parameters:
e_idxedge index number.
v_nothe position the vertex appears in the edge, 0 or 1
Returns:
The vertex coordinates.
vec3d geom_if::edge_vec ( const vector< int > &  edge) const [inline]

Get the vector between the ends of an edge, for an edge.

Parameters:
edgecontains the two vertex index numbers.
Returns:
The vector.
vec3d geom_if::edge_vec ( int  e_idx) const [inline]

Get the vector between the ends of an edge, for an edge index.

Parameters:
e_idxedge index number.
Returns:
The vector.
vec3d geom_if::edge_vec ( int  v_idx0,
int  v_idx1 
) const [inline]

Get the vector between two vertices by vertex index.

Parameters:
v_idx0start vertex index number.
v_idx1end vertex index number.
Returns:
The vector.
virtual const vector<int>& geom_if::edges ( int  e_idx) const [pure virtual]

Read access to an edge.

Parameters:
e_idxindex number of the edge.
Returns:
A reference to the edge data.

Implemented in geom_v.

virtual int geom_if::edges ( int  e_idx,
int  v_no 
) const [pure virtual]

Get the index number of a vertex of an edge.

Parameters:
e_idxedge index number.
v_nothe position the vertex appears in the edge, 0 or 1
Returns:
The vertex index number.

Implemented in geom_v.

virtual const vector<vector<int> >& geom_if::edges ( ) const [pure virtual]

Read access to the edges.

Returns:
A reference to the edge data.

Implemented in geom_v.

vec3d geom_if::face_cent ( int  f_idx) const [inline]

Get a face centroid, for a face index.

Parameters:
f_idxface index number.
Returns:
The coordinates of the centroid.
vec3d geom_if::face_cent ( const vector< int > &  face) const [inline]

Get a face centroid, for a face.

Parameters:
facecontains the vertex index numbers.
Returns:
The coordinates of the centroid.
void geom_if::face_cents ( vector< vec3d > &  ctds) const [inline]

Get all the face centroids.

Parameters:
ctdsvector used to return the coordinates of the centroids.
vec3d geom_if::face_nearpt ( const vector< int > &  face,
vec3d  P 
) const [inline]

Get the nearest point on a face to another point, for a face.

Parameters:
facecontains the vertex index numbers.
Pthe point
Returns:
The coordinates of the nearest point to P on the face plane.
vec3d geom_if::face_nearpt ( int  f_idx,
vec3d  P 
) const [inline]

Get the nearest point on a face to another point, for a face index.

Parameters:
f_idxface index number.
Pthe point
Returns:
The coordinates of the nearest point to P on the face plane.
vec3d geom_if::face_norm ( const vector< int > &  face,
bool  allow_zero = false 
) const [inline]

Get a face normal, for a face.

Parameters:
facecontains the vertex index numbers in the face.
allow_zeroif true then the magnitude of the normal is the area of the face, if false then for faces with near-zero area a normal with a more accurate direction is calculated.
Returns:
The normal
vec3d geom_if::face_norm ( int  f_idx,
bool  allow_zero = false 
) const [inline]

Get a face normal, for a face index.

Parameters:
f_idxthe face index number.
allow_zeroif true then the magnitude of the normal is the area of the face, if false then for faces with near-zero area a normal with a more accurate direction is calculated.
Returns:
The normal
void geom_if::face_norms ( vector< vec3d > &  norms,
bool  allow_zero = false 
) const [inline]

Get all the face normals.

Parameters:
normsvector used to return the normals.
allow_zeroif true then the magnitude of the normal is the area of the face, if false then for faces with near-zero area a normal with a more accurate direction is calculated.
vec3d geom_if::face_v ( int  f_idx,
int  v_no 
) const [inline]

Get the coordinates of a vertex of an face.

Parameters:
f_idxface index number.
v_nothe posisition the vertex appears in the face, 0, 1, 2, ...
Returns:
The vertex coordinates.
virtual const vector<int>& geom_if::faces ( int  f_idx) const [pure virtual]

Read access to a face.

Parameters:
f_idxindex number of the face.
Returns:
A reference to the face data.

Implemented in geom_v.

virtual int geom_if::faces ( int  f_idx,
int  v_no 
) const [pure virtual]

Get the index number of a vertex of a face.

Parameters:
f_idxface index number.
v_nothe position the vertex appears in the face, 0, 1, 2, ...
Returns:
The vertex index number.

Implemented in geom_v.

virtual const vector<vector<int> >& geom_if::faces ( ) const [pure virtual]

Read access to the faces.

Returns:
A reference to the face data.

Implemented in geom_v.

int geom_if::faces_mod ( int  f_idx,
int  v_no 
) const [inline, virtual]

Get the index number of a vertex of a face mod the size of the face.

Parameters:
f_idxface index number.
v_nothe position the vertex appears in the face, 0, 1, 2, ...
Returns:
The vertex index number.
void geom_if::get_impl_edges ( vector< vector< int > > &  edgs) const

Get implicit edges.

Returns the edges of the polygon faces

Parameters:
edgsthe edges are returned here
geom_info geom_if::get_info ( ) const

Get geom_info object.

Returns:
geom_info object associated with this geometry.
vector< vec3d > geom_if::get_star ( char  type = 'v',
vec3d  centre = vec3d(0,0,0) 
)

Get a star of vectors to use for making a zonohedron.

Parameters:
typethe type of star to make can be

  • v - centre to vertices are vectors (default)
  • a - all vertex to vertex are vectors
  • i - implicit edges (face sides) are vectors
  • e - explicit edges are vectors
centrethe centre to use when the type is v.
Returns:
The star of vectors.
bool geom_if::is_oriented ( ) const

Check if geomtery is consistently oriented.

Returns:
true if consistently oriented, otherwise false.
geom_if::operator bool ( ) const [inline]

Check whether geometry is set.

Returns:
true if the geometry is set, otherwise false.
int geom_if::orient ( vector< vector< int > > *  parts = 0)

Orient the geometry (if possible.)

Parameters:
partsused to return the index numbers of the faces in each of the disconnected parts (if parts is not 0 .)
Returns:
the number of disconnected parts.
bool geom_if::orient ( int  type,
char *  errmsg = 0 
)

Orient the geometry (if possible.)

Parameters:
typetype of orientation, 1 - positive volume, 2 negative volume, 3 - reverse first face and orient, 4 - reverse faces without orienting.
errmsgto return any error messages
Returns:
true if the orientation was succesful, otherwise false.
virtual vector<vector<int> >& geom_if::raw_edges ( ) [pure virtual]

Read/Write access to the edges.

Returns:
A reference to the edge data.

Implemented in geom_v.

virtual vector<vector<int> >& geom_if::raw_faces ( ) [pure virtual]

Read/Write access to the faces.

Returns:
A reference to the face data.

Implemented in geom_v.

virtual vector<vec3d>& geom_if::raw_verts ( ) [pure virtual]

Read/Write access to the vertices.

Returns:
A reference to vertex coordinates.

Implemented in geom_v.

bool geom_if::read ( FILE *  file,
char *  errmsg = 0 
) [virtual]

Read geometry from a file stream.

The file is first read as a normal OFF file, if that fails it will be read as a Qhull formatted OFF file, and if that fails the file will be read for any coordinates (lines that contains three numbers separated by commas and/or spaces will be taken as a set of coordinates.)

Parameters:
filethe file stream.
errmsgan array at least MSG_SZ chars long to return any error message.
Returns:
true if the file could be read, otherwise false and the error is detailed in errmsg.
bool geom_if::read ( string  file_name = "",
char *  errmsg = 0 
) [virtual]

Read geometry from a file.

The file is first read as a normal OFF file, if that fails it will be read as a Qhull formatted OFF file, and if that fails the file will be read for any coordinates (lines that contains three numbers separated by commas and/or spaces will be taken as a set of coordinates.)

Parameters:
file_namethe file name ("" or "-" for standard input).
errmsgan array at least MSG_SZ chars long to return any error message.
Returns:
true if the file could be read, otherwise false and the error is detailed in errmsg.
bool geom_if::read_resource ( string  res_name = "",
char *  errmsg = 0 
) [virtual]

Read resource geometry from resource model name.

Parameters:
res_namethe resource model name.
errmsgan array at least MSG_SZ chars long to return any error message.
Returns:
true if the resource name was valid, otherwise false and the error is detailed in errmsg.
bool geom_if::set_geodesic_planar ( const geom_if base,
int  m,
int  n = 0 
)

Set planar geodesic division.

A Class I pattern is made with m=0,n=1. A Class II pattern is made with m=1,n=1. A Class III pattern is made with n>=1,m>1.

Parameters:
basethe base polyhedron
mthe first pattern specifier.
nthe second pattern specifier.
Returns:
true if the pattern was valid, otherwise false.
bool geom_if::set_geodesic_sphere ( const geom_if base,
int  m,
int  n = 0,
vec3d  cent = vec3d(0,0,0) 
)

Set spherical geodesic division.

A Class I pattern is made with m=0,n=1. A Class II pattern is made with m=1,n=1. A Class III pattern is made with n>=1,m>1.

Parameters:
basethe base polyhedron
mthe first pattern specifier.
nthe second pattern specifier.
centthe centre of projection.
Returns:
true if the pattern was valid, otherwise false.
int geom_if::set_hull ( string  qh_args = "",
char *  errmsg = 0 
)

Set the geometry to its convex hull.

If the convex hull could not be calculated the the geometry will be left empty.

Parameters:
qh_argsadditional arguments to pass to qhull (unsupported, may not work, check output.)
errmsgan array at least MSG_SZ chars long to return any error message.
Returns:
order or dimension 3, 2, 1 or 0. or -1 if qhull fails and the error is detailed in errmsg.
bool geom_if::set_zono ( const vector< vec3d > &  star,
char *  errmsg = 0 
)

Set the geometry to a zonohedron made from a star.

Parameters:
starthe star of vectors.
errmsgan array at least MSG_SZ chars long to return any error message.
Returns:
true if the zonohedron could be calculated, otherwise false and the error is detailed in errmsg.
void geom_if::sphere_projection ( vec3d  centre = vec3d(0,0,0),
double  radius = 1.0 
)

Project the vertices onto a sphere.

Parameters:
centrethe centre of the sphere.
radiusthe radius of the sphere.
void geom_if::transform ( const mat3d trans) [inline]

Apply a transformation matrix.

Parameters:
transthe transformation matrix.
void geom_if::triangulate ( col_val  col = col_val(),
unsigned int  winding = TESS_WINDING_NONZERO,
vector< int > *  fmap = 0 
)

Triangulate (tesselate) the faces.

Divide the faces into triangles, adding new vertices as necessary, and coloured edges if a colour is set for new elements.

Parameters:
colthe colour for any new edges or vertices that were added. The default leaves them with default colours. If it is set to col_val::invisible then the new elements are given a colour that indicates that they should not be displayed.
windingselects resulting faces acording to winding number TESS_WINDING_ODD TESS_WINDING_NONZERO (default) TESS_WINDING_POSITIVE TESS_WINDING_NEGATIVE TESS_WINDING_ABS_GEQ_TWO
fmapa vector to return the face mapping. Each old face index maps to the first index of faces it was converted to. A final index holds the total number of new faces
virtual const vector<vec3d>& geom_if::verts ( ) const [pure virtual]

Read access to the vertices.

Returns:
A reference to vertex coordinates.

Implemented in geom_v.

virtual const vec3d& geom_if::verts ( int  v_idx) const [pure virtual]

Read access to a vertex.

Parameters:
v_idxindex number of the vertex.
Returns:
A reference to the vertex coordinates.

Implemented in geom_v.

void geom_if::verts_merge ( map< int, int > &  vmap)

Merge some of the vertices.

Parameters:
vmapa map from each vertex index number to the index number of the vertex it will be replaced with
void geom_if::write ( FILE *  file,
int  sig_dgts = DEF_SIG_DGTS 
) const [virtual]

Write geometry to a file stream.

Parameters:
filethe file stream.
sig_dgtsthe number of significant digits to write, or if negative then the number of digits after the decimal point.
bool geom_if::write ( string  file_name = "",
char *  errmsg = 0,
int  sig_dgts = DEF_SIG_DGTS 
) const [virtual]

Write geometry to a file.

Parameters:
file_namethe file name ("" for standard output.)
errmsgan array at least MSG_SZ chars long to return any error message.
sig_dgtsthe number of significant digits to write, or if negative then the number of digits after the decimal point.
Returns:
true if the file could be written, otherwise false and the error is detailed in errmsg.
void geom_if::write_crds ( FILE *  file,
const char *  sep = " ",
int  sig_dgts = DEF_SIG_DGTS 
) const [virtual]

Write coordinates to a file stream.

Parameters:
filethe file stream.
sepa string to use as the seperator between coordinates.
sig_dgtsthe number of significant digits to write, or if negative then the number of digits after the decimal point.
bool geom_if::write_crds ( string  file_name = "",
char *  errmsg = 0,
const char *  sep = " ",
int  sig_dgts = DEF_SIG_DGTS 
) const [virtual]

Write coordinates to a file.

Parameters:
file_namethe file name ("" for standard output.)
errmsgan array at least MSG_SZ chars long to return any error message.
sepa string to use as the seperator between coordinates.
sig_dgtsthe number of significant digits to write, or if negative then the number of digits after the decimal point.
Returns:
true if the file could be written, otherwise false and the error is detailed in errmsg.

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