4 #include <unordered_map>
6 #include <reactphysics3d/mathematics/Vector3.h>
16 using std::unordered_map;
46 return reactphysics3d::Vector3(vector.
getX(), vector.
getY(), vector.
getZ());
58 return Vector3(vectorTransformed.x, vectorTransformed.y, vectorTransformed.z);
70 normalTransformed.normalize();
71 return Vector3(normalTransformed.x, normalTransformed.y, normalTransformed.z);
Representation of a 3D model.
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
Bounding volume interface.
reactphysics3d::Transform collisionShapeLocalTransform
reactphysics3d::Transform collisionShapeTransform
Capsule physics primitive.
Convex mesh physics primitive.
Oriented bounding box physics primitive.
Sphere physics primitive.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Helper class to create models from physics primitive bounding volumes.
static void setupConvexMeshMaterial(const unordered_map< string, Node * > &nodes, Material *material)
Set up convex mesh material.
static constexpr int32_t SPHERE_SEGMENTS_X
static Vector3 transformVector3(BoundingVolume *boundingVolume, const reactphysics3d::Vector3 &vector)
Transforms a given ReactPhysics3D vector with bounding volume transform.
static void setupConvexMeshModel(Model *model)
Set up a convex mesh model.
static Model * createBoundingBoxModel(BoundingBox *boundingBox, const string &id)
Creates a model from bounding box.
static Model * createSphereModel(Sphere *sphere, const string &id, int32_t segmentsX, int32_t segmentsY)
Creates a model from oriented bounding box.
static Vector3 transformVector3Normal(BoundingVolume *boundingVolume, const reactphysics3d::Vector3 &normal)
Transforms a given ReactPhysics3D vector with bounding volume transform.
static constexpr int32_t SPHERE_SEGMENTS_Y
static Model * createModel(BoundingBox *boundingVolume, const string &id)
Creates a model from bounding volume.
static Model * createConvexMeshModel(ConvexMesh *mesh, const string &id)
Creates a model from convex mesh.
static Model * createOrientedBoundingBoxModel(OrientedBoundingBox *orientedBoundingBox, const string &id)
Creates a model from oriented bounding box.
static constexpr int32_t CAPSULE_SEGMENTS_Y
static constexpr int32_t CAPSULE_SEGMENTS_X
static Model * createCapsuleModel(Capsule *capsule, const string &id, int32_t segmentsX, int32_t segmentsY)
Creates a model from capsule.
static reactphysics3d::Vector3 toRP3DVector3(const Vector3 &vector)
Converts a TDME2 vector to ReactPhysics3D vector.