style cleanup: block comments

This commit is contained in:
Campbell Barton 2012-05-16 23:37:23 +00:00
parent 18a7efac14
commit 9dd981a440
31 changed files with 107 additions and 106 deletions

@ -38,11 +38,11 @@
struct CCGSubSurf;
/* Each CCGElem is CCGSubSurf's representation of a subdivided
vertex. All CCGElems in a particular CCGSubSurf have the same
layout, but the layout can vary from one CCGSubSurf to another. For
this reason, CCGElem is presented as an opaque pointer, and
elements should always be accompanied by a CCGKey, which provides
the necessary offsets to access components of a CCGElem.
* vertex. All CCGElems in a particular CCGSubSurf have the same
* layout, but the layout can vary from one CCGSubSurf to another. For
* this reason, CCGElem is presented as an opaque pointer, and
* elements should always be accompanied by a CCGKey, which provides
* the necessary offsets to access components of a CCGElem.
*/
typedef struct CCGElem CCGElem;
@ -50,7 +50,7 @@ typedef struct CCGKey {
int level;
/* number of bytes in each element (one float per layer, plus
three floats for normals if enabled) */
* three floats for normals if enabled) */
int elem_size;
/* number of elements along each side of grid */
@ -61,11 +61,11 @@ typedef struct CCGKey {
int grid_bytes;
/* currently always the last three floats, unless normals are
disabled */
* disabled */
int normal_offset;
/* offset in bytes of mask value; only valid if 'has_mask' is
true */
* true */
int mask_offset;
int num_layers;

@ -261,8 +261,8 @@ void CustomData_bmesh_set(const struct CustomData *data, void *block, int type,
void CustomData_bmesh_set_n(struct CustomData *data, void *block, int type, int n,
void *source);
/*sets the data of the block at physical layer n. no real type checking
*is performed.
/* sets the data of the block at physical layer n. no real type checking
* is performed.
*/
void CustomData_bmesh_set_layer_n(struct CustomData *data, void *block, int n,
void *source);

@ -3127,7 +3127,7 @@ void CCG_key(CCGKey *key, const CCGSubSurf *ss, int level)
key->num_layers = ss->meshIFC.numLayers;
/* if normals are present, always the last three floats of an
element */
* element */
if (key->has_normals)
key->normal_offset = key->elem_size - sizeof(float) * 3;
else

@ -92,7 +92,7 @@ static CM_SOLVER_DEF solvers [] =
/* ********** cloth engine ******* */
/* Prototypes for internal functions.
*/
*/
static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertexCos)[3]);
static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm );
static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr, int first);
@ -101,10 +101,10 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm );
/******************************************************************************
*
* External interface called by modifier.c clothModifier functions.
*
******************************************************************************/
*
* External interface called by modifier.c clothModifier functions.
*
******************************************************************************/
/**
* cloth_init - creates a new cloth simulation.
*
@ -145,8 +145,8 @@ void cloth_init(ClothModifierData *clmd )
clmd->coll_parms->selfepsilon = 0.75;
/* These defaults are copied from softbody.c's
* softbody_calc_forces() function.
*/
* softbody_calc_forces() function.
*/
clmd->sim_parms->eff_force_scale = 1000.0;
clmd->sim_parms->eff_wind_scale = 250.0;
@ -476,7 +476,7 @@ static DerivedMesh *cloth_to_triangles(DerivedMesh *dm)
/************************************************
* clothModifier_do - main simulation function
************************************************/
************************************************/
void clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, DerivedMesh *dm, float (*vertexCos)[3])
{
PointCache *cache;
@ -729,10 +729,10 @@ void cloth_free_modifier_extern(ClothModifierData *clmd )
}
/******************************************************************************
*
* Internal functions.
*
******************************************************************************/
*
* Internal functions.
*
******************************************************************************/
/**
* cloth_to_object - copies the deformed vertices to the object.
@ -978,16 +978,16 @@ static void cloth_from_mesh ( ClothModifierData *clmd, DerivedMesh *dm )
memcpy ( &clmd->clothObject->mfaces[i], &mface[i], sizeof ( MFace ) );
/* Free the springs since they can't be correct if the vertices
* changed.
*/
* changed.
*/
if ( clmd->clothObject->springs != NULL )
MEM_freeN ( clmd->clothObject->springs );
}
/***************************************************************************************
* SPRING NETWORK BUILDING IMPLEMENTATION BEGIN
***************************************************************************************/
* SPRING NETWORK BUILDING IMPLEMENTATION BEGIN
***************************************************************************************/
// be careful: implicit solver has to be resettet when using this one!
// --> only for implicit handling of this spring!
@ -1276,6 +1276,6 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm )
} /* cloth_build_springs */
/***************************************************************************************
* SPRING NETWORK BUILDING IMPLEMENTATION END
***************************************************************************************/
* SPRING NETWORK BUILDING IMPLEMENTATION END
***************************************************************************************/

