[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34852] trunk/blender/source/blender: This commit will switch blender to use tangent space generated within

Campbell Barton ideasman42 at gmail.com
Tue Feb 15 04:17:57 CET 2011


Noticed mikktspace.c defines its own math functions:

typedef struct
{
	float x, y, z;
} SVec3;

tbool			veq( const SVec3 v1, const SVec3 v2 )
onst SVec3		vadd( const SVec3 v1, const SVec3 v2 )
const SVec3		vsub( const SVec3 v1, const SVec3 v2 )
const SVec3		vscale(const float fS, const SVec3 v)
float			LengthSquared( const SVec3 v )
float			Length( const SVec3 v )
const SVec3		Normalize( const SVec3 v )
const float		vdot( const SVec3 v1, const SVec3 v2)
tbool NotZero(const float fX)
tbool VNotZero(const SVec3 v)

With external libs like fluid-sim or bullet, defining own types is
un-avoidable but for blenlib or blenkernel functions I prefer we stick
to BLI_math.h defined functions.

On Mon, Feb 14, 2011 at 6:18 PM, M.G. Kishalmi <lmg at kishalmi.net> wrote:
> Revision: 34852
>          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34852
> Author:   lmg
> Date:     2011-02-14 18:18:46 +0000 (Mon, 14 Feb 2011)
> Log Message:
> -----------
> This commit will switch blender to use tangent space generated within
> the two files mikktspace.h and mikktspace.c. These are standalone files
> which can be redistributed into any other application and regenerate the
> same tangent spaces. The implementation is independent of the ordering
> of faces and the vertex ordering of faces.
>
> Modified Paths:
> --------------
>    trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h
>    trunk/blender/source/blender/blenkernel/CMakeLists.txt
>    trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
>    trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c
>    trunk/blender/source/blender/blenkernel/intern/customdata.c
>    trunk/blender/source/blender/blenkernel/intern/subsurf_ccg.c
>    trunk/blender/source/blender/gpu/intern/gpu_codegen.c
>    trunk/blender/source/blender/gpu/intern/gpu_material.c
>    trunk/blender/source/blender/gpu/intern/gpu_shader_material.glsl
>    trunk/blender/source/blender/gpu/intern/gpu_shader_material.glsl.c
>    trunk/blender/source/blender/gpu/intern/gpu_shader_vertex.glsl
>    trunk/blender/source/blender/gpu/intern/gpu_shader_vertex.glsl.c
>    trunk/blender/source/blender/render/extern/include/RE_shader_ext.h
>    trunk/blender/source/blender/render/intern/source/convertblender.c
>    trunk/blender/source/blender/render/intern/source/render_texture.c
>    trunk/blender/source/blender/render/intern/source/rendercore.c
>    trunk/blender/source/blender/render/intern/source/renderdatabase.c
>    trunk/blender/source/blender/render/intern/source/shadeinput.c
>
> Added Paths:
> -----------
>    trunk/blender/source/blender/blenkernel/intern/mikktspace.c
>    trunk/blender/source/blender/blenkernel/mikktspace.h


More information about the Bf-committers mailing list