Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5674 in orxonox.OLD for trunk/src/lib/collision_detection


Ignore:
Timestamp:
Nov 21, 2005, 4:51:07 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: collision-detection with new Matrix-class

Location:
trunk/src/lib/collision_detection
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/Makefile.am

    r5463 r5674  
    22include $(MAINSRCDIR)/defs/include_paths.am
    33
    4 noinst_LIBRARIES = libORXcd.a 
     4noinst_LIBRARIES = libORXcd.a
    55
    66libORXcd_a_SOURCES = cd_engine.cc \
     
    1313                     bounding_volume.cc \
    1414                     bounding_sphere.cc
    15 
    1615
    1716
  • trunk/src/lib/collision_detection/Makefile.in

    r5672 r5674  
    1 # Makefile.in generated by automake 1.8.5 from Makefile.am.
     1# Makefile.in generated by automake 1.9.6 from Makefile.am.
    22# @configure_input@
    33
    44# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
    5 # 2003, 2004  Free Software Foundation, Inc.
     5# 2003, 2004, 2005  Free Software Foundation, Inc.
    66# This Makefile.in is free software; the Free Software Foundation
    77# gives unlimited permission to copy and/or distribute it,
     
    1515@SET_MAKE@
    1616
    17 
    18 SOURCES = $(libORXcd_a_SOURCES)
    1917
    2018srcdir = @srcdir@
     
    3836PRE_UNINSTALL = :
    3937POST_UNINSTALL = :
     38build_triplet = @build@
    4039host_triplet = @host@
     40target_triplet = @target@
    4141subdir = src/lib/collision_detection
    4242DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
     
    6262depcomp = $(SHELL) $(top_srcdir)/depcomp
    6363am__depfiles_maybe = depfiles
    64 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bounding_sphere.Po \
    65 @AMDEP_TRUE@    ./$(DEPDIR)/bounding_volume.Po \
    66 @AMDEP_TRUE@    ./$(DEPDIR)/bv_tree.Po ./$(DEPDIR)/bv_tree_node.Po \
    67 @AMDEP_TRUE@    ./$(DEPDIR)/cd_engine.Po ./$(DEPDIR)/collision.Po \
    68 @AMDEP_TRUE@    ./$(DEPDIR)/obb.Po ./$(DEPDIR)/obb_tree.Po \
    69 @AMDEP_TRUE@    ./$(DEPDIR)/obb_tree_node.Po
    7064CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    7165        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    190184target_vendor = @target_vendor@
    191185MAINSRCDIR = ../..
    192 noinst_LIBRARIES = libORXcd.a 
     186noinst_LIBRARIES = libORXcd.a
    193187libORXcd_a_SOURCES = cd_engine.cc \
    194188                     collision.cc \
     
    226220          esac; \
    227221        done; \
    228         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/collision_detection/Makefile'; \
     222        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/collision_detection/Makefile'; \
    229223        cd $(top_srcdir) && \
    230           $(AUTOMAKE) --foreign  src/lib/collision_detection/Makefile
     224          $(AUTOMAKE) --gnu  src/lib/collision_detection/Makefile
    231225.PRECIOUS: Makefile
    232226Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    274268@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    275269@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    276 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    277 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     270@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    278271@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ $<
    279272
     
    282275@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    283276@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    284 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    285 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     277@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    286278@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    287279uninstall-info-am:
     
    385377
    386378distclean-generic:
    387         -rm -f $(CONFIG_CLEAN_FILES)
     379        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
    388380
    389381maintainer-clean-generic:
  • trunk/src/lib/collision_detection/obb_tree_node.cc

    r5511 r5674  
    2020#include "obb.h"
    2121#include "obb_tree.h"
    22 #include "vector.h"
     22#include "matrix.h"
    2323#include "abstract_model.h"
    2424#include "world_entity.h"
    2525
    26 #include <math.h>
    2726#include "color.h"
    2827
    2928#include "debug.h"
    30 #include "stdincl.h"
    3129#include "lin_alg.h"
    3230#include "glincl.h"
     
    361359  Vector*              axis = new Vector[3];                //!< the references to the obb axis
    362360
    363   OBBTreeNode::coMat[0][0] = box->covarianceMatrix[0][0];
    364   OBBTreeNode::coMat[0][1] = box->covarianceMatrix[0][1];
    365   OBBTreeNode::coMat[0][2] = box->covarianceMatrix[0][2];
    366 
    367   OBBTreeNode::coMat[1][0] = box->covarianceMatrix[1][0];
    368   OBBTreeNode::coMat[1][1] = box->covarianceMatrix[1][1];
    369   OBBTreeNode::coMat[1][2] = box->covarianceMatrix[1][2];
    370 
    371   OBBTreeNode::coMat[2][0] = box->covarianceMatrix[2][0];
    372   OBBTreeNode::coMat[2][1] = box->covarianceMatrix[2][1];
    373   OBBTreeNode::coMat[2][2] = box->covarianceMatrix[2][2];
    374 
    375 
    376 //   OBBTreeNode::coMat[0][0] = 1;
    377 //   OBBTreeNode::coMat[0][1] = 2;
    378 //   OBBTreeNode::coMat[0][2] = 7;
    379 //
    380 //   OBBTreeNode::coMat[1][0] = 2;
    381 //   OBBTreeNode::coMat[1][1] = 5;
    382 //   OBBTreeNode::coMat[1][2] = 5;
    383 //
    384 //   OBBTreeNode::coMat[2][0] = 7;
    385 //   OBBTreeNode::coMat[2][1] = 5;
    386 //   OBBTreeNode::coMat[2][2] = 8;
    387 
    388 //   OBBTreeNode::coMat[1][1] = box->covarianceMatrix[0][0];
    389 //   OBBTreeNode::coMat[1][2] = box->covarianceMatrix[0][1];
    390 //   OBBTreeNode::coMat[1][3] = box->covarianceMatrix[0][2];
    391 //
    392 //   OBBTreeNode::coMat[2][1] = box->covarianceMatrix[1][0];
    393 //   OBBTreeNode::coMat[2][2] = box->covarianceMatrix[1][1];
    394 //   OBBTreeNode::coMat[2][3] = box->covarianceMatrix[1][2];
    395 //
    396 //   OBBTreeNode::coMat[3][1] = box->covarianceMatrix[2][0];
    397 //   OBBTreeNode::coMat[3][2] = box->covarianceMatrix[2][1];
    398 //   OBBTreeNode::coMat[3][3] = box->covarianceMatrix[2][2];
     361  Matrix covMat(  box->covarianceMatrix[0][0], box->covarianceMatrix[0][1], box->covarianceMatrix[0][2],
     362                  box->covarianceMatrix[1][0], box->covarianceMatrix[1][1], box->covarianceMatrix[1][2],
     363                  box->covarianceMatrix[2][0], box->covarianceMatrix[2][1], box->covarianceMatrix[2][2] );
     364  covMat.getEigenVectors(axis[0], axis[1], axis[2] );
    399365
    400366
    401367  /* new jacobi tests */
    402   JacobI(OBBTreeNode::coMat, OBBTreeNode::eigvlMat, OBBTreeNode::eigvMat, OBBTreeNode::rotCount);
    403   PRINTF(3)("-- Done Jacobi Decomposition\n");
     368//  JacobI(OBBTreeNode::coMat, OBBTreeNode::eigvlMat, OBBTreeNode::eigvMat, OBBTreeNode::rotCount);
     369//  PRINTF(3)("-- Done Jacobi Decomposition\n");
    404370
    405371
     
    415381//   }
    416382
    417   axis[0].x = OBBTreeNode::eigvMat[0][0]; axis[0].y = OBBTreeNode::eigvMat[1][0]; axis[0].z = OBBTreeNode::eigvMat[2][0];
     383/*  axis[0].x = OBBTreeNode::eigvMat[0][0]; axis[0].y = OBBTreeNode::eigvMat[1][0]; axis[0].z = OBBTreeNode::eigvMat[2][0];
    418384  axis[1].x = OBBTreeNode::eigvMat[0][1]; axis[1].y = OBBTreeNode::eigvMat[1][1]; axis[1].z = OBBTreeNode::eigvMat[2][1];
    419385  axis[2].x = OBBTreeNode::eigvMat[0][2]; axis[2].y = OBBTreeNode::eigvMat[1][2]; axis[2].z = OBBTreeNode::eigvMat[2][2];
    420386  axis[0].normalize();
    421387  axis[1].normalize();
    422   axis[2].normalize();
     388  axis[2].normalize();*/
    423389  box->axis = axis;
    424390
Note: See TracChangeset for help on using the changeset viewer.