@ -2047,7 +2047,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
normalize_v3(vec_2);
/* align the vector, can avoid this and it looks 98% OK but
* better to align the angle quat roll's before comparing */
* better to align the angle quat roll's before comparing */
{
cross_v3_v3v3(cross_tmp, bevp_last->dir, bevp_first->dir);
angle = angle_normalized_v3v3(bevp_first->dir, bevp_last->dir);

@ -275,8 +275,8 @@ void defvert_flip_merged(MDeformVert *dvert, const int *flip_map, const int flip
dw = &dvert->dw[i]; /* in case array got realloced */
/* distribute weights: if only one of the vertex groups was
* assigned this will halve the weights, otherwise it gets
* evened out. this keeps it proportional to other groups */
* assigned this will halve the weights, otherwise it gets
* evened out. this keeps it proportional to other groups */
weight = 0.5f * (dw_cpy->weight + dw->weight);
dw_cpy->weight = weight;
dw->weight = weight;

@ -1253,7 +1253,7 @@ DagNodeQueue *graph_dfs(void)
int maxpos = 0;
/* int is_cycle = 0; */ /* UNUSED */
/*
*fprintf(stderr, "starting DFS\n ------------\n");
*fprintf(stderr, "starting DFS\n ------------\n");
*/
nqueue = queue_create(DAGQUEUEALLOC);
retqueue = queue_create(MainDag->numNodes);

@ -140,7 +140,7 @@ typedef struct VolumeGrid {
int *s_pos; /* (x*y*z) t_index begin id */
int *s_num; /* (x*y*z) number of t_index points */
int *t_index; /* actual surface point index,
access: (s_pos+s_num) */
* access: (s_pos+s_num) */
} VolumeGrid;
typedef struct Vec3f {
@ -192,7 +192,7 @@ typedef struct PaintUVPoint {
unsigned int v1, v2, v3; /* vertex indexes */
unsigned int neighbour_pixel; /* If this pixel isn't uv mapped to any face,
but it's neighboring pixel is */
* but it's neighboring pixel is */
short quad;
} PaintUVPoint;
@ -205,9 +205,9 @@ typedef struct ImgSeqFormatData {
#define ADJ_ON_MESH_EDGE (1 << 0)
typedef struct PaintAdjData {
int *n_target; /* array of neighboring point indexes,
for single sample use (n_index+neigh_num) */
int *n_index; /* index to start reading n_target for each point */
int *n_target; /* array of neighboring point indexes,
* for single sample use (n_index + neigh_num) */
int *n_index; /* index to start reading n_target for each point */
int *n_num; /* num of neighs for each point */
int *flags; /* vertex adjacency flags */
int total_targets; /* size of n_target */
@ -2540,8 +2540,8 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
#if 0
/* -----------------------------------------------------------------
* For debug, output pixel statuses to the color map
* -----------------------------------------------------------------*/
* For debug, output pixel statuses to the color map
* -----------------------------------------------------------------*/
#pragma omp parallel for schedule(static)
for (index = 0; index < sData->total_points; index++)
{
@ -3293,7 +3293,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
int f_index = hit.index;
/* Also cast a ray in opposite direction to make sure
* point is at least surrounded by two brush faces */
* point is at least surrounded by two brush faces */
negate_v3(ray_dir);
hit.index = -1;
hit.dist = 9999;

@ -600,7 +600,7 @@ static void multires_copy_dm_grid(CCGElem *gridA, CCGElem *gridB, CCGKey *keyA,
}
/* Reallocate gpm->data at a lower resolution and copy values over
from the original high-resolution data */
* from the original high-resolution data */
static void multires_grid_paint_mask_downsample(GridPaintMask *gpm, int level)
{
if (level < gpm->level) {
@ -1092,7 +1092,7 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
break;
case CALC_DISPLACEMENTS:
/* Calculate displacement between new and old
* grid points and convert to tangent space */
* grid points and convert to tangent space */
sub_v3_v3v3(disp, co, sco);
invert_m3(mat);
mul_v3_m3v3(data, mat, disp);
@ -1481,7 +1481,7 @@ DerivedMesh *multires_make_derived_from_derived(DerivedMesh *dm,
}
/**** Old Multires code ****
***************************/
***************************/
/* Adapted from sculptmode.c */
void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u, float v)

@ -3233,9 +3233,9 @@ static void springs_from_mesh(Object *ob)
sb= ob->soft;
if (me && sb) {
/* using bp->origS as a container for spring calcualtions here
** will be overwritten sbObjectStep() to receive
** actual modifier stack positions
*/
* will be overwritten sbObjectStep() to receive
* actual modifier stack positions
*/
if (me->totvert) {
bp= ob->soft->bpoint;
for (a=0; a<me->totvert; a++, bp++) {
@ -3283,10 +3283,10 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
for (a=0; a<me->totvert; a++, bp++) {
/* get scalar values needed *per vertex* from vertex group functions,
so we can *paint* them nicly ..
they are normalized [0.0..1.0] so may be we need amplitude for scale
which can be done by caller but still .. i'd like it to go this way
*/
* so we can *paint* them nicly ..
* they are normalized [0.0..1.0] so may be we need amplitude for scale
* which can be done by caller but still .. i'd like it to go this way
*/
if ((ob->softflag & OB_SB_GOAL) && sb->vertgroup) { /* even this is a deprecated evil hack */
/* I'd like to have it .. if (sb->namedVG_Goal[0]) */
@ -3306,8 +3306,8 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
}
/* to proove the concept
this enables per vertex *mass painting*
*/
* this enables per vertex *mass painting*
*/
if (sb->namedVG_Mass[0]) {
int grp= defgroup_name_index (ob, sb->namedVG_Mass);
@ -3411,9 +3411,9 @@ static void reference_to_scratch(Object *ob)
}
/*
helper function to get proper spring length
when object is rescaled
*/
* helper function to get proper spring length
* when object is rescaled
*/
static float globallen(float *v1, float *v2, Object *ob)
{
float p1[3], p2[3];
@ -3793,7 +3793,7 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo
/* vertexCos came from local world, go global */
mul_m4_v3(ob->obmat, bp->origE);
/* just to be save give bp->origT a defined value
will be calulated in interpolate_exciter()*/
* will be calulated in interpolate_exciter()*/
copy_v3_v3(bp->origT, bp->origE);
}
}

@ -1045,7 +1045,7 @@ void subsurf_copy_grid_hidden(DerivedMesh *dm, const MPoly *mpoly,
}
/* Translate GridPaintMask into vertex paint masks. Assumes vertices
are in the order output by ccgDM_copyFinalVertArray. */
* are in the order output by ccgDM_copyFinalVertArray. */
void subsurf_copy_grid_paint_mask(DerivedMesh *dm, const MPoly *mpoly,
float *paint_mask,
const GridPaintMask *grid_paint_mask)

@ -7425,8 +7425,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
Brush *brush;
/* For weight paint, each brush now gets its own weight;
unified paint settings also have weight. Update unified
paint settings and brushes with a default weight value. */
* unified paint settings also have weight. Update unified
* paint settings and brushes with a default weight value. */
for (scene = main->scene.first; scene; scene = scene->id.next) {
ToolSettings *ts = scene->toolsettings;

@ -1159,7 +1159,7 @@ static BMOpDefine bmo_vertex_slide_def = {
* 'unused_geom' slot will contain all interior geometry that is
* completely unused. Lastly, 'holes_geom' contains edges and faces
* that were in the input and are part of the hull.
*/
*/
static BMOpDefine bmo_convex_hull_def = {
"convex_hull",
{{BMO_OP_SLOT_ELEMENT_BUF, "input"},

@ -509,7 +509,7 @@ static void hull_remove_overlapping(BMesh *bm, GHash *hull_triangles,
BMEdge *e;
/* Check that all the face's edges are on the hull,
otherwise can't reuse it */
* otherwise can't reuse it */
f_on_hull = TRUE;
BM_ITER_ELEM (e, &bm_iter2, f, BM_EDGES_OF_FACE) {
if (!hull_final_edges_lookup(final_edges, e->v1, e->v2)) {
@ -519,9 +519,10 @@ static void hull_remove_overlapping(BMesh *bm, GHash *hull_triangles,
}
/* Note: can't change ghash while iterating, so mark
with 'skip' flag rather than deleting triangles */
* with 'skip' flag rather than deleting triangles */
if (BM_vert_in_face(f, t->v[1]) &&
BM_vert_in_face(f, t->v[2]) && f_on_hull) {
BM_vert_in_face(f, t->v[2]) && f_on_hull)
{
t->skip = TRUE;
BMO_elem_flag_disable(bm, f, HULL_FLAG_INTERIOR_ELE);
BMO_elem_flag_enable(bm, f, HULL_FLAG_HOLE);
@ -544,7 +545,7 @@ static void hull_mark_interior_elements(BMesh *bm, BMOperator *op,
}
/* Mark all input faces as interior, some may be unmarked in
hull_remove_overlapping() */
* hull_remove_overlapping() */
BMO_ITER (f, &oiter, bm, op, "input", BM_FACE) {
BMO_elem_flag_enable(bm, f, HULL_FLAG_INTERIOR_ELE);
}
@ -559,9 +560,9 @@ static void hull_tag_unused(BMesh *bm, BMOperator *op)
BMFace *f;
/* Mark vertices, edges, and faces that are already marked
interior (i.e. were already part of the input, but not part of
the hull), but that aren't also used by elements outside the
input set */
* interior (i.e. were already part of the input, but not part of
* the hull), but that aren't also used by elements outside the
* input set */
BMO_ITER (v, &oiter, bm, op, "input", BM_VERT) {
if (BMO_elem_flag_test(bm, v, HULL_FLAG_INTERIOR_ELE)) {
int del = TRUE;

@ -79,8 +79,8 @@
/************************ Exported **************************/
/* simple API for object selection, rather than just using the flag
* this takes into account the 'restrict selection in 3d view' flag.
* deselect works always, the restriction just prevents selection */
* this takes into account the 'restrict selection in 3d view' flag.
* deselect works always, the restriction just prevents selection */
/* Note: send a NC_SCENE|ND_OB_SELECT notifier yourself! (or
* or a NC_SCENE|ND_OB_VISIBLE in case of visibility toggling */

@ -361,7 +361,7 @@ void OBJECT_OT_origin_clear(wmOperatorType *ot)
/*************************** Apply Transformation ****************************/
/* use this when the loc/size/rot of the parent has changed but the children
* should stay in the same place, e.g. for apply-size-rot or object center */
* should stay in the same place, e.g. for apply-size-rot or object center */
static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob)
{
Object workob;

@ -2301,7 +2301,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
}
else {
/* we are back in the area previously selected for keeping
* we swap the areas if possible to allow user to choose */
* we swap the areas if possible to allow user to choose */
if (jd->sa2 != NULL) {
if (jd->sa1) jd->sa1->flag &= ~AREA_FLAG_DRAWJOINFROM;
if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO;

@ -238,7 +238,7 @@ static Brush *brush_tool_toggle(Main *bmain, Brush *brush_orig, const int tool,
if (!brush_orig || brush_tool(brush_orig, tool_offset) != tool) {
Brush *br;
/* if the current brush is not using the desired tool, look
for one that is */
* for one that is */
br = brush_tool_cycle(bmain, brush_orig, tool, tool_offset, ob_mode);
/* store the previously-selected brush */
if (br)
@ -250,8 +250,8 @@ static Brush *brush_tool_toggle(Main *bmain, Brush *brush_orig, const int tool,
BLI_findindex(bmain->brush.first, brush_orig->toggle_brush) != -1)
{
/* if current brush is using the desired tool, try to toggle
back to the previously selected brush (if it was set, and
if it still exists) */
* back to the previously selected brush (if it was set, and
* if it still exists) */
return brush_orig->toggle_brush;
}
else

@ -249,13 +249,13 @@ typedef struct StrokeCache {
float view_normal[3];
/* sculpt_normal gets calculated by calc_sculpt_normal(), then the
sculpt_normal_symm gets updated quickly with the usual symmetry
transforms */
* sculpt_normal_symm gets updated quickly with the usual symmetry
* transforms */
float sculpt_normal[3];
float sculpt_normal_symm[3];
/* Used for wrap texture mode, local_mat gets calculated by
calc_brush_local_mat() and used in tex_strength(). */
* calc_brush_local_mat() and used in tex_strength(). */
float brush_local_mat[4][4];
float last_center[3];
@ -792,7 +792,7 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
}
else if (mtex->brush_map_mode == MTEX_MAP_MODE_AREA) {
/* Similar to fixed mode, but projects from brush angle
rather than view direction */
* rather than view direction */
/* Rotation is handled by the brush_local_mat */
rotation = 0;
@ -916,7 +916,7 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod
int n, original;
/* Grab brush requires to test on original data (see r33888 and
bug #25371) */
* bug #25371) */
original = (paint_brush(&sd->paint)->sculpt_tool == SCULPT_TOOL_GRAB ?
TRUE : ss->cache->original);
@ -1095,7 +1095,7 @@ static void calc_brush_local_mat(const Brush *brush, Object *ob,
mult_m4_m4m4(tmat, mat, scale);
/* Return inverse (for converting from modelspace coords to local
area coords) */
* area coords) */
invert_m4_m4(local_mat, tmat);
}
@ -1112,7 +1112,7 @@ static void update_brush_local_mat(Sculpt *sd, Object *ob)
}
/* Test whether the StrokeCache.sculpt_normal needs update in
do_brush_action() */
* do_brush_action() */
static int brush_needs_sculpt_normal(const Brush *brush)
{
return ((ELEM(brush->sculpt_tool,
@ -1176,8 +1176,8 @@ static void neighbor_average(SculptSession *ss, float avg[3], unsigned vert)
}
/* Similar to neighbor_average(), but returns an averaged mask value
instead of coordinate. Also does not restrict based on border or
corner vertices. */
* instead of coordinate. Also does not restrict based on border or
* corner vertices. */
static float neighbor_average_mask(SculptSession *ss, unsigned vert)
{
const float *vmask = ss->vmask;
@ -4034,7 +4034,7 @@ void ED_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
paint_mask = CustomData_get_layer(&me->vdata, CD_PAINT_MASK);
/* if multires is active, create a grid paint mask layer if there
isn't one already */
* isn't one already */
if (mmd && !CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK)) {
GridPaintMask *gmask;
int level = MAX2(1, mmd->sculptlvl);

@ -1269,8 +1269,8 @@ typedef struct {
short no[3];
/* inserting this to align the 'color' field to a four-byte
boundary; drastically increases viewport performance on my
drivers (Gallium/Radeon) --nicholasbishop */
* boundary; drastically increases viewport performance on my
* drivers (Gallium/Radeon) --nicholasbishop */
char pad[2];
unsigned char color[3];

@ -894,7 +894,7 @@ void GPU_framebuffer_blur(GPUFrameBuffer *fb, GPUTexture *tex, GPUFrameBuffer *b
/* Blurring horizontally */
/* We do the bind ourselves rather than using GPU_framebuffer_texture_bind() to avoid
pushing unnecessary matrices onto the OpenGL stack. */
* pushing unnecessary matrices onto the OpenGL stack. */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, blurfb->object);
GPU_shader_bind(blur_shader);

@ -64,8 +64,8 @@
/***********************
* Local declarations. *
***********************/
* Local declarations. *
***********************/
/* Reading and writing of an in-memory TIFF file. */
static tsize_t imb_tiff_ReadProc(thandle_t handle, tdata_t data, tsize_t n);
static tsize_t imb_tiff_WriteProc(thandle_t handle, tdata_t data, tsize_t n);
@ -87,8 +87,8 @@ typedef struct ImbTIFFMemFile {
/*****************************
* Function implementations. *
*****************************/
* Function implementations. *
*****************************/
static void imb_tiff_DummyUnmapProc(thandle_t fd, tdata_t base, toff_t size)

@ -189,9 +189,9 @@ typedef struct MDisps {
float (*disps)[3];
/* Used for hiding parts of a multires mesh. Essentially the multires
equivalent of MVert.flag's ME_HIDE bit.
This is a bitmap, keep in sync with type used in BLI_bitmap.h */
* equivalent of MVert.flag's ME_HIDE bit.
*
* This is a bitmap, keep in sync with type used in BLI_bitmap.h */
unsigned int *hidden;
} MDisps;

@ -884,7 +884,7 @@ typedef struct ToolSettings {
UvSculpt *uvsculpt; /* uv smooth */
/* Vertex group weight - used only for editmode, not weight
paint */
* paint */
float vgroup_weight;
/* Subdivide Settings */

@ -701,7 +701,7 @@ static int arraysize(char *astr, int len)
else if (str[a] == ']' && cp) {
str[a] = 0;
/* if 'cp' is a preprocessor definition, it will evaluate to 0,
* the caller needs to check for this case and throw an error */
* the caller needs to check for this case and throw an error */
mul *= atoi(cp);
}
}

@ -130,7 +130,7 @@ static void rna_Armature_update_layers(Main *bmain, Scene *UNUSED(scene), Pointe
Object *ob;
/* proxy lib exception, store it here so we can restore layers on file
load, since it would otherwise get lost due to being linked data */
* load, since it would otherwise get lost due to being linked data */
for (ob = bmain->object.first; ob; ob = ob->id.next)
if (ob->data == arm && ob->pose)
ob->pose->proxy_layer = arm->layer;

@ -376,7 +376,7 @@ static EnumPropertyItem *rna_userdef_compute_device_itemf(bContext *UNUSED(C), P
}
else {
/* get device list from cycles. it would be good to make this generic
once we have more subsystems using opencl, for now this is easiest */
* once we have more subsystems using opencl, for now this is easiest */
int opencl = (U.compute_device_type == USER_COMPUTE_DEVICE_OPENCL);
CCLDeviceInfo *devices = CCL_compute_device_list(opencl);
int a;

@ -92,7 +92,7 @@ static bNodeSocketTemplate cmp_node_bilateralblur_out[]= {
/* code of this node was heavily inspired by the smooth function of opencv library.
The main change is an optional image input */
* The main change is an optional image input */
static void node_composit_exec_bilateralblur(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
NodeBilateralBlurData *nbbd= node->storage;

@ -57,10 +57,10 @@ static void do_brightnesscontrast(bNode *UNUSED(node), float *out, float *in, fl
float delta = contrast / 200.0f;
a = 1.0f - delta * 2.0f;
/*
* The algorithm is by Werner D. Streidt
* (http://visca.com/ffactory/archives/5-99/msg00021.html)
* Extracted of OpenCV demhist.c
*/
* The algorithm is by Werner D. Streidt
* (http://visca.com/ffactory/archives/5-99/msg00021.html)
* Extracted of OpenCV demhist.c
*/
if (contrast > 0) {
a = 1.0f / a;
b = a * (brightness - delta);

@ -114,7 +114,7 @@ void rtbuild_add(RTBuilder *b, RayObject *o)
if (!finite(bb[3]) || !finite(bb[4]) || !finite(bb[5]))
return;
/* skip objects with zero bounding box, they are of no use, and
* will give problems in rtbuild_heuristic_object_split later */
* will give problems in rtbuild_heuristic_object_split later */
if (bb[0] == bb[3] && bb[1] == bb[4] && bb[2] == bb[5])
return;

@ -507,7 +507,7 @@ int SCA_PythonController::pyattr_set_script(void *self_v, const KX_PYATTRIBUTE_D
}
/* set scripttext sets m_bModified to true,
so next time the script is needed, a reparse into byte code is done */
* so next time the script is needed, a reparse into byte code is done */
self->SetScriptText(scriptArg);
return PY_SET_ATTR_SUCCESS;