[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19907] branches/ge_dev/intern/itasc: itasc: missed propset on a few files.

Benoit Bolsee benoit.bolsee at online.be
Thu Apr 23 15:41:59 CEST 2009


Revision: 19907
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19907
Author:   ben2610
Date:     2009-04-23 15:41:59 +0200 (Thu, 23 Apr 2009)

Log Message:
-----------
itasc: missed propset on a few files.

Modified Paths:
--------------
    branches/ge_dev/intern/itasc/MovingFrame.cpp
    branches/ge_dev/intern/itasc/MovingFrame.hpp
    branches/ge_dev/intern/itasc/Object.hpp
    branches/ge_dev/intern/itasc/Scene.cpp
    branches/ge_dev/intern/itasc/Scene.hpp
    branches/ge_dev/intern/itasc/Solver.hpp
    branches/ge_dev/intern/itasc/UncontrolledObject.cpp
    branches/ge_dev/intern/itasc/UncontrolledObject.hpp
    branches/ge_dev/intern/itasc/WDLSSolver.cpp
    branches/ge_dev/intern/itasc/WDLSSolver.hpp
    branches/ge_dev/intern/itasc/WSDLSSolver.cpp
    branches/ge_dev/intern/itasc/WSDLSSolver.hpp
    branches/ge_dev/intern/itasc/WorldObject.cpp
    branches/ge_dev/intern/itasc/WorldObject.hpp
    branches/ge_dev/intern/itasc/ublas_types.hpp

Property Changed:
----------------
    branches/ge_dev/intern/itasc/Makefile
    branches/ge_dev/intern/itasc/MovingFrame.cpp
    branches/ge_dev/intern/itasc/MovingFrame.hpp
    branches/ge_dev/intern/itasc/Object.hpp
    branches/ge_dev/intern/itasc/SConscript
    branches/ge_dev/intern/itasc/Scene.cpp
    branches/ge_dev/intern/itasc/Scene.hpp
    branches/ge_dev/intern/itasc/Solver.hpp
    branches/ge_dev/intern/itasc/UncontrolledObject.cpp
    branches/ge_dev/intern/itasc/UncontrolledObject.hpp
    branches/ge_dev/intern/itasc/WDLSSolver.cpp
    branches/ge_dev/intern/itasc/WDLSSolver.hpp
    branches/ge_dev/intern/itasc/WSDLSSolver.cpp
    branches/ge_dev/intern/itasc/WSDLSSolver.hpp
    branches/ge_dev/intern/itasc/WorldObject.cpp
    branches/ge_dev/intern/itasc/WorldObject.hpp
    branches/ge_dev/intern/itasc/ublas_types.hpp


