2017-04-11 20:57:10 +05:30
|
|
|
#ifndef __PLANES_H__
|
|
|
|
#define __PLANES_H__
|
|
|
|
|
2017-04-07 20:49:51 +05:30
|
|
|
#include "worldspawn.h"
|
|
|
|
#include <Eigen/Core>
|
|
|
|
#include <Eigen/Geometry>
|
|
|
|
|
|
|
|
struct TPlanePoints {
|
|
|
|
Eigen::Vector3f m_A;
|
|
|
|
Eigen::Vector3f m_B;
|
|
|
|
Eigen::Vector3f m_C;
|
|
|
|
std::string m_material;
|
|
|
|
};
|
|
|
|
|
|
|
|
Eigen::Vector3f get_polygon_normal(const Eigen::Vector3f*, const size_t);
|
|
|
|
|
|
|
|
Eigen::Vector3f get_center(const Eigen::Vector3f*, const size_t);
|
|
|
|
|
|
|
|
float get_width(const Eigen::Vector3f*, const size_t, const Eigen::Vector3f);
|
|
|
|
|
|
|
|
Eigen::Vector3f get_tangent(const Eigen::Vector3f*, float);
|
|
|
|
|
|
|
|
Eigen::Vector3f get_bitangent(const Eigen::Vector3f&, const Eigen::Vector3f&, float);
|
|
|
|
|
|
|
|
TPlanePoints GetPlanePoints(const Eigen::Vector3f*, const size_t);
|
|
|
|
|
|
|
|
std::vector<TPlanePoints> GetBrushPlanes(const TBrush&);
|
|
|
|
|
|
|
|
#endif
|