summaryrefslogtreecommitdiff
path: root/cObject3D.h
blob: 481b9a10cb2fdecf8f2c38a9d4f726372c148ead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once

#include <vector>

#include "cObject.h"

#define _DEPTH 50

struct sCoord3d
{
  int x;
  int y;
  int z;
};

struct sVector
{
  sCoord3d origin;
  sCoord3d direction;

  char c;
  WORD color;
};

class cObject3D : cObject
{
public:

  cObject3D(unsigned int _sx, unsigned int _sy);

  virtual ~cObject3D();

  void addVector(sCoord3d _origin, sCoord3d _vector, char _char, WORD _color);

  void rotate(sCoord3d _val);

  void reset();

  void write();

protected:

  cObject3D(){}

private:

  sPos translate(sCoord3d _coord);

  std::vector<sVector> vectors;
};