Blender V2.61 - r43446
Defines | Typedefs | Functions

BOP_CarveInterface.cpp File Reference

#include "../extern/BOP_Interface.h"
#include "../../bsp/intern/BSP_CSGMesh_CFIterator.h"
#include <carve/csg_triangulator.hpp>
#include <carve/interpolator.hpp>
#include <carve/rescale.hpp>

Go to the source code of this file.

Defines

#define MAX(x, y)   ((x)>(y)?(x):(y))
#define MIN(x, y)   ((x)<(y)?(x):(y))

Typedefs

typedef unsigned int uint

Functions

static int isFacePlanar (CSG_IFace &face, std::vector< carve::geom3d::Vector > &vertices)
static carve::mesh::MeshSet< 3 > * Carve_addMesh (CSG_FaceIteratorDescriptor &face_it, CSG_VertexIteratorDescriptor &vertex_it, carve::interpolate::FaceAttr< uint > &oface_num, uint &num_origfaces)
static uint quadMerge (std::map< carve::mesh::MeshSet< 3 >::vertex_t *, uint > *vertexToIndex_map, carve::mesh::MeshSet< 3 >::face_t *f1, carve::mesh::MeshSet< 3 >::face_t *f2, uint v, uint quad[4])
static BSP_CSGMeshCarve_exportMesh (carve::mesh::MeshSet< 3 > *&poly, carve::interpolate::FaceAttr< uint > &oface_num, uint num_origfaces)
BoolOpState BOP_performBooleanOperation (BoolOpType opType, BSP_CSGMesh **outputMesh, CSG_FaceIteratorDescriptor obAFaces, CSG_VertexIteratorDescriptor obAVertices, CSG_FaceIteratorDescriptor obBFaces, CSG_VertexIteratorDescriptor obBVertices)

Detailed Description

Definition in file BOP_CarveInterface.cpp.


Define Documentation

#define MAX (   x,
 
)    ((x)>(y)?(x):(y))
#define MIN (   x,
 
)    ((x)<(y)?(x):(y))

Typedef Documentation

typedef unsigned int uint

Definition at line 39 of file BOP_CarveInterface.cpp.


Function Documentation

BoolOpState BOP_performBooleanOperation ( BoolOpType  opType,
BSP_CSGMesh **  outputMesh,
CSG_FaceIteratorDescriptor  obAFaces,
CSG_VertexIteratorDescriptor  obAVertices,
CSG_FaceIteratorDescriptor  obBFaces,
CSG_VertexIteratorDescriptor  obBVertices 
)

Performs a generic booleam operation, the entry point for external modules.

Parameters:
opTypeBoolean operation type BOP_INTERSECTION, BOP_UNION, BOP_DIFFERENCE
outputMeshOutput mesh, the final result (the object C)
obAFacesObject A faces list
obAVerticesObject A vertices list
obBFacesObject B faces list
obBVerticesObject B vertices list
interpFuncInterpolating function
Returns:
operation state: BOP_OK, BOP_NO_SOLID, BOP_ERROR

Definition at line 332 of file BOP_CarveInterface.cpp.

References BOP_DIFFERENCE, BOP_ERROR, BOP_INTERSECTION, BOP_OK, BOP_UNION, Carve_addMesh(), Carve_exportMesh(), i, left(), MAX, max, MIN, min, and NULL.

static carve::mesh::MeshSet<3>* Carve_addMesh ( CSG_FaceIteratorDescriptor face_it,
CSG_VertexIteratorDescriptor vertex_it,
carve::interpolate::FaceAttr< uint > &  oface_num,
uint num_origfaces 
) [static]
static BSP_CSGMesh* Carve_exportMesh ( carve::mesh::MeshSet< 3 > *&  poly,
carve::interpolate::FaceAttr< uint > &  oface_num,
uint  num_origfaces 
) [static]
static int isFacePlanar ( CSG_IFace face,
std::vector< carve::geom3d::Vector > &  vertices 
) [static]
static uint quadMerge ( std::map< carve::mesh::MeshSet< 3 >::vertex_t *, uint > *  vertexToIndex_map,
carve::mesh::MeshSet< 3 >::face_t *  f1,
carve::mesh::MeshSet< 3 >::face_t *  f2,
uint  v,
uint  quad[4] 
) [static]

Definition at line 142 of file BOP_CarveInterface.cpp.

Referenced by Carve_exportMesh().