Blender V2.61 - r43446
Classes | Functions

MOD_boolean_util.c File Reference

#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
#include "BLI_ghash.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_depsgraph.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
#include "CSG_BooleanOps.h"
#include "MOD_boolean_util.h"

Go to the source code of this file.

Classes

struct  VertexIt
struct  FaceIt

Functions

static void VertexIt_Destruct (CSG_VertexIteratorDescriptor *iterator)
static int VertexIt_Done (CSG_IteratorPtr it)
static void VertexIt_Fill (CSG_IteratorPtr it, CSG_IVertex *vert)
static void VertexIt_Step (CSG_IteratorPtr it)
static void VertexIt_Reset (CSG_IteratorPtr it)
static void VertexIt_Construct (CSG_VertexIteratorDescriptor *output, DerivedMesh *dm, Object *ob)
static void FaceIt_Destruct (CSG_FaceIteratorDescriptor *iterator)
static int FaceIt_Done (CSG_IteratorPtr it)
static void FaceIt_Fill (CSG_IteratorPtr it, CSG_IFace *face)
static void FaceIt_Step (CSG_IteratorPtr it)
static void FaceIt_Reset (CSG_IteratorPtr it)
static void FaceIt_Construct (CSG_FaceIteratorDescriptor *output, DerivedMesh *dm, int offset, Object *ob)
static ObjectAddNewBlenderMesh (Scene *scene, Base *base)
static void InterpCSGFace (DerivedMesh *dm, DerivedMesh *orig_dm, int index, int orig_index, int nr, float mapmat[][4])
static DerivedMeshConvertCSGDescriptorsToDerivedMesh (CSG_FaceIteratorDescriptor *face_it, CSG_VertexIteratorDescriptor *vertex_it, float parinv[][4], float mapmat[][4], Material **mat, int *totmat, DerivedMesh *dm1, Object *ob1, DerivedMesh *dm2, Object *ob2)
static void BuildMeshDescriptors (struct DerivedMesh *dm, struct Object *ob, int face_offset, struct CSG_FaceIteratorDescriptor *face_it, struct CSG_VertexIteratorDescriptor *vertex_it)
static void FreeMeshDescriptors (struct CSG_FaceIteratorDescriptor *face_it, struct CSG_VertexIteratorDescriptor *vertex_it)
static DerivedMeshNewBooleanDerivedMesh_intern (DerivedMesh *dm, struct Object *ob, DerivedMesh *dm_select, struct Object *ob_select, int int_op_type, Material **mat, int *totmat)
int NewBooleanMesh (Scene *scene, Base *base, Base *base_select, int int_op_type)
DerivedMeshNewBooleanDerivedMesh (DerivedMesh *dm, struct Object *ob, DerivedMesh *dm_select, struct Object *ob_select, int int_op_type)

Detailed Description

Definition in file MOD_boolean_util.c.


Function Documentation

static Object* AddNewBlenderMesh ( Scene scene,
Base base 
) [static]
static void BuildMeshDescriptors ( struct DerivedMesh dm,
struct Object ob,
int  face_offset,
struct CSG_FaceIteratorDescriptor face_it,
struct CSG_VertexIteratorDescriptor vertex_it 
) [static]

Definition at line 441 of file MOD_boolean_util.c.

References FaceIt_Construct(), and VertexIt_Construct().

Referenced by NewBooleanDerivedMesh_intern().

static DerivedMesh* ConvertCSGDescriptorsToDerivedMesh ( CSG_FaceIteratorDescriptor face_it,
CSG_VertexIteratorDescriptor vertex_it,
float  parinv[][4],
float  mapmat[][4],
Material **  mat,
int *  totmat,
DerivedMesh dm1,
Object ob1,
DerivedMesh dm2,
Object ob2 
) [static]
static void FaceIt_Construct ( CSG_FaceIteratorDescriptor output,
DerivedMesh dm,
int  offset,
Object ob 
) [static]
static void FaceIt_Destruct ( CSG_FaceIteratorDescriptor iterator) [static]
static int FaceIt_Done ( CSG_IteratorPtr  it) [static]

Definition at line 172 of file MOD_boolean_util.c.

References FaceIt::dm, DerivedMesh::getNumFaces, and FaceIt::pos.

Referenced by FaceIt_Construct().

static void FaceIt_Fill ( CSG_IteratorPtr  it,
CSG_IFace face 
) [static]
static void FaceIt_Reset ( CSG_IteratorPtr  it) [static]

Definition at line 211 of file MOD_boolean_util.c.

References FaceIt::pos.

Referenced by FaceIt_Construct().

static void FaceIt_Step ( CSG_IteratorPtr  it) [static]

Definition at line 205 of file MOD_boolean_util.c.

References FaceIt::pos.

Referenced by FaceIt_Construct().

static void FreeMeshDescriptors ( struct CSG_FaceIteratorDescriptor face_it,
struct CSG_VertexIteratorDescriptor vertex_it 
) [static]

Definition at line 452 of file MOD_boolean_util.c.

References FaceIt_Destruct(), and VertexIt_Destruct().

Referenced by NewBooleanDerivedMesh_intern().

static void InterpCSGFace ( DerivedMesh dm,
DerivedMesh orig_dm,
int  index,
int  orig_index,
int  nr,
float  mapmat[][4] 
) [static]
DerivedMesh* NewBooleanDerivedMesh ( DerivedMesh dm,
struct Object ob,
DerivedMesh dm_select,
struct Object ob_select,
int  int_op_type 
) [read]

Definition at line 592 of file MOD_boolean_util.c.

References NewBooleanDerivedMesh_intern(), and NULL.

static DerivedMesh* NewBooleanDerivedMesh_intern ( DerivedMesh dm,
struct Object ob,
DerivedMesh dm_select,
struct Object ob_select,
int  int_op_type,
Material **  mat,
int *  totmat 
) [static]
int NewBooleanMesh ( Scene scene,
Base base,
Base base_select,
int  int_op_type 
)
static void VertexIt_Construct ( CSG_VertexIteratorDescriptor output,
DerivedMesh dm,
Object ob 
) [static]
static void VertexIt_Destruct ( CSG_VertexIteratorDescriptor iterator) [static]

Implementations of local vertex iterator functions. These describe a blender mesh to the CSG module.

Definition at line 73 of file MOD_boolean_util.c.

References CSG_VertexIteratorDescriptor::Done, CSG_VertexIteratorDescriptor::Fill, CSG_VertexIteratorDescriptor::it, MEM_freeN(), NULL, CSG_VertexIteratorDescriptor::num_elements, CSG_VertexIteratorDescriptor::Reset, and CSG_VertexIteratorDescriptor::Step.

Referenced by FreeMeshDescriptors().

static int VertexIt_Done ( CSG_IteratorPtr  it) [static]

Definition at line 88 of file MOD_boolean_util.c.

References VertexIt::dm, DerivedMesh::getNumVerts, and VertexIt::pos.

Referenced by VertexIt_Construct().

static void VertexIt_Fill ( CSG_IteratorPtr  it,
CSG_IVertex vert 
) [static]
static void VertexIt_Reset ( CSG_IteratorPtr  it) [static]

Definition at line 119 of file MOD_boolean_util.c.

References VertexIt::pos.

Referenced by VertexIt_Construct().

static void VertexIt_Step ( CSG_IteratorPtr  it) [static]

Definition at line 113 of file MOD_boolean_util.c.

References VertexIt::pos.

Referenced by VertexIt_Construct().