Blender V2.61 - r43446
Defines | Typedefs | Functions

shrinkwrap.c File Reference

#include <string.h>
#include <float.h>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <time.h>
#include <assert.h>
#include "DNA_object_types.h"
#include "DNA_modifier_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_mesh_types.h"
#include "DNA_scene_types.h"
#include "BLI_editVert.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_shrinkwrap.h"
#include "BKE_DerivedMesh.h"
#include "BKE_lattice.h"
#include "BKE_deform.h"
#include "BKE_mesh.h"
#include "BKE_subsurf.h"

Go to the source code of this file.

Defines

#define OUT_OF_MEMORY()   ((void)printf("Shrinkwrap: Out of memory\n"))
#define BENCH(a)   (a)

Typedefs

typedef void(* Shrinkwrap_ForeachVertexCallback )(DerivedMesh *target, float *co, float *normal)

Functions

DerivedMeshobject_get_derived_final (Object *ob)
void space_transform_from_matrixs (SpaceTransform *data, float local[4][4], float target[4][4])
void space_transform_apply (const SpaceTransform *data, float *co)
void space_transform_invert (const SpaceTransform *data, float *co)
static void space_transform_apply_normal (const SpaceTransform *data, float *no)
static void space_transform_invert_normal (const SpaceTransform *data, float *no)
static void shrinkwrap_calc_nearest_vertex (ShrinkwrapCalcData *calc)
int normal_projection_project_vertex (char options, const float *vert, const float *dir, const SpaceTransform *transf, BVHTree *tree, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
static void shrinkwrap_calc_normal_projection (ShrinkwrapCalcData *calc)
static void shrinkwrap_calc_nearest_surface_point (ShrinkwrapCalcData *calc)
void shrinkwrapModifier_deform (ShrinkwrapModifierData *smd, Object *ob, DerivedMesh *dm, float(*vertexCos)[3], int numVerts)

Detailed Description

Definition in file shrinkwrap.c.


Define Documentation

#define BENCH (   a)    (a)
#define OUT_OF_MEMORY ( )    ((void)printf("Shrinkwrap: Out of memory\n"))

Typedef Documentation

typedef void( * Shrinkwrap_ForeachVertexCallback)(DerivedMesh *target, float *co, float *normal)

Definition at line 85 of file shrinkwrap.c.


Function Documentation

int normal_projection_project_vertex ( char  options,
const float *  vert,
const float *  dir,
const SpaceTransform transf,
BVHTree tree,
BVHTreeRayHit hit,
BVHTree_RayCastCallback  callback,
void *  userdata 
)
DerivedMesh* object_get_derived_final ( Object ob) [read]
static void shrinkwrap_calc_nearest_surface_point ( ShrinkwrapCalcData calc) [static]
static void shrinkwrap_calc_nearest_vertex ( ShrinkwrapCalcData calc) [static]
static void shrinkwrap_calc_normal_projection ( ShrinkwrapCalcData calc) [static]
void shrinkwrapModifier_deform ( ShrinkwrapModifierData smd,
Object ob,
DerivedMesh dm,
float(*)  vertexCos[3],
int  numVerts 
)
void space_transform_apply ( const SpaceTransform data,
float *  co 
)

Definition at line 112 of file shrinkwrap.c.

References mul_v3_m4v3().

static void space_transform_apply_normal ( const SpaceTransform data,
float *  no 
) [static]

Definition at line 122 of file shrinkwrap.c.

References mul_mat3_m4_v3(), and normalize_v3().

Referenced by normal_projection_project_vertex().

void space_transform_from_matrixs ( SpaceTransform data,
float  local[4][4],
float  target[4][4] 
)
void space_transform_invert ( const SpaceTransform data,
float *  co 
)

Definition at line 117 of file shrinkwrap.c.

References mul_v3_m4v3().

static void space_transform_invert_normal ( const SpaceTransform data,
float *  no 
) [static]

Definition at line 128 of file shrinkwrap.c.

References mul_mat3_m4_v3(), and normalize_v3().

Referenced by normal_projection_project_vertex().