Skip to content

Commit

Permalink
Added PhysX docs, only internal
Browse files Browse the repository at this point in the history
  • Loading branch information
SAbbeF committed Jan 31, 2024
1 parent 8e2587a commit 3a80c19
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/API Reference/Physics/Internal/PhysXUtils/Defines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Defines

```c++
#define TEMP_PX_RELEASE(x) \
if(x != nullptr) \
x->release();\
x = nullptr
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# FromPhysXMatrix

```c++
Matrix FromPhysXMatrix(const physx::PxMat44& aMatrix);
```
Converts PhysX Matrix to SimpleMath Matrix.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# FromPhysXQuat

```c++
Quaternion FromPhysXQuat(const physx::PxQuat& aQuaternion);
```
Converts PhysX Quaternion to SimpleMath Quaternion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# FromPhysXTransform

```c++
Matrix FromPhysXTransform(const physx::PxTransform& aTransform);
```
Converts PhysX Transform to SimpleMath Matrix.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# FromPhysXVector

```c++
Vector3 FromPhysXVector(const physx::PxVec3& aVector);
Vector4 FromPhysXVector(const physx::PxVec4& aVector);
```
Converts PhysX Vector3/Vector4 to SimpleMath Vector3/Vector4.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ToPhysXMatrix

```c++
physx::PxMat44 ToPhysXMatrix(const Matrix& aMatrix);
```
Converts SimpleMath Matrix to PhysX Matrix.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ToPhysXQuat

```c++
physx::PxQuat ToPhysXQuat(const Quaternion& aQuaterion);
```
Converts SimpleMath Quaternion to PhysX Quaternion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ToPhysXTransform

```c++
physx::PxTransform ToPhysXTransform(const Transform& aTransform);
physx::PxTransform ToPhysXTransform(const Matrix& aTransform);
physx::PxTransform ToPhysXTransform(const Vector3& aTranslation, const Vector3& aRotation);
```
Converts Engine Transform Component/Matrix/Translation & Rotation to PhysX Transform.
### Usage
```c++
//Functions that take physx transfrom
physx::PxPhysics::createRigidStatic( PhysXUtils::ToPhysXTransform( *myGameObject->GetComponent<Transform>() ) );
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ToPhysXVector

```c++
physx::PxVec3 ToPhysXVector(const Vector3& aVector);
physx::PxVec4 ToPhysXVector(const Vector4& aVector);
```
Converts SimpleMath Vector3/Vector4 to PhysX Vector3/Vector4.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# GetGameObjectID

```c++
uint64_t GetGameObjectID() {return myGameObjectID;}
```
Returns GameObjectID associated with the actor
11 changes: 11 additions & 0 deletions docs/API Reference/Physics/PhysicsActor/Functions/Rotate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Rotate

```c++
void Rotate(const Vector3& aRotation);
```
### Paramter
aRotation - Rotation in radian
Rotates the actor in world space,

0 comments on commit 3a80c19

Please sign in to comment.