diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-08-23 16:41:54 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-08-23 16:41:54 +0200 |
| commit | 4a29c73403c4dc713a8a31cb96289adff2b910c1 (patch) | |
| tree | de0c6b191031bac7fb2764edb2a81382a331f81c /dep/g3dlite/source/Cylinder.cpp | |
| parent | b90329d63acaecb1f074dd2b303561baa9f639a2 (diff) | |
| parent | 1255434882777053bca06656786abc1a598deda9 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'dep/g3dlite/source/Cylinder.cpp')
| -rw-r--r-- | dep/g3dlite/source/Cylinder.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/dep/g3dlite/source/Cylinder.cpp b/dep/g3dlite/source/Cylinder.cpp index 7a7b9f9440d..32d14e96bb8 100644 --- a/dep/g3dlite/source/Cylinder.cpp +++ b/dep/g3dlite/source/Cylinder.cpp @@ -22,7 +22,7 @@ namespace G3D { Cylinder::Cylinder(class BinaryInput& b) { - deserialize(b); + deserialize(b); } @@ -31,48 +31,48 @@ Cylinder::Cylinder() { Cylinder::Cylinder(const Vector3& _p1, const Vector3& _p2, float _r) - : p1(_p1), p2(_p2), mRadius(_r) { + : p1(_p1), p2(_p2), mRadius(_r) { } void Cylinder::serialize(class BinaryOutput& b) const { - p1.serialize(b); - p2.serialize(b); - b.writeFloat64(mRadius); + p1.serialize(b); + p2.serialize(b); + b.writeFloat64(mRadius); } void Cylinder::deserialize(class BinaryInput& b) { - p1.deserialize(b); - p2.deserialize(b); - mRadius = b.readFloat64(); + p1.deserialize(b); + p2.deserialize(b); + mRadius = (float)b.readFloat64(); } Line Cylinder::axis() const { - return Line::fromTwoPoints(p1, p2); + return Line::fromTwoPoints(p1, p2); } float Cylinder::radius() const { - return mRadius; + return mRadius; } float Cylinder::volume() const { - return - (float)pi() * square(mRadius) * (p1 - p2).magnitude(); + return + (float)pi() * square(mRadius) * (p1 - p2).magnitude(); } float Cylinder::area() const { - return + return // Sides - (twoPi() * mRadius) * height() + + ((float)twoPi() * mRadius) * height() + // Caps - twoPi() * square(mRadius); + (float)twoPi() * square(mRadius); } void Cylinder::getBounds(AABox& out) const { |
