pmc/include/pmc.h
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 17:57:56 +0100
changeset 4 236f8f747073
child 9 c3fecc82ade6
permissions -rw-r--r--
pimp my code, a small xdemo committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     1
/***
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     2
 *
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     3
 * $Id: pmc.h,v 1.1.1.1 2008-04-28 17:33:22 mbroeker Exp $
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
 * $Source: /development/cpp/pmc/include/pmc.h,v $
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     5
 */
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     6
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
#ifndef PMC_H
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
#define PMC_H
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
#include <iostream>
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
#include <object.h>
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
namespace pmc {
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
    class Vector:public Object {
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
      private:
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
        int x;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
        int y;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    18
        int z;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
      public:
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
        enum Mode { DEG, RAD, GRAD };
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    23
          Vector (int xx = 0, int yy = 0, int zz = 0);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    24
          virtual ~ Vector ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    25
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    26
        int X ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    27
        int Y ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    28
        int Z ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    29
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    30
        Vector operator+ (Vector);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    31
        Vector operator- (Vector);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    32
        int operator* (Vector);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    33
        double abs ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    34
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    35
        void vector ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    36
        double angle (Vector);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    37
        void setMode (Mode m = RAD);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    38
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    39
      private:
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    40
          Mode mode;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    41
    };
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    42
}
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    43
#endif