diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-23 19:51:06 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-23 19:51:06 +0000 |
commit | 5c96b74c76b881b1533432a75d1a8cc42ecc5bda (patch) | |
tree | a1500e0149ba03d017dd5fdb169a6538a7a06a61 /src/model/plane.h | |
parent | 1cf82068a2adff7c401fe0aba73466f045e460d3 (diff) |
fragment renderer
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; |