diff options
Diffstat (limited to 'src/model/plane.h')
-rw-r--r-- | src/model/plane.h | 55 |
1 files changed, 41 insertions, 14 deletions
diff --git a/src/model/plane.h b/src/model/plane.h index 5a8e6b6..6c19a5a 100644 --- a/src/model/plane.h +++ b/src/model/plane.h @@ -25,28 +25,55 @@ public: Plane(math::Vector3f const & point0, math::Vector3f const &point1, math::Vector3f const &point2); /// copy constructor Plane(Plane const & other); - + /// normal of the plane, not normalized to lenght 1 - inline math::Vector3f const & normal() const { return plane_normal; } - /// the points defining the plane. + inline math::Vector3f const & normal() const + { + return plane_normal; + } + /// the points defining the plane. /// @param i 0 <= i < 3 - inline math::Vector3f const & point(size_t i) const { return plane_point[i]; } - /// plane texture - inline std::string & texture() { return plane_texture; } + inline math::Vector3f const & point(size_t i) const + { + return plane_point[i]; + } + /// plane texture + inline std::string & texture() + { + return plane_texture; + } /// first parameter of the general equation - inline float a() const { return plane_normal[0]; } + inline float a() const + { + return plane_normal[0]; + } /// second parameter of the general equation - inline float b() const { return plane_normal[1]; } + inline float b() const + { + return plane_normal[1]; + } /// third param of the general equation - inline float c() const { return plane_normal[2]; } + inline float c() const + { + return plane_normal[2]; + } /// fourth parameter of the general equation - inline float d() const { return pd; } + inline float d() const + { + return pd; + } /// indidcates if this plane was generated from a detail brush - inline bool & detail() { return plane_detail; } + inline bool & detail() + { + return plane_detail; + } /// surface flags - inline unsigned int & surface_flags() { return plane_surface_flags; } - - + inline unsigned int & surface_flags() + { + return plane_surface_flags; + } + + private: math::Vector3f plane_point[3]; math::Vector3f plane_normal; |