header re-shuffle, some headers contained unneeded refereces to other headers, better include inline with the C files that need them

This commit is contained in:
2010-08-10 05:41:51 +00:00
parent b525dfb298
commit 15669532a2
23 changed files with 100 additions and 74 deletions

View File

@@ -33,24 +33,8 @@
#include <float.h>
#include "BLI_linklist.h"
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "DNA_cloth_types.h"
#include "DNA_customdata_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_collision.h"
struct Object;
struct ListBase;
struct Scene;
struct MFace;
struct DerivedMesh;
@@ -210,7 +194,7 @@ typedef enum
////////////////////////////////////////////////
// needed for implicit.c
int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, float dt );
int cloth_bvh_objcollision (struct Object *ob, struct ClothModifierData * clmd, float step, float dt );
////////////////////////////////////////////////
@@ -220,10 +204,10 @@ int cloth_bvh_objcollision (Object *ob, ClothModifierData * clmd, float step, fl
////////////////////////////////////////////////
// needed for cloth.c
int implicit_init ( Object *ob, ClothModifierData *clmd );
int implicit_free ( ClothModifierData *clmd );
int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors );
void implicit_set_positions ( ClothModifierData *clmd );
int implicit_init ( struct Object *ob, struct ClothModifierData *clmd );
int implicit_free ( struct ClothModifierData *clmd );
int implicit_solver ( struct Object *ob, float frame, struct ClothModifierData *clmd, struct ListBase *effectors );
void implicit_set_positions ( struct ClothModifierData *clmd );
// globally needed
void clmdSetInterruptCallBack ( int ( *f ) ( void ) );
@@ -235,23 +219,23 @@ void clmdSetInterruptCallBack ( int ( *f ) ( void ) );
////////////////////////////////////////////////
// needed for modifier.c
void cloth_free_modifier_extern ( ClothModifierData *clmd );
void cloth_free_modifier ( Object *ob, ClothModifierData *clmd );
void cloth_init ( ClothModifierData *clmd );
DerivedMesh *clothModifier_do ( ClothModifierData *clmd, struct Scene *scene, Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc );
void cloth_free_modifier_extern ( struct ClothModifierData *clmd );
void cloth_free_modifier ( struct Object *ob, struct ClothModifierData *clmd );
void cloth_init ( struct ClothModifierData *clmd );
struct DerivedMesh *clothModifier_do ( struct ClothModifierData *clmd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, int useRenderParams, int isFinalCalc );
void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface );
int cloth_uses_vgroup(ClothModifierData *clmd);
void cloth_update_normals ( ClothVertex *verts, int nVerts, struct MFace *face, int totface );
int cloth_uses_vgroup(struct ClothModifierData *clmd);
// needed for collision.c
void bvhtree_update_from_cloth ( ClothModifierData *clmd, int moving );
void bvhselftree_update_from_cloth ( ClothModifierData *clmd, int moving );
void bvhtree_update_from_cloth ( struct ClothModifierData *clmd, int moving );
void bvhselftree_update_from_cloth ( struct ClothModifierData *clmd, int moving );
// needed for button_object.c
void cloth_clear_cache ( Object *ob, ClothModifierData *clmd, float framenr );
void cloth_clear_cache ( struct Object *ob, struct ClothModifierData *clmd, float framenr );
// needed for cloth.c
int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type);
int cloth_add_spring ( struct ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type);
////////////////////////////////////////////////
@@ -270,9 +254,9 @@ typedef struct
{
char *name;
CM_SOLVER_ID id;
int ( *init ) ( Object *ob, ClothModifierData *clmd );
int ( *solver ) ( Object *ob, float framenr, ClothModifierData *clmd, ListBase *effectors );
int ( *free ) ( ClothModifierData *clmd );
int ( *init ) ( struct Object *ob, struct ClothModifierData *clmd );
int ( *solver ) ( struct Object *ob, float framenr, struct ClothModifierData *clmd, struct ListBase *effectors );
int ( *free ) ( struct ClothModifierData *clmd );
}
CM_SOLVER_DEF;

View File

