underware-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Underware-devel] osgCal patch & pong player synchronized to paddle


From: Loic Dachary
Subject: [Underware-devel] osgCal patch & pong player synchronized to paddle
Date: Tue, 27 Jan 2004 21:52:15 +0100

        Hi,

        The fake player (paladin from cal3d) was replaced by an
animated player whose hand is now synchronized with the paddle
movement (thanks Philippe ;-). The player is headless because
the cal3d export is still incomplete.

        In order to properly synchronize the animation to the paddle
movement I had to expose an additional function in the cal3d adaptor
for OpenSceneGraph (see the patch below, made against today's CVS
tree). I'm unsure if this patch is appropriate but I'll post it to 
the osgCal patch repository to get some feedback.

        Cheers,

Index: include/osgCal/Model
===================================================================
RCS file: /cvsroot/osgcal/osgcal/include/osgCal/Model,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Model
--- include/osgCal/Model        27 Apr 2003 18:43:43 -0000      1.1.1.1
+++ include/osgCal/Model        27 Jan 2004 21:15:00 -0000
@@ -78,6 +78,8 @@
        return model.getCoreModel()->getCoreAnimationCount();
     }
 
+    void update(double elapsed);
+
     /**
      * Get the core model
      */
Index: src/osgCal/Model.cpp
===================================================================
RCS file: /cvsroot/osgcal/osgcal/src/osgCal/Model.cpp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Model.cpp
--- src/osgCal/Model.cpp        27 Apr 2003 18:43:43 -0000      1.1.1.1
+++ src/osgCal/Model.cpp        27 Jan 2004 21:15:00 -0000
@@ -81,6 +81,10 @@
     else std::cerr << "Model::stop: ERROR: The model doesn't have a mixer" << 
std::endl;
 }
 
+void Model::update(double elapsed) {
+  model.update(elapsed);
+}
+
 osg::Object* Model::clone(const osg::CopyOp&) const {
     return new Model();
 }

-- 
Donate to FSF France online : http://rate.affero.net/fsffrance/
Loic Dachary, 12 bd Magenta, 75010 Paris. Tel: 33 1 42 45 07 97      
http://www.fsffrance.org/   http://www.dachary.org/loic/gpg.txt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]