GTS Library Reference Manual |
---|
#include <gts.h> #define GTS_SURFACE_INTER_CLASS (klass) #define GTS_SURFACE_INTER (obj) #define GTS_IS_SURFACE_INTER (obj) GtsSurfaceInterClass; GtsSurfaceInter;GSList * gts_surface_intersection (GtsSurface *s1, GtsSurface *s2,GNode *faces_tree1,GNode *faces_tree2); GtsSurfaceInterClass* gts_surface_inter_class (void); GtsSurfaceInter* gts_surface_inter_new (GtsSurfaceInterClass *klass, GtsSurface *s1, GtsSurface *s2,GNode *faces_tree1,GNode *faces_tree2,gboolean is_open1,gboolean is_open2);gboolean gts_surface_inter_check (GtsSurfaceInter *si,gboolean *closed); enum GtsBooleanOperation;void gts_surface_inter_boolean (GtsSurfaceInter *si, GtsSurface *surface, GtsBooleanOperation op); GtsSurface* gts_surface_is_self_intersecting (GtsSurface *s);
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. |
typedef struct { GtsObjectClass parent_class; } GtsSurfaceInterClass;
The surface intersection class.
typedef struct { GtsObject object; GtsSurface * s1; GtsSurface * s2; GSList * edges; } GtsSurfaceInter;
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. |
edges ; | List of GtsEdge defining the 3D curve intersection of the two surfaces. |
GSList * gts_surface_intersection (GtsSurface *s1, GtsSurface *s2,GNode *faces_tree1,GNode *faces_tree2);
s1 : | a GtsSurface. |
s2 : | a GtsSurface. |
faces_tree1 : | a bounding box tree (see |
faces_tree2 : | a bounding box tree for the faces of |
Returns : | a list of GtsEdge defining the 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,GNode *faces_tree1,GNode *faces_tree2,gboolean is_open1,gboolean is_open2);
When triangulating the cut faces, the new faces inherit the
attributes of these original faces through their attributes()
klass : | |
s1 : | a GtsSurface. |
s2 : | a GtsSurface. |
faces_tree1 : | a bounding box tree (see |
faces_tree2 : | a bounding box tree for the faces of |
is_open1 : | whether |
is_open2 : | whether |
Returns : | a new GtsSurfaceInter describing the intersection of |
gboolean gts_surface_inter_check (GtsSurfaceInter *si,gboolean *closed);
si : | |
closed : | is set to TRUE if |
Returns : | TRUE if the curve described by |
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 : | |
surface : | a GtsSurface. |
op : |
GtsSurface* gts_surface_is_self_intersecting (GtsSurface *s);
s : | a GtsSurface. |
Returns : | a new GtsSurface containing the faces of |
<<< Surface operations | Surface simplification and refinement >>> |