>
Boolean operations| GTS Library Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
#include <gts.h> #define GTS_SURFACE_INTER_CLASS (klass) #define GTS_SURFACE_INTER (obj) #define GTS_IS_SURFACE_INTER (obj) struct GtsSurfaceInterClass; struct GtsSurfaceInter; GtsSurfaceInterClass* gts_surface_inter_class (void); GtsSurfaceInter* gts_surface_inter_new (GtsSurfaceInterClass *klass, GtsSurface *s1, GtsSurface *s2, |
The three-dimensional curve intersection of two surfaces is described by a GtsSurfaceInter object. This object contains additional information which allows to compute all the set operations between the two surfaces.
#define GTS_SURFACE_INTER_CLASS(klass) |
Casts klass to GtsSurfaceInterClass.
| klass : | a descendant of GtsSurfaceInterClass. |
#define GTS_SURFACE_INTER(obj) |
Casts obj to GtsSurfaceInter.
| obj : | a descendant of GtsSurfaceInter. |
#define GTS_IS_SURFACE_INTER(obj) |
Evaluates to TRUE if obj is a GtsSurfaceInter, FALSE otherwise.
| obj : | a pointer to test. |
struct GtsSurfaceInter {
GtsObject object;
GtsSurface * s1;
GtsSurface * s2;
GSList * edges;
}; |
The surface intersection object.
| GtsObject object | Parent object. |
| GtsSurface *s1 | Local triangulation of the intersecting faces of the first surface. |
| GtsSurface *s2 | Local triangulation of the intersecting faces of the second surface. |
| List of GtsEdge defining the 3D curve intersection of the two surfaces. |
GtsSurfaceInterClass* gts_surface_inter_class (void); |
| Returns : | the GtsSurfaceInterClass. |
GtsSurfaceInter* gts_surface_inter_new (GtsSurfaceInterClass *klass, GtsSurface *s1, GtsSurface *s2, |
When triangulating the cut faces, the new faces inherit the
attributes of these original faces through their
| klass : | a GtsSurfaceInterClass. |
| s1 : | a GtsSurface. |
| s2 : | a GtsSurface. |
| faces_tree1 : | a bounding box tree (see gts_bb_tree_new()) for the faces of s1. |
| faces_tree2 : | a bounding box tree for the faces of s2. |
| is_open1 : | |
| is_open2 : | |
| Returns : | a new GtsSurfaceInter describing the intersection of s1 and s2. |
|
| si : | a GtsSurfaceInter. |
| closed : | is set to TRUE if si->edges is a closed curve, FALSE otherwise. |
| Returns : | TRUE if the curve described by si is an orientable manifold, FALSE otherwise. |
typedef enum { GTS_1_OUT_2,
GTS_1_IN_2,
GTS_2_OUT_1,
GTS_2_IN_1 } GtsBooleanOperation; |
GTS_1_OUT_2 identifies the part of the first surface which lies outside the second surface.
GTS_1_IN_2 identifies the part of the first surface which lies inside the second surface.
GTS_2_OUT_1 identifies the part of the second surface which lies outside the first surface.
GTS_2_IN_1 identifies the part of the second surface which lies inside the first surface.
void gts_surface_inter_boolean (GtsSurfaceInter *si, GtsSurface *surface, GtsBooleanOperation op); |
Adds to surface the part of the surface described by si and op.
| si : | a GtsSurfaceInter. |
| surface : | a GtsSurface. |
| op : | a GtsBooleanOperation. |
GtsSurface* gts_surface_is_self_intersecting (GtsSurface *s); |
| s : | a GtsSurface. |
| Returns : | a new GtsSurface containing the faces of s which are self-intersecting or NULL if no faces of s are self-intersecting. |