@@ -37,25 +37,21 @@
#include <string.h>
/* types */
#include "BLI_linklist.h"
#include "BKE_collision.h"
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
#include "DNA_cloth_types.h"
#include "DNA_customdata_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "BLI_kdopbvh.h"
struct Cloth;
struct ClothModifierData;
struct CollisionModifierData;
struct DerivedMesh;
struct Group;
struct MFace;
struct MVert;
struct Object;
struct Scene;
struct LinkNode;
////////////////////////////////////////
// used for collisions in collision.c
@@ -122,16 +118,16 @@ FaceCollPair;
// used in modifier.c from collision.c
/////////////////////////////////////////////////
BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon );
void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int numverts, int moving );
BVHTree *bvhtree_build_from_mvert ( struct MFace *mfaces, unsigned int numfaces, struct MVert *x, unsigned int numverts, float epsilon );
void bvhtree_update_from_mvert ( BVHTree * bvhtree, struct MFace *faces, int numfaces, struct MVert *x, struct MVert *xnew, int numverts, int moving );
/////////////////////////////////////////////////
LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr );
struct LinkNode *BLI_linklist_append_fast ( struct LinkNode **listp, void *ptr );
// move Collision modifier object inter-frame with step = [0,1]
// defined in collisions.c
void collision_move_object ( CollisionModifierData *collmd, float step, float prevstep );
void collision_move_object ( struct CollisionModifierData *collmd, float step, float prevstep );
// interface for collision functions
void collisions_compute_barycentric ( float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3 );

View File

@@ -31,7 +31,6 @@
#ifndef BKE_EFFECT_H
#define BKE_EFFECT_H
#include "DNA_object_types.h"
#include "DNA_modifier_types.h"
struct Object;

View File

@@ -70,9 +70,9 @@ void set_sca_new_poins_ob(struct Object *ob);
void set_sca_new_poins(void);
void sca_remove_ob_poin(struct Object *obt, struct Object *ob);
void sca_move_sensor(struct bSensor *sens_to_move, Object *ob, int move_up);
void sca_move_controller(struct bController *cont_to_move, Object *ob, int move_up);
void sca_move_actuator(struct bActuator *act_to_move, Object *ob, int move_up);
void sca_move_sensor(struct bSensor *sens_to_move, struct Object *ob, int move_up);
void sca_move_controller(struct bController *cont_to_move, struct Object *ob, int move_up);
void sca_move_actuator(struct bActuator *act_to_move, struct Object *ob, int move_up);
#endif

View File

@@ -27,6 +27,14 @@
#include "MEM_guardedalloc.h"
#include "DNA_cloth_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_cloth.h"
#include "BKE_effect.h"

View File

@@ -37,6 +37,11 @@
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_scene_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"

View File

@@ -29,16 +29,21 @@
#include "MEM_guardedalloc.h"
#include "BKE_cloth.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_meshdata_types.h"
#include "BLI_threads.h"
#include "BLI_math.h"
#include "BLI_linklist.h"
#include "BKE_cloth.h"
#include "BKE_collision.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_utildefines.h"
#include "BLI_threads.h"
#define CLOTH_OPENMP_LIMIT 25
#ifdef _WIN32

View File

@@ -41,6 +41,8 @@
#include "float.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_bmesh.h"
#include "BKE_cloth.h"
@@ -193,7 +195,7 @@ void modifier_copyData(ModifierData *md, ModifierData *target)
mti->copyData(md, target);
}
int modifier_couldBeCage(Scene *scene, ModifierData *md)
int modifier_couldBeCage(struct Scene *scene, ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -233,7 +235,7 @@ void modifier_setError(ModifierData *md, char *format, ...)
* also used in transform_conversion.c, to detect CrazySpace [tm] (2nd arg
* then is NULL)
*/
int modifiers_getCageIndex(Scene *scene, Object *ob, int *lastPossibleCageIndex_r, int virtual_)
int modifiers_getCageIndex(struct Scene *scene, Object *ob, int *lastPossibleCageIndex_r, int virtual_)
{
ModifierData *md = (virtual_)? modifiers_getVirtualModifierList(ob): ob->modifiers.first;
int i, cageIndex = -1;
@@ -283,7 +285,7 @@ int modifiers_isParticleEnabled(Object *ob)
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
}
int modifier_isEnabled(Scene *scene, ModifierData *md, int required_mode)
int modifier_isEnabled(struct Scene *scene, ModifierData *md, int required_mode)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -298,7 +300,7 @@ int modifier_isEnabled(Scene *scene, ModifierData *md, int required_mode)
return 1;
}
LinkNode *modifiers_calcDataMasks(Scene *scene, Object *ob, ModifierData *md, CustomDataMask dataMask, int required_mode)
LinkNode *modifiers_calcDataMasks(struct Scene *scene, Object *ob, ModifierData *md, CustomDataMask dataMask, int required_mode)
{
LinkNode *dataMasks = NULL;
LinkNode *curr, *prev;
@@ -487,7 +489,7 @@ int modifier_isCorrectableDeformed(ModifierData *md)
return 0;
}
int modifiers_isCorrectableDeformed(Scene *scene, Object *ob)
int modifiers_isCorrectableDeformed(struct Scene *scene, Object *ob)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);

View File

