mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Implement the use of the new vmap3-format by Lynx3d (mad props to you for this, and thanks for the talks earlier) + reduced Vmap size to less than one third, and improve precision + indoor/outdoor check which allows automatic unmounting of players + additional area information from WMOAreaTable.dbc, removed existing "hacks" + WMO liquid information for swimming and fishing correctly in buildings/cities/caves/instances (lava and slime WILL hurt from now on!) - buildfiles for windows are not properly done, and will need to be sorted out NOTE: Do NOT annoy Lynx3d about this, any issues with this "port" is entirely our fault ! THIS REVISION IS CONSIDERED UNSTABLE AND CONTAINS WORK IN PROGRESS - USE AT YOUR OWN RISK! --HG-- branch : trunk
75 lines
1.4 KiB
C++
75 lines
1.4 KiB
C++
/**
|
|
@file PhysicsFrame.h
|
|
|
|
@maintainer Morgan McGuire, http://graphics.cs.williams.edu
|
|
|
|
@created 2002-07-08
|
|
@edited 2006-01-10
|
|
*/
|
|
|
|
#ifndef G3D_PHYSICSFRAME_H
|
|
#define G3D_PHYSICSFRAME_H
|
|
|
|
#include "G3D/platform.h"
|
|
#include "G3D/Vector3.h"
|
|
#include "G3D/Matrix3.h"
|
|
#include "G3D/Quat.h"
|
|
#include "G3D/CoordinateFrame.h"
|
|
#include <math.h>
|
|
#include <string>
|
|
|
|
|
|
namespace G3D {
|
|
|
|
/**
|
|
An RT transformation using a quaternion; suitable for
|
|
physics integration.
|
|
|
|
This interface is in "Beta" and will change in the next release.
|
|
*/
|
|
class PhysicsFrame {
|
|
public:
|
|
|
|
Quat rotation;
|
|
|
|
/**
|
|
Takes object space points to world space.
|
|
*/
|
|
Vector3 translation;
|
|
|
|
/**
|
|
Initializes to the identity frame.
|
|
*/
|
|
PhysicsFrame();
|
|
|
|
/**
|
|
Purely translational force
|
|
*/
|
|
PhysicsFrame(const Vector3& translation) : translation(translation) {}
|
|
|
|
PhysicsFrame(const CoordinateFrame& coordinateFrame);
|
|
|
|
/** Compose: create the transformation that is <I>other</I> followed by <I>this</I>.*/
|
|
PhysicsFrame operator*(const PhysicsFrame& other) const;
|
|
|
|
virtual ~PhysicsFrame() {}
|
|
|
|
CoordinateFrame toCoordinateFrame() const;
|
|
|
|
/**
|
|
Linear interpolation (spherical linear for the rotations).
|
|
*/
|
|
PhysicsFrame lerp(
|
|
const PhysicsFrame& other,
|
|
float alpha) const;
|
|
|
|
void deserialize(class BinaryInput& b);
|
|
|
|
void serialize(class BinaryOutput& b) const;
|
|
|
|
};
|
|
|
|
} // namespace
|
|
|
|
#endif
|