pmc/include/pmc.h
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 17:58:02 +0100
changeset 9 c3fecc82ade6
parent 4 236f8f747073
child 34 4a35f239fe5b
permissions -rw-r--r--
standard tags for git projects committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
c3fecc82ade6 standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 4
diff changeset
     1
/**
c3fecc82ade6 standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 4
diff changeset
     2
 * test/demos/pmc/include/pmc.h
c3fecc82ade6 standard tags for git projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 4
diff changeset
     3
 * Copyright (C) 2008 Markus Broeker
4
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
 */
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
#ifndef PMC_H
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
#define PMC_H
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
#include <iostream>
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
#include <object.h>
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
namespace pmc {
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
    class Vector:public Object {
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
      private:
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
        int x;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
        int y;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
        int z;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    18
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
      public:
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
        enum Mode { DEG, RAD, GRAD };
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
          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
    23
          virtual ~ Vector ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    24
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    25
        int X ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    26
        int Y ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    27
        int Z ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    28
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    29
        Vector operator+ (Vector);
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
        int operator* (Vector);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    32
        double abs ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    33
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    34
        void vector ();
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    35
        double angle (Vector);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    36
        void setMode (Mode m = RAD);
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    37
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    38
      private:
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    39
          Mode mode;
236f8f747073 pimp my code, a small xdemo
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    40
    };
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
#endif