Physics3D: Rename PhysObject to RigidBody3D
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_PHYSOBJECT_HPP
|
||||
#define NAZARA_PHYSOBJECT_HPP
|
||||
#ifndef NAZARA_RIGIDBODY3D_HPP
|
||||
#define NAZARA_RIGIDBODY3D_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Enums.hpp>
|
||||
@@ -21,14 +21,14 @@ namespace Nz
|
||||
{
|
||||
class PhysWorld;
|
||||
|
||||
class NAZARA_PHYSICS3D_API PhysObject
|
||||
class NAZARA_PHYSICS3D_API RigidBody3D
|
||||
{
|
||||
public:
|
||||
PhysObject(PhysWorld* world, const Matrix4f& mat = Matrix4f::Identity());
|
||||
PhysObject(PhysWorld* world, Collider3DRef geom, const Matrix4f& mat = Matrix4f::Identity());
|
||||
PhysObject(const PhysObject& object);
|
||||
PhysObject(PhysObject&& object);
|
||||
~PhysObject();
|
||||
RigidBody3D(PhysWorld* world, const Matrix4f& mat = Matrix4f::Identity());
|
||||
RigidBody3D(PhysWorld* world, Collider3DRef geom, const Matrix4f& mat = Matrix4f::Identity());
|
||||
RigidBody3D(const RigidBody3D& object);
|
||||
RigidBody3D(RigidBody3D&& object);
|
||||
~RigidBody3D();
|
||||
|
||||
void AddForce(const Vector3f& force, CoordSys coordSys = CoordSys_Global);
|
||||
void AddForce(const Vector3f& force, const Vector3f& point, CoordSys coordSys = CoordSys_Global);
|
||||
@@ -61,16 +61,16 @@ namespace Nz
|
||||
void SetRotation(const Quaternionf& rotation);
|
||||
void SetVelocity(const Vector3f& velocity);
|
||||
|
||||
PhysObject& operator=(const PhysObject& object);
|
||||
PhysObject& operator=(PhysObject&& object);
|
||||
RigidBody3D& operator=(const RigidBody3D& object);
|
||||
RigidBody3D& operator=(RigidBody3D&& object);
|
||||
|
||||
private:
|
||||
void UpdateBody();
|
||||
static void ForceAndTorqueCallback(const NewtonBody* body, float timeStep, int threadIndex);
|
||||
static void TransformCallback(const NewtonBody* body, const float* matrix, int threadIndex);
|
||||
|
||||
Matrix4f m_matrix;
|
||||
Collider3DRef m_geom;
|
||||
Matrix4f m_matrix;
|
||||
Vector3f m_forceAccumulator;
|
||||
Vector3f m_torqueAccumulator;
|
||||
NewtonBody* m_body;
|
||||
@@ -80,4 +80,4 @@ namespace Nz
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_PHYSOBJECT_HPP
|
||||
#endif // NAZARA_RIGIDBODY3D_HPP
|
||||
Reference in New Issue
Block a user