@@ -40,12 +40,16 @@
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_particle_types.h"
#include "DNA_smoke_types.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"
#include "BLI_kdtree.h"
#include "BLI_rand.h"
#include "BLI_threads.h"
#include "BLI_math.h"
#include "BKE_anim.h"
#include "BKE_animsys.h"

View File

@@ -43,6 +43,7 @@
#include "BLI_blenlib.h"
#include "BLI_threads.h"
#include "BLI_math.h"
#include "PIL_time.h"

View File

@@ -55,11 +55,12 @@ variables on the UI for now
#include "MEM_guardedalloc.h"
/* types */
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_lattice_types.h"
#include "DNA_curve_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_lattice_types.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_ghash.h"

View File

@@ -51,7 +51,7 @@ struct ViewContext;
/* for derivedmesh drawing callbacks, for view3d_select, .... */
typedef struct ViewContext {
Scene *scene;
struct Scene *scene;
struct Object *obact;
struct Object *obedit;
struct ARegion *ar;

View File

@@ -32,8 +32,11 @@
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_key_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
@@ -41,7 +44,7 @@
#include "BLI_dynstr.h"
#include "BLI_rand.h"
#include "BKE_cloth.h"
#include "BKE_DerivedMesh.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"

View File

@@ -43,6 +43,9 @@
#include "DNA_material_types.h"
#include "DNA_meta_types.h"
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_vfont_types.h"
#include "BLI_blenlib.h"
@@ -54,7 +57,6 @@
#include "BKE_anim.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_cloth.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"

View File

@@ -48,14 +48,17 @@
#include "DNA_armature_types.h"
#include "DNA_mesh_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_brush_types.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "BKE_DerivedMesh.h"
#include "BKE_action.h"
#include "BKE_brush.h"
#include "BKE_cloth.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_deform.h"

View File

@@ -42,6 +42,7 @@
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
#include "DNA_object_types.h"
#include "BKE_DerivedMesh.h"
#include "BKE_effect.h"

View File

@@ -31,6 +31,7 @@
#include <stdlib.h>
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "RNA_access.h"

View File

@@ -102,9 +102,9 @@ void draw_motion_paths_cleanup(Scene *scene, View3D *v3d, struct ARegion *ar);
/* drawobject.c */
void draw_object(Scene *scene, struct ARegion *ar, View3D *v3d, Base *base, int flag);
int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt);
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int dt, int outline);
void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob);
int draw_glsl_material(Scene *scene, struct Object *ob, View3D *v3d, int dt);
void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob, int dt, int outline);
void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob);
void drawaxes(float size, int flag, char drawtype);
void view3d_cached_text_draw_begin(void);
@@ -117,7 +117,7 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa
int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag);
/* drawmesh.c */
void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, struct DerivedMesh *dm, int faceselect);
void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, struct Object *ob, struct DerivedMesh *dm, int faceselect);
/* view3d_draw.c */
void view3d_main_area_draw(const struct bContext *C, struct ARegion *ar);
@@ -154,7 +154,7 @@ int boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb);
void centerview(struct ARegion *ar, View3D *v3d);
void smooth_view(struct bContext *C, Object *, Object *, float *ofs, float *quat, float *dist, float *lens);
void smooth_view(struct bContext *C, struct Object *, struct Object *, float *ofs, float *quat, float *dist, float *lens);
void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */
void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d);
@@ -174,7 +174,7 @@ void view3d_toolshelf_register(struct ARegionType *art);
void view3d_tool_props_register(struct ARegionType *art);
/* view3d_snap.c */
int minmax_verts(Object *obedit, float *min, float *max);
int minmax_verts(struct Object *obedit, float *min, float *max);
void VIEW3D_OT_snap_selected_to_grid(struct wmOperatorType *ot);
void VIEW3D_OT_snap_selected_to_cursor(struct wmOperatorType *ot);

View File

@@ -47,10 +47,11 @@
#include "DNA_sequence_types.h"
#include "DNA_view3d_types.h"
#include "DNA_constraint_types.h"
#include "DNA_scene_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_cloth.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_constraint.h"

View File

@@ -39,7 +39,11 @@
#include "DNA_lattice_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_view3d_types.h"
#include "DNA_modifier_types.h"
#include "RNA_access.h"
@@ -55,7 +59,6 @@
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_cloth.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_displist.h"

View File

@@ -32,6 +32,7 @@
#include "rna_internal.h"
#include "DNA_modifier_types.h"
#include "DNA_cloth_types.h"
#include "DNA_particle_types.h"
#include "DNA_object_force.h"
#include "DNA_object_types.h"

View File

@@ -30,6 +30,10 @@
*
*/
#include "DNA_cloth_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "BKE_cloth.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_global.h"

View File

@@ -31,6 +31,8 @@
*/
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_math.h"