Browse Source

math: rename matrix.h to vector.h and simplify some stuff, especially in

the matrix code itself.
legacy
Sam Hocevar sam 14 years ago
parent
commit
0a52e68f6f
15 changed files with 1227 additions and 1241 deletions
  1. +2
    -2
      src/Makefile.am
  2. +1
    -1
      src/core.h
  3. +1
    -1
      src/eglapp.h
  4. +1
    -1
      src/image/image.h
  5. +1
    -1
      src/input.h
  6. +0
    -1227
      src/lol/math/matrix.h
  7. +1
    -1
      src/lol/math/remez.h
  8. +1213
    -0
      src/lol/math/vector.h
  9. +1
    -1
      src/platform/nacl/naclapp.h
  10. +1
    -1
      src/platform/ps3/ps3app.h
  11. +1
    -1
      src/platform/sdl/sdlapp.h
  12. +0
    -0
      src/vector.cpp
  13. +2
    -2
      test/Makefile.am
  14. +0
    -0
      test/benchmark/vector.cpp
  15. +2
    -2
      test/unit/vector.cpp

+ 2
- 2
src/Makefile.am View File

@@ -2,7 +2,7 @@
noinst_LIBRARIES = liblol.a noinst_LIBRARIES = liblol.a


liblol_a_SOURCES = \ liblol_a_SOURCES = \
core.h matrix.cpp real.cpp tiler.cpp tiler.h dict.cpp dict.h \
core.h vector.cpp real.cpp tiler.cpp tiler.h dict.cpp dict.h \
audio.cpp audio.h scene.cpp scene.h font.cpp font.h layer.cpp layer.h \ audio.cpp audio.h scene.cpp scene.h font.cpp font.h layer.cpp layer.h \
map.cpp map.h entity.cpp entity.h ticker.cpp ticker.h lolgl.h \ map.cpp map.h entity.cpp entity.h ticker.cpp ticker.h lolgl.h \
tileset.cpp tileset.h forge.cpp forge.h video.cpp video.h log.cpp log.h \ tileset.cpp tileset.h forge.cpp forge.h video.cpp video.h log.cpp log.h \
@@ -13,7 +13,7 @@ liblol_a_SOURCES = \
platform.cpp platform.h sprite.cpp sprite.h trig.cpp trig.h \ platform.cpp platform.h sprite.cpp sprite.h trig.cpp trig.h \
\ \
lol/unit.h \ lol/unit.h \
lol/math/matrix.h lol/math/real.h lol/math/remez.h \
lol/math/vector.h lol/math/real.h lol/math/remez.h \
\ \
application/application.cpp application/application.h \ application/application.cpp application/application.h \
eglapp.cpp eglapp.h \ eglapp.cpp eglapp.h \


+ 1
- 1
src/core.h View File

@@ -65,7 +65,7 @@ static inline int isnan(float f)
#include "trig.h" #include "trig.h"
#include "half.h" #include "half.h"
#include "lol/math/real.h" #include "lol/math/real.h"
#include "lol/math/matrix.h"
#include "lol/math/vector.h"
#include "numeric.h" #include "numeric.h"
#include "timer.h" #include "timer.h"
#include "thread/thread.h" #include "thread/thread.h"


+ 1
- 1
src/eglapp.h View File

@@ -16,7 +16,7 @@
#if !defined __LOL_EGLAPP_H__ #if !defined __LOL_EGLAPP_H__
#define __LOL_EGLAPP_H__ #define __LOL_EGLAPP_H__


#include "lol/math/matrix.h"
#include "lol/math/vector.h"


