#include "builderPrim.h"
#include "mesherTempl.h"
#include "builderNormalVisualizer.h"
#include "config_builder.h"
#include <geom.h>
#include <geomprimitives.h>
#include <algorithm>
Go to the source code of this file.
Compounds | |
struct | DecompVtx |
class | PrimByType |
An STL function object to sort primitives in order by type. More... | |
Defines | |
#define | VX(p, c) p->coord[c] |
Functions | |
template<class PrimType, class OutputIterator> bool | decomp_concave (const PrimType &prim, BuilderBucket &bucket, OutputIterator result, int asum, int x, int y) |
Decomposes a concave polygon into triangles. | |
template<class PrimType, class OutputIterator> bool | triangulate_poly (const PrimType &prim, BuilderBucket &bucket, OutputIterator result) |
Breaks a (possibly concave) higher-order polygon into a series of constituent triangles. | |
template<class PrimType, class OutputIterator> bool | expand_polys (PrimType &prim, BuilderBucket &, OutputIterator result) |
Identifies a single polygon as a triangle, quad, or higher-order polygon, and writes it into the result list. | |
template<class PrimType, class OutputIterator> bool | expand_points (const PrimType &prim, BuilderBucket &, OutputIterator result) |
Expands a light points primitive into its individual component points, with one point per primitive. | |
template<class PrimType, class OutputIterator> bool | expand_lines (const PrimType &prim, BuilderBucket &, OutputIterator result) |
Expands a linestrip primitive into its component line primitives. | |
template<class PrimType, class OutputIterator> bool | expand (const PrimType &prim, BuilderBucket &bucket, OutputIterator result) |
Receives a single primitive as a BuilderPrim or BuilderPrimI object, as input by the user. | |
template<class InputIterator, class PrimType> int | build_geoms (InputIterator first, InputIterator last, BuilderBucket &bucket, GeomNode *geom_node, PrimType *) |
Accepts a list of BuilderPrim or BuilderPrimI objects, defined by the iterators first and last, and creates corresponding geometry for them in the indicated GeomNode. | |
template<class InputIterator, class PrimType> int | __mesh_and_build (InputIterator first, InputIterator last, BuilderBucket &bucket, GeomNode *geom_node, PrimType *) |
The implementation of mesh_and_build(), below. | |
template<class InputIterator, class value_type> int | mesh_and_build (InputIterator first, InputIterator last, BuilderBucket &bucket, GeomNode *geom_node, value_type *value_type_ptr) |
Accepts a list of BuilderPrim or BuilderPrimI objects, defined by the iterators first and list, runs them through the mesher if specified by the bucket, and builds them into the indicated GeomNode. | |
template<class InputIterator, class OutputIterator, class Predicate> OutputIterator | split (InputIterator first, InputIterator last, OutputIterator true_result, OutputIterator false_result, Predicate pred) |
Splits an STL list into two other lists, according to the return value from pred. |
Definition in file builderFuncs.I.
|
|
|
The implementation of mesh_and_build(), below. This extra function call is just to allow mesh_and_build() to infer the PrimType (BuilderPrim or BuilderPrimI) from the iterator's value type, and template on that. Definition at line 855 of file builderFuncs.I. |
|
Accepts a list of BuilderPrim or BuilderPrimI objects, defined by the iterators first and last, and creates corresponding geometry for them in the indicated GeomNode.
Definition at line 535 of file builderFuncs.I. References G_OFF, G_OVERALL, G_PER_VERTEX, and GeomBindType. Referenced by PrimByType< PrimType >::operator()(). |
|
Decomposes a concave polygon into triangles. Returns true if successful, false if the polygon is self-intersecting. Definition at line 51 of file builderFuncs.I. |
|
Receives a single primitive as a BuilderPrim or BuilderPrimI object, as input by the user. Does some initial processing on the primitive to verify internal consistency (for instance, that a quad has four vertices), and returns a new BuilderPrim or series of BuilderPrim objects, suitable for building with. More than one primitive might be returned because higher-order polygons may be broken up into triangles, and linestrips and points are broken into their component pieces. The output primitives are written into the STL container defined by result. Definition at line 481 of file builderFuncs.I. References TYPENAME. Referenced by BuilderBucketNode::add_prim(). |
|
Expands a linestrip primitive into its component line primitives.
Definition at line 429 of file builderFuncs.I. References BuilderProperties::_mesh, BuilderProperties::_subdivide_polys, BPT_line, BPT_point, BPT_poly, BPT_quad, BPT_tri, expand_points(), expand_polys(), and triangulate_poly(). |
|
Expands a light points primitive into its individual component points, with one point per primitive.
Definition at line 403 of file builderFuncs.I. Referenced by expand_lines(). |
|
Identifies a single polygon as a triangle, quad, or higher-order polygon, and writes it into the result list.
Definition at line 367 of file builderFuncs.I. Referenced by expand_lines(). |
|
Accepts a list of BuilderPrim or BuilderPrimI objects, defined by the iterators first and list, runs them through the mesher if specified by the bucket, and builds them into the indicated GeomNode.
Definition at line 944 of file builderFuncs.I. Referenced by BuilderBucketNode::add_prim(). |
|
Splits an STL list into two other lists, according to the return value from pred.
Definition at line 961 of file builderFuncs.I. |
|
Breaks a (possibly concave) higher-order polygon into a series of constituent triangles.
Definition at line 213 of file builderFuncs.I. Referenced by expand_lines(). |