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

[Java3Djp:00464] ANN javax.vecmath C++ port




平鍋@esmです.

Java3D で仕様が規定されている,javax.vecmath package の
C++ 版を公開します.

  http://www.esm.co.jp/divisions/open-sys/java/vecmath/index-j.html

テンプレートを使用した「速度最優先」のライブラリになりました.

以下,README です.
===
-----------------------------------------------------
 C++ port of unofficial javax.vecmath package
         by Kenji Hiranabe

                               3/5 ,1999 version 1.1-1.0
-----------------------------------------------------

* INTRODUCTION

This is a C++ port of unofficial free implementation
(source code release) of Java(TM) 3D API 1.1 final
vecmath package.

This package supports vector/point transformation math
often utilized in computer graphics.

The Included classes are the followings.

    * Tuples

      Tuple2<T>      Tuple3<T>     Tuple4<T>
        |             |             |
        +Vector2<T>   +Vector3<T>   +Vector4<T>
        +Point2<T>    +Point3<T>    +Point4<T>
        +TexCoord2<T> +Color3<T>    +Quat4<T>
                                    +Color4<T>
      AxisAngle4<T>

    * Matrices

      Matrix3<T>     Matrix4<T>

You can download the zipped or tar+gzipped source code from;

       http://www.esm.co.jp/divisions/open-sys/java/vecmath/

* FEATURES

 * Highest priority to SPEED. No 'new' operator, no arrays, no virual functions.
 * All files are *.h template header files. no need for complilation.
 * Has a test suite.
 * Aliasing-safe. i.e. v.cross(v,v1) or m.mul(m1,m) works.
 * optional IO and  string conversion support.
 * Java3D 1.1 final specification is implemented, but no GVector and GMatrix yet.

* INSTALL

1. unzip and untar the downloaded file, like;
      % gunzip vecmath-c++-1.1-1.0.tar.gz
      % tar xvf vecmath-c++-1.1-1.0.tar
2. place all *.h files into your header directory.
      % cp vecmath-c++/*.h <yourdir>
3. write your C++ code, hello-vecmath.cc
    #include <iostream>
    #include <vecmath.h>
    int main(int, char**) {
       Matrix3d m(1,2,3,4,5,6,7,8,9);
       Vector3d v(2,3,4);
       cout << m*v;
       return 0;
    }
4. compile, and run.
    % g++ -I<yourdir> hello-vecmath.cc -o hello-vecmath
    % hello-vecmath
5. (20,47,74) is printed, voila !
6. if needed, configure "vm_conf.h".
7. if needed, compile test programs(test-*.cc) and run.
    % cp Makefile.unix Makefile
    % make test

* TESTED PLATFORMS AND COMPILERS

1. Sun Solaris2.6 on SPARCStation with gcc2.7.2 and gcc2.8.1
..... please report on your platforms ! .....

* FEEDBACK

Any bug reports or comments are welcome.
If you think this package is useful, PLEASE give me feedback.
I would like to hear what kind of applications you are working on !

---
  Eiwa System Management, Inc.  http://www.esm.co.jp/
  Kenji Hiranabe                mailto:hiranabe@xxxxxxxxxx