Property changes on: branches/ge_dev/intern/itasc/Makefile
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Modified: branches/ge_dev/intern/itasc/MovingFrame.cpp
===================================================================
--- branches/ge_dev/intern/itasc/MovingFrame.cpp	2009-04-23 13:30:34 UTC (rev 19906)
+++ branches/ge_dev/intern/itasc/MovingFrame.cpp	2009-04-23 13:41:59 UTC (rev 19907)
@@ -1,147 +1,147 @@
-/* $Id$
- * MovingFrame.cpp
- *
- *  Created on: Feb 10, 2009
- *      Author: benoitbolsee
- */
-
-#include "MovingFrame.hpp"
-#include <malloc.h>
-#include <string.h>
-namespace iTaSC{
-
-static const unsigned int frameCacheSize = sizeof(((Frame*)0)->p.data)+sizeof(((Frame*)0)->M.data);
-
-MovingFrame::MovingFrame(const Frame& frame):UncontrolledObject(),
-	m_function(NULL), m_param(NULL), m_velocity(), m_poseCCh(-1), m_poseCTs(0)
-{
-	m_internalPose = m_nextPose = frame;
-	initialize(6, 1);
-	e_matrix& Ju = m_JuArray[0];
-	Ju = e_identity_matrix(6,6);
-}
-
-MovingFrame::~MovingFrame()
-{
-}
-
-void MovingFrame::finalize()
-{
-	updateJacobian();
-}
-
-void MovingFrame::initCache(Cache *_cache)
-{
-	m_cache = _cache;
-	m_poseCCh = -1;
-	if (m_cache) {
-		m_poseCCh = m_cache->addChannel(this,"pose",frameCacheSize);
-		// add the initial position at timestamp 0
-		pushInternalFrame(0);
-	}
-}
-
-void MovingFrame::pushInternalFrame(CacheTS timestamp)
-{
-	if (m_poseCCh >= 0) {
-		char *item;
-		item = (char *)m_cache->addCacheItem(this, m_poseCCh, timestamp, NULL, frameCacheSize);
-		if (item) {
-			memcpy(item, m_internalPose.p.data, sizeof(m_internalPose.p.data));
-			item += sizeof(m_internalPose.p.data);
-			memcpy(item, m_internalPose.M.data, sizeof(m_internalPose.M.data));
-		}
-		m_poseCTs = timestamp;
-	}
-}
-
-// load pose just preceeding timestamp
-// return false if no cache position was found
-bool MovingFrame::popInternalFrame(CacheTS timestamp)
-{
-	if (m_poseCCh >= 0) {
-		char *item;
-		item = (char *)m_cache->getPreviousCacheItem(this, m_poseCCh, &timestamp);
-		if (item && m_poseCTs != timestamp) {
-			memcpy(m_internalPose.p.data, item, sizeof(m_internalPose.p.data));
-			item += sizeof(m_internalPose.p.data);
-			memcpy(m_internalPose.M.data, item, sizeof(m_internalPose.M.data));
-			m_poseCTs = timestamp;
-			// changing the starting pose, recompute the jacobian
-			updateJacobian();
-		}
-		return (item) ? true : false;
-	}
-	// in case of no cache, there is always a previous position
-	return true;
-}
-
-bool MovingFrame::setFrame(const Frame& frame)
-{
-	m_internalPose = m_nextPose = frame;
-	return true;
-}
-
-bool MovingFrame::setCallback(MovingFrameCallback _function, void* _param)
-{
-	m_function = _function;
-	m_param = _param;
-	return true;
-}
-
-void MovingFrame::updateCoordinates(const Timestamp& timestamp)
-{
-	// don't compute the velocity during substepping, it is assumed constant.
-	if (!timestamp.substep) {
-		bool cacheAvail = true;
-		if (!timestamp.reiterate)
-			cacheAvail = popInternalFrame(timestamp.cacheTimestamp);
-		if (m_function)
-			(*m_function)(timestamp, m_internalPose, m_nextPose, m_param);
-		// only compute velocity if we have a previous pose
-		if (cacheAvail) {
-			unsigned int iXu;
-			m_velocity = diff(m_internalPose, m_nextPose, timestamp.realTimestep);
-			for (iXu=0; iXu<6; iXu++)
-				m_xudot(iXu) = m_velocity(iXu);
-		} else {
-			// first position in cache, no velocity as we cannot interpolate
-			m_internalPose = m_nextPose;
-			m_xudot = e_zero_vector(6);
-			// recompute the jacobian
-			updateJacobian();
-		}
-	}
-}
-
-void MovingFrame::updateKinematics(const Timestamp& timestamp)
-{
-	if (timestamp.substep) {
-		// during substepping, update the internal pose from velocity information
-		Twist localvel = m_internalPose.M.Inverse(m_velocity);
-		m_internalPose.Integrate(localvel, 1.0/timestamp.realTimestep);
-	} else {
-		m_internalPose = m_nextPose;
-		pushInternalFrame(timestamp.cacheTimestamp);
-	}
-	// m_internalPose is updated, recompute the jacobian
-	updateJacobian();
-}
-
-void MovingFrame::updateJacobian()
-{
-	Twist m_jac;
-	e_matrix& Ju = m_JuArray[0];
-
-    //Jacobian is always identity at position on the object, 
-	//we ust change the reference to the world.
-	//instead of going through complicated jacobian operation, implemented direct formula
-	Ju(1,3) = m_internalPose.p.z();
-	Ju(2,3) = -m_internalPose.p.y();
-	Ju(0,4) = -m_internalPose.p.z();
-	Ju(2,4) = m_internalPose.p.x();
-	Ju(0,5) = m_internalPose.p.y();
-	Ju(1,5) = -m_internalPose.p.x();
-}
-
-}
+/* $Id$
+ * MovingFrame.cpp
+ *
+ *  Created on: Feb 10, 2009
+ *      Author: benoitbolsee
+ */
+
+#include "MovingFrame.hpp"
+#include <malloc.h>
+#include <string.h>
+namespace iTaSC{
+
+static const unsigned int frameCacheSize = sizeof(((Frame*)0)->p.data)+sizeof(((Frame*)0)->M.data);
+
+MovingFrame::MovingFrame(const Frame& frame):UncontrolledObject(),
+	m_function(NULL), m_param(NULL), m_velocity(), m_poseCCh(-1), m_poseCTs(0)
+{
+	m_internalPose = m_nextPose = frame;
+	initialize(6, 1);
+	e_matrix& Ju = m_JuArray[0];
+	Ju = e_identity_matrix(6,6);
+}
+
+MovingFrame::~MovingFrame()
+{
+}
+
+void MovingFrame::finalize()
+{
+	updateJacobian();
+}
+
+void MovingFrame::initCache(Cache *_cache)
+{
+	m_cache = _cache;
+	m_poseCCh = -1;
+	if (m_cache) {
+		m_poseCCh = m_cache->addChannel(this,"pose",frameCacheSize);
+		// add the initial position at timestamp 0
+		pushInternalFrame(0);
+	}
+}
+
+void MovingFrame::pushInternalFrame(CacheTS timestamp)
+{
+	if (m_poseCCh >= 0) {
+		char *item;
+		item = (char *)m_cache->addCacheItem(this, m_poseCCh, timestamp, NULL, frameCacheSize);
+		if (item) {
+			memcpy(item, m_internalPose.p.data, sizeof(m_internalPose.p.data));
+			item += sizeof(m_internalPose.p.data);
+			memcpy(item, m_internalPose.M.data, sizeof(m_internalPose.M.data));
+		}
+		m_poseCTs = timestamp;
+	}
+}
+
+// load pose just preceeding timestamp
+// return false if no cache position was found
+bool MovingFrame::popInternalFrame(CacheTS timestamp)
+{
+	if (m_poseCCh >= 0) {
+		char *item;
+		item = (char *)m_cache->getPreviousCacheItem(this, m_poseCCh, &timestamp);
+		if (item && m_poseCTs != timestamp) {
+			memcpy(m_internalPose.p.data, item, sizeof(m_internalPose.p.data));
+			item += sizeof(m_internalPose.p.data);
+			memcpy(m_internalPose.M.data, item, sizeof(m_internalPose.M.data));
+			m_poseCTs = timestamp;
+			// changing the starting pose, recompute the jacobian
+			updateJacobian();
+		}
+		return (item) ? true : false;
+	}
+	// in case of no cache, there is always a previous position
+	return true;
+}
+
+bool MovingFrame::setFrame(const Frame& frame)
+{
+	m_internalPose = m_nextPose = frame;
+	return true;
+}
+
+bool MovingFrame::setCallback(MovingFrameCallback _function, void* _param)
+{
+	m_function = _function;
+	m_param = _param;
+	return true;
+}
+
+void MovingFrame::updateCoordinates(const Timestamp& timestamp)
+{
+	// don't compute the velocity during substepping, it is assumed constant.
+	if (!timestamp.substep) {
+		bool cacheAvail = true;
+		if (!timestamp.reiterate)
+			cacheAvail = popInternalFrame(timestamp.cacheTimestamp);
+		if (m_function)
+			(*m_function)(timestamp, m_internalPose, m_nextPose, m_param);
+		// only compute velocity if we have a previous pose
+		if (cacheAvail) {
+			unsigned int iXu;
+			m_velocity = diff(m_internalPose, m_nextPose, timestamp.realTimestep);
+			for (iXu=0; iXu<6; iXu++)
+				m_xudot(iXu) = m_velocity(iXu);
+		} else {
+			// first position in cache, no velocity as we cannot interpolate
+			m_internalPose = m_nextPose;
+			m_xudot = e_zero_vector(6);
+			// recompute the jacobian
+			updateJacobian();
+		}
+	}
+}
+
+void MovingFrame::updateKinematics(const Timestamp& timestamp)
+{
+	if (timestamp.substep) {
+		// during substepping, update the internal pose from velocity information
+		Twist localvel = m_internalPose.M.Inverse(m_velocity);
+		m_internalPose.Integrate(localvel, 1.0/timestamp.realTimestep);
+	} else {
+		m_internalPose = m_nextPose;
+		pushInternalFrame(timestamp.cacheTimestamp);
+	}
+	// m_internalPose is updated, recompute the jacobian
+	updateJacobian();
+}
+
+void MovingFrame::updateJacobian()
+{
+	Twist m_jac;
+	e_matrix& Ju = m_JuArray[0];
+
+    //Jacobian is always identity at position on the object, 
+	//we ust change the reference to the world.
+	//instead of going through complicated jacobian operation, implemented direct formula
+	Ju(1,3) = m_internalPose.p.z();
+	Ju(2,3) = -m_internalPose.p.y();
+	Ju(0,4) = -m_internalPose.p.z();
+	Ju(2,4) = m_internalPose.p.x();
+	Ju(0,5) = m_internalPose.p.y();
+	Ju(1,5) = -m_internalPose.p.x();
+}
+
+}


