yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00918
[svn] r1652 - trunk/pkg/common/Engine/DeusExMachina
Author: sega
Date: 2009-02-01 22:07:38 +0100 (Sun, 01 Feb 2009)
New Revision: 1652
Modified:
trunk/pkg/common/Engine/DeusExMachina/RotationEngine.cpp
trunk/pkg/common/Engine/DeusExMachina/RotationEngine.hpp
Log:
Fixed bug in RotationEngine: rotationAxis now normalized in action(), not in postProcessAttributes()
Modified: trunk/pkg/common/Engine/DeusExMachina/RotationEngine.cpp
===================================================================
--- trunk/pkg/common/Engine/DeusExMachina/RotationEngine.cpp 2009-02-01 15:45:18 UTC (rev 1651)
+++ trunk/pkg/common/Engine/DeusExMachina/RotationEngine.cpp 2009-02-01 21:07:38 UTC (rev 1652)
@@ -63,14 +63,9 @@
REGISTER_ATTRIBUTE(zeroPoint);
}
-void RotationEngine::postProcessAttributes(bool deserializing)
-{
- if (!deserializing) return;
- rotationAxis.Normalize();
-}
-
void RotationEngine::applyCondition(MetaBody *ncb)
{
+ rotationAxis.Normalize();
shared_ptr<BodyContainer> bodies = ncb->bodies;
Modified: trunk/pkg/common/Engine/DeusExMachina/RotationEngine.hpp
===================================================================
--- trunk/pkg/common/Engine/DeusExMachina/RotationEngine.hpp 2009-02-01 15:45:18 UTC (rev 1651)
+++ trunk/pkg/common/Engine/DeusExMachina/RotationEngine.hpp 2009-02-01 21:07:38 UTC (rev 1652)
@@ -15,6 +15,7 @@
RotationEngine();
Real angularVelocity;
+ //! axis of rotation (direction); will be normalized by the engine
Vector3r rotationAxis;
bool rotateAroundZero;
Vector3r zeroPoint;
@@ -23,7 +24,6 @@
protected :
void registerAttributes();
- void postProcessAttributes(bool deserializing);
REGISTER_CLASS_NAME(RotationEngine);
REGISTER_BASE_CLASS_NAME(DeusExMachina);
};
Follow ups