Commit 7e3770c8 authored by monstrobishi's avatar monstrobishi

- Changed line2d getVector implementation to match line3d (Was start - end,...

 - Changed line2d getVector implementation to match line3d (Was start - end, changed it to end - start).
 - Removed default values for R, G and B for SColorf constructor and added a default constructor that mimics the default values behavior.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2410 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 17f879c7
...@@ -335,6 +335,10 @@ namespace video ...@@ -335,6 +335,10 @@ namespace video
class SColorf class SColorf
{ {
public: public:
//! Default constructor for SColorf.
/** Sets red, green and blue to 0.0f and alpha to 1.0f. */
SColorf() : r(0.0f), g(0.0f), b(0.0f), a(1.0f) {}
//! Constructs a color from up to four color values: red, green, blue, and alpha. //! Constructs a color from up to four color values: red, green, blue, and alpha.
/** \param r: Red color component. Should be a value between /** \param r: Red color component. Should be a value between
0.0f meaning no red and 1.0f, meaning full red. 0.0f meaning no red and 1.0f, meaning full red.
...@@ -346,7 +350,7 @@ namespace video ...@@ -346,7 +350,7 @@ namespace video
component defines how transparent a color should be. Has to be component defines how transparent a color should be. Has to be
a value between 0.0f and 1.0f, 1.0f means not transparent a value between 0.0f and 1.0f, 1.0f means not transparent
(opaque), 0.0f means fully transparent. */ (opaque), 0.0f means fully transparent. */
SColorf(f32 r=0.f, f32 g=0.f, f32 b=0.f, f32 a=1.f) : r(r), g(g), b(b), a(a) {} SColorf(f32 r, f32 g, f32 b, f32 a = 1.0f) : r(r), g(g), b(b), a(a) {}
//! Constructs a color from 32 bit Color. //! Constructs a color from 32 bit Color.
/** \param c: 32 bit color from which this SColorf class is /** \param c: 32 bit color from which this SColorf class is
......
...@@ -65,7 +65,7 @@ class line2d ...@@ -65,7 +65,7 @@ class line2d
//! Get the vector of the line. //! Get the vector of the line.
/** \return The vector of the line. */ /** \return The vector of the line. */
vector2d<T> getVector() const { return vector2d<T>(start.X - end.X, start.Y - end.Y); } vector2d<T> getVector() const { return vector2d<T>(end.X - start.X, end.Y - start.Y); }
//! Tests if this line intersects with another line. //! Tests if this line intersects with another line.
/** \param l: Other line to test intersection with. /** \param l: Other line to test intersection with.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment