src/collision/shapes/TriangleShape.cpp
void TriangleShape::computeAABB(AABB& aabb, const Transform& transform) const {

    RP3D_PROFILE("TriangleShape::computeAABB()", mProfiler);

    const Vector3 worldPoint1 = transform * mPoints[0];
    const Vector3 worldPoint2 = transform * mPoints[1];
    const Vector3 worldPoint3 = transform * mPoints[2];

    const Vector3 xAxis(worldPoint1.x, worldPoint2.x, worldPoint3.x);
    const Vector3 yAxis(worldPoint1.y, worldPoint2.y, worldPoint3.y);
    const Vector3 zAxis(worldPoint1.z, worldPoint2.z, worldPoint3.z);
    aabb.setMin(Vector3(xAxis.getMinValue(), yAxis.getMinValue(), zAxis.getMinValue()));
    aabb.setMax(Vector3(xAxis.getMaxValue(), yAxis.getMaxValue(), zAxis.getMaxValue()));
}
// Update the AABB of a body using its collision shape
/**
 * @param[out] aabb The axis-aligned bounding box (AABB) of the collision shape
 *                  computed in world-space coordinates
 * @param transform Transform used to compute the AABB of the collision shape
 */
Update the AABB of a body using its collision shape
@param[out] aabb The axis-aligned bounding box (AABB) of the collision shape
computed in world-space coordinates
@param transform Transform used to compute the AABB of the collision shape
Update the AABB of a body using its collision shape @param [ out ] aabb The axis - aligned bounding box ( AABB ) of the collision shape computed in world - space coordinates @param transform Transform used to compute the AABB of the collision shape
void TriangleShape::computeAABB(AABB& aabb, const Transform& transform) const {
    RP3D_PROFILE("TriangleShape::computeAABB()", mProfiler);
    const Vector3 worldPoint1 = transform * mPoints[0];
    const Vector3 worldPoint2 = transform * mPoints[1];
    const Vector3 worldPoint3 = transform * mPoints[2];
    const Vector3 xAxis(worldPoint1.x, worldPoint2.x, worldPoint3.x);
    const Vector3 yAxis(worldPoint1.y, worldPoint2.y, worldPoint3.y);
    const Vector3 zAxis(worldPoint1.z, worldPoint2.z, worldPoint3.z);
    aabb.setMin(Vector3(xAxis.getMinValue(), yAxis.getMinValue(), zAxis.getMinValue()));
    aabb.setMax(Vector3(xAxis.getMaxValue(), yAxis.getMaxValue(), zAxis.getMaxValue()));
}
void TriangleShape :: computeAABB ( AABB & aabb , const Transform & transform ) const { RP3D_PROFILE ( " " , mProfiler ) ; const Vector3 worldPoint1 = transform * mPoints [ 0 ] ; const Vector3 worldPoint2 = transform * mPoints [ 1 ] ; const Vector3 worldPoint3 = transform * mPoints [ 2 ] ; const Vector3 xAxis ( worldPoint1 . x , worldPoint2 . x , worldPoint3 . x ) ; const Vector3 yAxis ( worldPoint1 . y , worldPoint2 . y , worldPoint3 . y ) ; const Vector3 zAxis ( worldPoint1 . z , worldPoint2 . z , worldPoint3 . z ) ; aabb . setMin ( Vector3 ( xAxis . getMinValue ( ) , yAxis . getMinValue ( ) , zAxis . getMinValue ( ) ) ) ; aabb . setMax ( Vector3 ( xAxis . getMaxValue ( ) , yAxis . getMaxValue ( ) , zAxis . getMaxValue ( ) ) ) ; }
Update the AABB of a body using its collision shape
 @param[out] aabb The axis-aligned bounding box (AABB) of the collision shape
                  computed in world-space coordinates
 @param transform Transform used to compute the AABB of the collision shape
Update the AABB of a body using its collision shape @param [ out ] aabb The axis - aligned bounding box ( AABB ) of the collision shape computed in world - space coordinates @param transform Transform used to compute the AABB of the collision shape