Brief Index      Full Index      Events Index      I.M. Reference

Compute_Transformed_Plane


Functions

HC_BOOLEAN Compute_Transformed_Plane (const HC_PLANE *plane, const float *matrix, HC_PLANE *out_plane)
HC_BOOLEAN DCompute_Transformed_Plane (const HC_DPLANE *plane, const double *matrix, HC_DPLANE *out_plane)
HC_BOOLEAN Compute_Transformed_Planes (int count, const HC_PLANE *planes, const float *matrix, HC_PLANE *out_planes)
HC_BOOLEAN DCompute_Transformed_Planes (int count, const HC_DPLANE *planes, const float *matrix, HC_DPLANE *out_planes)

Function Documentation

HC_BOOLEAN Compute_Transformed_Plane ( const HC_PLANE *  plane,
const float *  matrix,
HC_PLANE *  out_plane 
)

Applies a user-defined transform to a single plane.

Parameters:
plane - Input plane equation parameters (a,b,c,d).
matrix - Input transformation matrix.
out_plane - Plane equation parameters (a,b,c,d ). Returned to caller. Can point to the same place as plane.
Returns:
True if the calculation was a success

DETAILS

Compute_Transformed_Plane() accepts a general 4x4 matrix, inverts it, multiplies it on the right by the plane equation, and normalizes the result. This action produces a new plane equation. The first three values of the transformed plane represent the transformed normal vector. If the matrix or the transformed plane is singular, false is returned and out_plane is unchanged. If you have many planes to convert it might be more efficient to invert the matrix (or, better, to find the adjoint) once, then multiply the planes through it by hand.

NOTES

Since by nature a plane transform involves a (expensive) matrix adjoint calculation, it is important for performance reasons to use the Compute_Transformed_Planes() variant whenever you have a large number of planes that need to be transformed by the same matrix.

See also:
Compute_Coordinates, Compute_Polygon_Plane, Compute_Transform, Set_Modelling_Matrix, Show_Device_Info, Show_Geometry_Pointer, Show_Polygon, Show_Shell.

HC_BOOLEAN DCompute_Transformed_Plane ( const HC_DPLANE *  plane,
const double *  matrix,
HC_DPLANE *  out_plane 
)

Similar to Compute_Transformed_Plane(), but operates on double-precision data.

Parameters:
plane - Input plane equation parameters (a, b, c, d).
matrix - Input transformation matrix.
out_plane - Plane equation parameters (a, b, c, d). Returned to caller. Can point to the same place as plane.
Returns:
True if the calculation was a success

HC_BOOLEAN Compute_Transformed_Planes ( int  count,
const HC_PLANE *  planes,
const float *  matrix,
HC_PLANE *  out_planes 
)

Applies a user-defined transform to a group of planes.

Parameters:
count - Number of plane equations in planes
planes - A 4 x count array of plane equation parameters (a, b, c, d).
matrix - Input transformation matrix.
out_planes - Plane equation parameters (a, b, c, d). Returned to planes the caller. Can point to the same place as plane.
Returns:
True if the calculation was a success

DETAILS

No additional details. See Compute_Transformed_Plane()

HC_BOOLEAN DCompute_Transformed_Planes ( int  count,
const HC_DPLANE *  planes,
const float *  matrix,
HC_DPLANE *  out_planes 
)

Applies a user-defined transform to a group of planes.

Parameters:
count - Number of plane equations in planes
planes - A 4 x count array of plane equation parameters (a,b,c,d).
matrix - Input transformation matrix.
out_planes - Plane equation parameters (a, b, c, d). Returned to planes the caller. Can point to the same place as plane.
Returns:
True if the calculation was a success

DETAILS

No additional details. See Compute_Transformed_Plane()

Brief Index      Full Index      Events Index      I.M. Reference