Blender V2.61 - r43446
Classes | Functions

CSG_BooleanOps.cpp File Reference

#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_BooleanOperationCSG_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)

Detailed Description

Definition in file CSG_BooleanOps.cpp.


Function Documentation

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 
)
int CSG_PerformBooleanOperation ( CSG_BooleanOperation operation,
CSG_OperationType  op_type,
CSG_FaceIteratorDescriptor  obAFaces,
CSG_VertexIteratorDescriptor  obAVertices,
CSG_FaceIteratorDescriptor  obBFaces,
CSG_VertexIteratorDescriptor  obBVertices 
)