Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/face.h')
-rw-r--r--src/model/face.h53
1 files changed, 28 insertions, 25 deletions
diff --git a/src/model/face.h b/src/model/face.h
index 725f798..cbed101 100644
--- a/src/model/face.h
+++ b/src/model/face.h
@@ -28,59 +28,50 @@ public:
/// copy constructor
Face(Face const & other);
-
+
/// normal of the plane, not normalized to lenght 1
- inline math::Vector3f const & normal() const
- {
+ inline math::Vector3f const & normal() const {
return face_normal;
}
/// the points defining the plane.
/// @param index 0 <= i < 3
- inline math::Vector3f const & point(size_t index) const
- {
+ inline math::Vector3f const & point(size_t index) const {
return face_point[index];
}
/// face material
- inline Material *material() const
- {
+ inline Material *material() const {
return face_material;
}
/// first parameter of the general plane equation
- inline float a() const
- {
+ inline float a() const {
return face_normal[0];
}
/// second parameter of the general plane equation
- inline float b() const
- {
+ inline float b() const {
return face_normal[1];
}
/// third param of the general plane equation
- inline float c() const
- {
+ inline float c() const {
return face_normal[2];
}
/// fourth parameter of the general plane equation
- inline float d() const
- {
+ inline float d() const {
return pd;
}
/// indidcates if this plane was generated from a detail brush
- inline bool detail() const
- {
+ inline bool detail() const {
return face_detail;
}
/// surface flags
- inline unsigned int surface_flags() const
- {
+ inline unsigned int surface_flags() const {
return face_surface_flags;
}
@@ -93,22 +84,34 @@ public:
}
/// return texture shift
- inline const math::Vector2f &tex_shift() { return face_tex_shift; }
+ inline const math::Vector2f &tex_shift() {
+ return face_tex_shift;
+ }
- inline void set_material(Material *material) { face_material = material; }
+ inline void set_material(Material *material) {
+ face_material = material;
+ }
- inline void set_detail(const bool detail = true) { face_detail = detail; }
+ inline void set_detail(const bool detail = true) {
+ face_detail = detail;
+ }
- inline void set_surface_flags(const unsigned int flags) { face_surface_flags = flags; }
+ inline void set_surface_flags(const unsigned int flags) {
+ face_surface_flags = flags;
+ }
/**
* @brief return texture transformation vectors
* @param index 0 <= i < 2
*/
- inline math::Vector3f &get_tex_vec(size_t index) { return face_tex_vec[index]; }
+ inline math::Vector3f &get_tex_vec(size_t index) {
+ return face_tex_vec[index];
+ }
/// return texture shift
- inline math::Vector2f &get_tex_shift() { return face_tex_shift; }
+ inline math::Vector2f &get_tex_shift() {
+ return face_tex_shift;
+ }
private:
math::Vector3f face_normal;