namespace lol namespace lol
{ {


+ 1
- 1
src/image/image.h View File

@@ -16,7 +16,7 @@
#if !defined __LOL_IMAGE_H__ #if !defined __LOL_IMAGE_H__
#define __LOL_IMAGE_H__ #define __LOL_IMAGE_H__


#include "lol/math/matrix.h"
#include "lol/math/vector.h"


namespace lol namespace lol
{ {


+ 1
- 1
src/input.h View File

@@ -16,7 +16,7 @@
#if !defined __LOL_INPUT_H__ #if !defined __LOL_INPUT_H__
#define __LOL_INPUT_H__ #define __LOL_INPUT_H__


#include "lol/math/matrix.h"
#include "lol/math/vector.h"


namespace lol namespace lol
{ {


+ 0
- 1227
src/lol/math/matrix.h
File diff suppressed because it is too large
View File


+ 1
- 1
src/lol/math/remez.h View File

@@ -18,7 +18,7 @@


#include <cstdio> #include <cstdio>


#include "lol/math/matrix.h"
#include "lol/math/vector.h"


namespace lol namespace lol
{ {


+ 1213
- 0
src/lol/math/vector.h
File diff suppressed because it is too large
View File


+ 1
- 1
src/platform/nacl/naclapp.h View File

@@ -16,7 +16,7 @@
#if !defined __LOL_NACLAPP_H__ #if !defined __LOL_NACLAPP_H__
#define __LOL_NACLAPP_H__ #define __LOL_NACLAPP_H__


#include "lol/math/matrix.h"
#include "lol/math/vector.h"


namespace lol namespace lol
{ {


+ 1
- 1
src/platform/ps3/ps3app.h View File

@@ -16,7 +16,7 @@
#if !defined __LOL_PS3APP_H__ #if !defined __LOL_PS3APP_H__
#define __LOL_PS3APP_H__ #define __LOL_PS3APP_H__


#include "lol/math/matrix.h"
#include "lol/math/vector.h"


namespace lol namespace lol
{ {


+ 1
- 1
src/platform/sdl/sdlapp.h View File

@@ -16,7 +16,7 @@
#if !defined __LOL_SDLAPP_H__ #if !defined __LOL_SDLAPP_H__
#define __LOL_SDLAPP_H__ #define __LOL_SDLAPP_H__


#include "lol/math/matrix.h"
#include "lol/math/vector.h"


namespace lol namespace lol
{ {


src/matrix.cpp → src/vector.cpp View File


+ 2
- 2
test/Makefile.am View File

@@ -22,14 +22,14 @@ noinst_PROGRAMS = quad benchsuite testsuite
TESTS = testsuite TESTS = testsuite


testsuite_SOURCES = testsuite.cpp \ testsuite_SOURCES = testsuite.cpp \
unit/matrix.cpp unit/half.cpp unit/trig.cpp unit/build.cpp \
unit/vector.cpp unit/half.cpp unit/trig.cpp unit/build.cpp \
unit/real.cpp unit/image.cpp unit/quat.cpp unit/cmplx.cpp unit/real.cpp unit/image.cpp unit/quat.cpp unit/cmplx.cpp
testsuite_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@ testsuite_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
testsuite_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@ testsuite_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@
testsuite_DEPENDENCIES = $(top_builddir)/src/liblol.a testsuite_DEPENDENCIES = $(top_builddir)/src/liblol.a


benchsuite_SOURCES = benchsuite.cpp \ benchsuite_SOURCES = benchsuite.cpp \
benchmark/matrix.cpp benchmark/half.cpp benchmark/trig.cpp \
benchmark/vector.cpp benchmark/half.cpp benchmark/trig.cpp \
benchmark/real.cpp benchmark/real.cpp
benchsuite_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@ benchsuite_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@
benchsuite_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@ benchsuite_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@


test/benchmark/matrix.cpp → test/benchmark/vector.cpp View File


test/unit/matrix.cpp → test/unit/vector.cpp View File

@@ -1,7 +1,7 @@
// //
// Lol Engine // Lol Engine
// //
// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the Do What The Fuck You Want To // modify it under the terms of the Do What The Fuck You Want To
// Public License, Version 2, as published by Sam Hocevar. See // Public License, Version 2, as published by Sam Hocevar. See
@@ -18,7 +18,7 @@
namespace lol namespace lol
{ {


LOLUNIT_FIXTURE(MatrixTest)
LOLUNIT_FIXTURE(VectorTest)
{ {
void SetUp() void SetUp()
{ {

Loading…
Cancel
Save