[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

Dalai Felinto dfelinto at gmail.com
Tue Feb 15 04:43:29 CET 2011


Jumping into the discussion:

>>"I prefer we stick to BLI_math.h defined functions."
But if the idea is to provide "standalone files which can be
redistributed into any other application ..." isn't better to keep
them Blender independent?

2011/2/14 Campbell Barton <ideasman42 at gmail.com>:
> 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
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list