[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11062] branches/particles: Added files were left uncommitted in merge from trunk.
Janne Karhu
janne.karhu at utu.fi
Tue Jun 26 13:25:28 CEST 2007
Revision: 11062
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11062
Author: jhk
Date: 2007-06-26 13:25:27 +0200 (Tue, 26 Jun 2007)
Log Message:
-----------
Added files were left uncommitted in merge from trunk.
*bugs fixed:
-particle size didn't work above 1.0
*new things:
-a temp icon for physics tab
Modified Paths:
--------------
branches/particles/release/datafiles/blenderbuttons
branches/particles/source/blender/blenkernel/intern/particle.c
branches/particles/source/blender/include/BIF_resources.h
branches/particles/source/blender/src/blenderbuttons.c
branches/particles/source/blender/src/header_buttonswin.c
branches/particles/source/blender/src/header_ipo.c
branches/particles/source/blender/src/header_view3d.c
branches/particles/source/blender/src/outliner.c
Added Paths:
-----------
branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h
branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
branches/particles/source/blender/src/sculptmode-stroke.c
Added: branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h
===================================================================
--- branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h (rev 0)
+++ branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h 2007-06-26 11:25:27 UTC (rev 11062)
@@ -0,0 +1,71 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOLVER_BODY_H
+#define BT_SOLVER_BODY_H
+
+class btRigidBody;
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMatrix3x3.h"
+
+
+
+
+ATTRIBUTE_ALIGNED16 (struct) btSolverBody
+{
+ btVector3 m_centerOfMassPosition;
+ btVector3 m_linearVelocity;
+ btVector3 m_angularVelocity;
+ btRigidBody* m_originalBody;
+ float m_invMass;
+ float m_friction;
+ float m_angularFactor;
+
+ inline void getVelocityInLocalPoint(const btVector3& rel_pos, btVector3& velocity ) const
+ {
+ velocity = m_linearVelocity + m_angularVelocity.cross(rel_pos);
+ }
+
+ //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position
+ inline void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude)
+ {
+ m_linearVelocity += linearComponent*impulseMagnitude;
+ m_angularVelocity += angularComponent*impulseMagnitude*m_angularFactor;
+ }
+
+ void writebackVelocity()
+ {
+ if (m_invMass)
+ {
+ m_originalBody->setLinearVelocity(m_linearVelocity);
+ m_originalBody->setAngularVelocity(m_angularVelocity);
+ }
+ }
+
+ void readVelocity()
+ {
+ if (m_invMass)
+ {
+ m_linearVelocity = m_originalBody->getLinearVelocity();
+ m_angularVelocity = m_originalBody->getAngularVelocity();
+ }
+ }
+
+
+
+
+};
+
+#endif //BT_SOLVER_BODY_H
Added: branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
===================================================================
--- branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h (rev 0)
+++ branches/particles/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h 2007-06-26 11:25:27 UTC (rev 11062)
@@ -0,0 +1,63 @@
+
+
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOLVER_CONSTRAINT_H
+#define BT_SOLVER_CONSTRAINT_H
+
+class btRigidBody;
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMatrix3x3.h"
+
+//#define NO_FRICTION_TANGENTIALS 1
+
+///1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints.
+ATTRIBUTE_ALIGNED16 (struct) btSolverConstraint
+{
+ btVector3 m_relpos1CrossNormal;
+ btVector3 m_relpos2CrossNormal;
+ btVector3 m_contactNormal;
+ btVector3 m_angularComponentA;
+ btVector3 m_angularComponentB;
+
+ btScalar m_appliedVelocityImpulse;
+ int m_solverBodyIdA;
+ int m_solverBodyIdB;
+ btScalar m_friction;
+ btScalar m_restitution;
+ btScalar m_jacDiagABInv;
+ btScalar m_penetration;
+ btScalar m_appliedImpulse;
+
+ int m_constraintType;
+ int m_frictionIndex;
+ int m_unusedPadding[2];
+
+ enum btSolverConstraintType
+ {
+ BT_SOLVER_CONTACT_1D = 0,
+ BT_SOLVER_FRICTION_1D
+ };
+};
+
+
+
+
+
+
+#endif //BT_SOLVER_CONSTRAINT_H
+
+
Modified: branches/particles/release/datafiles/blenderbuttons
===================================================================
(Binary files differ)
Modified: branches/particles/source/blender/blenkernel/intern/particle.c
===================================================================
--- branches/particles/source/blender/blenkernel/intern/particle.c 2007-06-26 10:08:58 UTC (rev 11061)
+++ branches/particles/source/blender/blenkernel/intern/particle.c 2007-06-26 11:25:27 UTC (rev 11062)
@@ -2559,14 +2559,8 @@
float get_particle_size(Material *ma, ParticleSystemModifierData *psmd, IpoCurve *icu_size, ParticleSystem *psys, ParticleSettings *part, ParticleData *pa, float *vg_size)
{
ParticleTexture ptex;
- float size=part->size;
+ float size=1.0f;
- if(part->randsize!=0.0)
- size*= 1.0f - part->randsize*pa->sizemul;
-
- if(vg_size)
- size*=interpolate_particle_value_from_verts(psmd->dm,part->from,pa->num,pa->fuv,vg_size);
-
if(ma && part->from!=PART_FROM_PARTICLE){
ptex.size=size;
get_particle_texture(ma,psmd,psys,pa,&ptex,MAP_PA_SIZE);
@@ -2577,8 +2571,14 @@
calc_icu(icu_size,pa->time);
size*=icu_size->curval;
}
-
- return size;
+
+ if(vg_size)
+ size*=interpolate_particle_value_from_verts(psmd->dm,part->from,pa->num,pa->fuv,vg_size);
+
+ if(part->randsize!=0.0)
+ size*= 1.0f - part->randsize*pa->sizemul;
+
+ return size*part->size;
}
float get_child_particle_time(ParticleSystem *psys, int child_nbr, float cfra)
{
Modified: branches/particles/source/blender/include/BIF_resources.h
===================================================================
--- branches/particles/source/blender/include/BIF_resources.h 2007-06-26 10:08:58 UTC (rev 11061)
+++ branches/particles/source/blender/include/BIF_resources.h 2007-06-26 11:25:27 UTC (rev 11062)
@@ -66,7 +66,7 @@
ICON_ORTHO,
ICON_PERSP,
ICON_CAMERA,
- ICON_EFFECTS,
+ ICON_PARTICLES,
ICON_BBOX,
ICON_WIRE,
ICON_SOLID,
@@ -268,7 +268,7 @@
ICON_EYEDROPPER,
ICON_WINDOW_WINDOW,
ICON_PANEL_CLOSE,
- ICON_BLANK35,
+ ICON_PHYSICS,
ICON_BLANK36,
ICON_BLANK37,
ICON_BLANK38,
Modified: branches/particles/source/blender/src/blenderbuttons.c
===================================================================
--- branches/particles/source/blender/src/blenderbuttons.c 2007-06-26 10:08:58 UTC (rev 11061)
+++ branches/particles/source/blender/src/blenderbuttons.c 2007-06-26 11:25:27 UTC (rev 11062)
@@ -1,2115 +1,2120 @@
/* DataToC output of file <blenderbuttons> */
-int datatoc_blenderbuttons_size= 67487;
+int datatoc_blenderbuttons_size= 67622;
char datatoc_blenderbuttons[]= {
-137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 0, 0, 0, 1, 0, 8, 6, 0, 0, 0,197,144,
-206,103, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 11, 19, 0, 0, 11, 19, 1, 0,154,156, 24, 0, 0, 10, 77,105, 67, 67, 80, 80,
-104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101, 0, 0,120,218,157, 83,119, 88,147,247, 22, 62,
-223,247,101, 15, 86, 66,216,240,177,151,108,129, 0, 34, 35,172, 8,200, 16, 89,162, 16,146, 0, 97,132, 16, 18, 64,197,133,136,
- 10, 86, 20, 21, 17,156, 72, 85,196,130,213, 10, 72,157,136,226,160, 40,184,103, 65,138,136, 90,139, 85, 92, 56,238, 31,220,167,
-181,125,122,239,237,237,251,215,251,188,231,156,231,252,206,121,207, 15,128, 17, 18, 38,145,230,162,106, 0, 57, 82,133, 60, 58,
-216, 31,143, 79, 72,196,201,189,128, 2, 21, 72,224, 4, 32, 16,230,203,194,103, 5,197, 0, 0,240, 3,121,120,126,116,176, 63,
-252, 1,175,111, 0, 2, 0,112,213, 46, 36, 18,199,225,255,131,186, 80, 38, 87, 0, 32,145, 0,224, 34, 18,231, 11, 1,144, 82,
- 0,200, 46, 84,200, 20, 0,200, 24, 0,176, 83,179,100, 10, 0,148, 0, 0,108,121,124, 66, 34, 0,170, 13, 0,236,244, 73, 62,
- 5, 0,216,169,147,220, 23, 0,216,162, 28,169, 8, 0,141, 1, 0,153, 40, 71, 36, 2, 64,187, 0, 96, 85,129, 82, 44, 2,192,
-194, 0,160,172, 64, 34, 46, 4,192,174, 1,128, 89,182, 50, 71, 2,128,189, 5, 0,118,142, 88,144, 15, 64, 96, 0,128,153, 66,
- 44,204, 0, 32, 56, 2, 0, 67, 30, 19,205, 3, 32, 76, 3,160, 48,210,191,224,169, 95,112,133,184, 72, 1, 0,192,203,149,205,
-151, 75,210, 51, 20,184,149,208, 26,119,242,240,224,226, 33,226,194,108,177, 66, 97, 23, 41, 16,102, 9,228, 34,156,151,155, 35,
- 19, 72,231, 3, 76,206, 12, 0, 0, 26,249,209,193,254, 56, 63,144,231,230,228,225,230,102,231,108,239,244,197,162,254,107,240,
-111, 34, 62, 33,241,223,254,188,140, 2, 4, 0, 16, 78,207,239,218, 95,229,229,214, 3,112,199, 1,176,117,191,107,169, 91, 0,
-218, 86, 0,104,223,249, 93, 51,219, 9,160, 90, 10,208,122,249,139,121, 56,252, 64, 30,158,161, 80,200, 60, 29, 28, 10, 11, 11,
-237, 37, 98,161,189, 48,227,139, 62,255, 51,225,111,224,139,126,246,252, 64, 30,254,219,122,240, 0,113,154, 64,153,173,192,163,
-131,253,113, 97,110,118,174, 82,142,231,203, 4, 66, 49,110,247,231, 35,254,199,133,127,253,142, 41,209,226, 52,177, 92, 44, 21,
-138,241, 88,137,184, 80, 34, 77,199,121,185, 82,145, 68, 33,201,149,226, 18,233,127, 50,241, 31,150,253, 9,147,119, 13, 0,172,
-134, 79,192, 78,182, 7,181,203,108,192,126,238, 1, 2,139, 14, 88,210,118, 0, 64,126,243, 45,140, 26, 11,145, 0, 16,103, 52,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list