aboutsummaryrefslogtreecommitdiff
path: root/dep/src/g3dlite/Vector4int8.cpp
diff options
context:
space:
mode:
authorXanadu <none@none>2010-07-20 02:49:28 +0200
committerXanadu <none@none>2010-07-20 02:49:28 +0200
commit79622802f397258ee0f34327ba3ae6977ca3e7ff (patch)
tree1868946c234ab9ee256a6b7766a15713eae94235 /dep/src/g3dlite/Vector4int8.cpp
parent7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff)
parentf906976837502fa5aa81b982b901d1509f5aa0c4 (diff)
Merge. Revision history for source files should be all back now.
--HG-- branch : trunk rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'dep/src/g3dlite/Vector4int8.cpp')
-rw-r--r--dep/src/g3dlite/Vector4int8.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/dep/src/g3dlite/Vector4int8.cpp b/dep/src/g3dlite/Vector4int8.cpp
deleted file mode 100644
index 70bd143e01d..00000000000
--- a/dep/src/g3dlite/Vector4int8.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- @file Vector4int8.cpp
-
- Homogeneous vector class.
-
- @maintainer Morgan McGuire, http://graphics.cs.williams.edu
-
- @created 2007-02-09
- @edited 2007-02-09
-
- Copyright 2000-2007, Morgan McGuire.
- All rights reserved.
- */
-
-#include "G3D/platform.h"
-#include "G3D/Vector4int8.h"
-#include "G3D/Vector3.h"
-#include "G3D/Vector4.h"
-#include "G3D/BinaryInput.h"
-#include "G3D/BinaryOutput.h"
-#include <string>
-
-namespace G3D {
-
-Vector4int8::Vector4int8(const Vector4& source) {
- x = iClamp(iRound(source.x), -128, 127);
- y = iClamp(iRound(source.y), -128, 127);
- z = iClamp(iRound(source.z), -128, 127);
- w = iClamp(iRound(source.w), -128, 127);
-}
-
-Vector4int8::Vector4int8(const Vector3& source, int8 w) : w(w) {
- x = iClamp(iRound(source.x), -128, 127);
- y = iClamp(iRound(source.y), -128, 127);
- z = iClamp(iRound(source.z), -128, 127);
-}
-
-Vector4int8::Vector4int8(class BinaryInput& b) {
- deserialize(b);
-}
-
-void Vector4int8::serialize(class BinaryOutput& b) const {
- // Intentionally write individual bytes to avoid endian issues
- b.writeInt8(x);
- b.writeInt8(y);
- b.writeInt8(z);
- b.writeInt8(w);
-}
-
-void Vector4int8::deserialize(class BinaryInput& b) {
- x = b.readInt8();
- y = b.readInt8();
- z = b.readInt8();
- w = b.readInt8();
-}
-
-} // namespace G3D
-