Blender V2.61 - r43446
|
#include "../extern/CSG_BooleanOps.h"
#include "BSP_CSGMesh_CFIterator.h"
#include "MEM_RefCountPtr.h"
#include "../../boolop/extern/BOP_Interface.h"
#include <iostream>
#include "BSP_MeshPrimitives.h"
Go to the source code of this file.
Classes | |
struct | BSP_MeshInfo |
Functions | |
CSG_BooleanOperation * | CSG_NewBooleanFunction (void) |
int | CSG_PerformBooleanOperation (CSG_BooleanOperation *operation, CSG_OperationType op_type, CSG_FaceIteratorDescriptor obAFaces, CSG_VertexIteratorDescriptor obAVertices, CSG_FaceIteratorDescriptor obBFaces, CSG_VertexIteratorDescriptor obBVertices) |
int | CSG_OutputFaceDescriptor (CSG_BooleanOperation *operation, CSG_FaceIteratorDescriptor *output) |
int | CSG_OutputVertexDescriptor (CSG_BooleanOperation *operation, CSG_VertexIteratorDescriptor *output) |
void | CSG_FreeVertexDescriptor (CSG_VertexIteratorDescriptor *v_descriptor) |
void | CSG_FreeFaceDescriptor (CSG_FaceIteratorDescriptor *f_descriptor) |
void | CSG_FreeBooleanOperation (CSG_BooleanOperation *operation) |
Definition in file CSG_BooleanOps.cpp.
void CSG_FreeBooleanOperation | ( | CSG_BooleanOperation * | operation | ) |
Free the memory associated with a boolean operation. NOTE any iterator descriptor describing the output will become invalid after this call and should be freed immediately.
Definition at line 170 of file CSG_BooleanOps.cpp.
References CSG_BooleanOperation::CSG_info, NULL, and BSP_MeshInfo::output_mesh.
Referenced by NewBooleanDerivedMesh_intern().
void CSG_FreeFaceDescriptor | ( | CSG_FaceIteratorDescriptor * | f_descriptor | ) |
Definition at line 162 of file CSG_BooleanOps.cpp.
References BSP_CSGMesh_FaceIt_Destruct().
Referenced by NewBooleanDerivedMesh_intern().
void CSG_FreeVertexDescriptor | ( | CSG_VertexIteratorDescriptor * | v_descriptor | ) |
Clean up functions. Free internal memory associated with CSG interface structures. You must call these functions on any structures created by the module, even if subsequent operations did not succeed.
Definition at line 154 of file CSG_BooleanOps.cpp.
References BSP_CSGMesh_VertexIt_Destruct().
Referenced by NewBooleanDerivedMesh_intern().
CSG_BooleanOperation* CSG_NewBooleanFunction | ( | void | ) |
Return a ptr to a CSG_BooleanOperation object allocated on the heap. The CSG module owns the memory associated with the returned ptr, use CSG_FreeBooleanOperation() to free this memory.
Definition at line 55 of file CSG_BooleanOps.cpp.
References CSG_BooleanOperation::CSG_info, NULL, and BSP_MeshInfo::output_mesh.
Referenced by NewBooleanDerivedMesh_intern().
int CSG_OutputFaceDescriptor | ( | CSG_BooleanOperation * | operation, |
CSG_FaceIteratorDescriptor * | output | ||
) |
If the a boolean operation was successful, you may access the results through the following functions.
CSG_OuputFaceDescriptor() returns a ptr to a CSG_FaceIteratorDesciptor allocated on the heap and owned by the CSG module. The iterator is positioned at the start of the internal face container. CSG_OutputVertexDescriptor() returns a ptr to a CSG_VertexIteratorDescriptor allocated on the heap and owned by the CSG module. The iterator is positioned at the start of the internal vertex container. There is no function to rewind an iterator but you may obtain more than one iterator at a time. Please use the function CSG_FreeFaceIterator() and CSG_FreeVertexIterator to free internal memory allocated for these iterators.
If the last operation was not successful, these functions return NULL.
Definition at line 123 of file CSG_BooleanOps.cpp.
References BSP_CSGMesh_FaceIt_Construct(), CSG_BooleanOperation::CSG_info, NULL, and BSP_MeshInfo::output_mesh.
Referenced by NewBooleanDerivedMesh_intern().
int CSG_OutputVertexDescriptor | ( | CSG_BooleanOperation * | operation, |
CSG_VertexIteratorDescriptor * | output | ||
) |
Definition at line 139 of file CSG_BooleanOps.cpp.
References BSP_CSGMeshVertexIt_Construct(), CSG_BooleanOperation::CSG_info, NULL, and BSP_MeshInfo::output_mesh.
Referenced by NewBooleanDerivedMesh_intern().
int CSG_PerformBooleanOperation | ( | CSG_BooleanOperation * | operation, |
CSG_OperationType | op_type, | ||
CSG_FaceIteratorDescriptor | obAFaces, | ||
CSG_VertexIteratorDescriptor | obAVertices, | ||
CSG_FaceIteratorDescriptor | obBFaces, | ||
CSG_VertexIteratorDescriptor | obBVertices | ||
) |
Compute the boolean operation, UNION, INTERSECION or DIFFERENCE
Definition at line 73 of file CSG_BooleanOps.cpp.
References BOP_DIFFERENCE, BOP_ERROR, BOP_INTERSECTION, BOP_NO_SOLID, BOP_OK, BOP_performBooleanOperation(), BOP_UNION, CSG_BooleanOperation::CSG_info, e_csg_difference, e_csg_union, CSG_FaceIteratorDescriptor::it, CSG_VertexIteratorDescriptor::it, NULL, BSP_MeshInfo::output_mesh, CSG_VertexIteratorDescriptor::Reset, and CSG_FaceIteratorDescriptor::Reset.
Referenced by NewBooleanDerivedMesh_intern().