Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #pragma once
00029 #ifndef OBJTREE_TYPES_H
00030 #define OBJTREE_TYPES_H
00031
00032 #include <vector>
00033
00034 namespace objtree
00035 {
00036
00041 struct Point
00042 {
00043 float x, y, z;
00044
00045 Point(float x, float y, float z) : x(x), y(y), z(z) {}
00046 Point(const Point &p) : x(p.x), y(p.y), z(p.z) {}
00047 Point() {}
00048
00049 Point operator-(const Point &p) const { return Point(x-p.x, y-p.y, z-p.z); }
00050 Point operator+(const Point &p) const { return Point(x+p.x, y+p.y, z+p.z); }
00051 void operator/=(float num) { x/=num; y/=num; z/=num; }
00052 Point operator/(float num) const { return Point(x/num, y/num, z/num); }
00053 };
00054
00055 typedef Point Vector;
00056 typedef std::vector<Point> Polygon;
00057
00058 struct Vector4f
00059 {
00060 float x, y, z, w;
00061
00062 Vector4f(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {}
00063 Vector4f(const Vector4f &v) : x(v.x), y(v.y), z(v.z), w(v.w) {}
00064 Vector4f() {}
00065 };
00066
00067 }
00068
00069 #endif // OBJTREE_TYPES_H
srs_env_model
Author(s): Vit Stancl (stancl@fit.vutbr.cz), Tomas Lokaj, Jan Gorig, Michal Spanel (spanel@fit.vutbr.cz)
autogenerated on Sun Jan 5 2014 11:50:50