Property changes on: branches/ge_dev/intern/itasc/MovingFrame.cpp
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: branches/ge_dev/intern/itasc/MovingFrame.hpp
===================================================================
--- branches/ge_dev/intern/itasc/MovingFrame.hpp	2009-04-23 13:30:34 UTC (rev 19906)
+++ branches/ge_dev/intern/itasc/MovingFrame.hpp	2009-04-23 13:41:59 UTC (rev 19907)
@@ -1,47 +1,47 @@
-/* $Id$
- * MovingFrame.h
- *
- *  Created on: Feb 10, 2009
- *      Author: benoitbolsee
- */
-
-#ifndef MOVINGFRAME_HPP_
-#define MOVINGFRAME_HPP_
-
-#include "UncontrolledObject.hpp"
-#include <vector>
-
-
-namespace iTaSC{
-
-typedef bool (*MovingFrameCallback)(const Timestamp& timestamp, const Frame& _current, Frame& _next, void *param);
-
-class MovingFrame: public UncontrolledObject {
-public:
-    MovingFrame(const Frame& frame=F_identity);
-    virtual ~MovingFrame();
-
-	bool setFrame(const Frame& frame);
-	bool setCallback(MovingFrameCallback _function, void* _param);
-
-	virtual void updateCoordinates(const Timestamp& timestamp);
-	virtual void updateKinematics(const Timestamp& timestamp);
-	virtual void initCache(Cache *_cache);
-	virtual void finalize();
-protected:
-	virtual void updateJacobian();
-
-private:
-	void pushInternalFrame(CacheTS timestamp);
-	bool popInternalFrame(CacheTS timestamp);
-	MovingFrameCallback m_function;
-	void* m_param;
-	Frame m_nextPose;
-	Twist m_velocity;
-	int m_poseCCh;		// cache channel for pose
-	unsigned int m_poseCTs;
-};
-
-}
-
-#endif /* MOVINGFRAME_H_ */
+/* $Id$
+ * MovingFrame.h
+ *
+ *  Created on: Feb 10, 2009
+ *      Author: benoitbolsee
+ */
+
+#ifndef MOVINGFRAME_HPP_
+#define MOVINGFRAME_HPP_
+
+#include "UncontrolledObject.hpp"
+#include <vector>
+
+
+namespace iTaSC{
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list