Functions | |
HC_KEY | Insert_Cutting_Plane (double a, double b, double c, double d) |
HC_KEY | DInsert_Cutting_Plane (double a, double b, double c, double d) |
HC_KEY Insert_Cutting_Plane | ( | double | a, |
double | b, | ||
double | c, | ||
double | d | ||
) |
Creates a special geometric object that "cuts away" part of the normal scene.
a | - The parameters of an equation of the form ax + by + cz + d = 0, defining a plane. |
b | - As above. |
c | - As above. |
d | - As above. |
3D objects can be hard to comprehend when depicted on a 2D computer screen. One of the techniques to aid understanding is to slice the object open. When inserted with other geometry in a HOOPS Visualize scene, a cutting plane will cause all geometry on the "open" side of the plane to vanish.
A HOOPS Visualize "scene" is the segment tree and all the geometry within a single HOOPS Visualize window. Cutting planes can be anywhere in the segment tree - they will still apply to the whole scene (with the exceptions noted below.) This allows the cutting plane to have its own attribute context - most importantly, segment name and current modelling matrix. It is the same rule followed by light sources.
Planes have two sides. If you consider the (a,b,c) part of the plane equation as a vector pointing out of the plane, that vector is normal to the plane and is, by convention, pointing out into the open cut-away territory. The side of the plane "behind" the normal vector is, by convention, the part of the scene retained by the cutting action.
There is no predefined limit to the number of cutting planes that can be in a scene. However, there might be some limit as to how many planes can be handled by the hardware before the system has to switch to software mode. See the "hardware cutting planes" in Show_Device_Info() for details. Cutting planes have no effect on each other - geometry is removed if it is cut away by any plane.
There is a small performance penalty when using cutting planes.
Cutting planes do not act within a marker symbol, a wide line, or a single text character (unless the text is fully-transformable.)
There are a few exceptions to the cutting action. First, lights are completely exempted - they are never cut away. Second, if "cutting plane" visibility is "off" for the branch of the segment tree in which the cutting plane is located, the cutting plane is turned off completely. Finally, if "cutting plane" visibility is "off" for a branch of the tree in which regular geometry is located, that geometry will not "receive" cutting planes: it will be exempted from being cut. This permits a partial cut-away to be drawn.
The "local cutting planes" rendering option (see Set_Rendering_Options()), if active where the cutting plane was inserted, will cause the cutting plane to only affect geometry below its owning segment. By default, cutting planes are not local.
Although this function accepts double values, they are truncated to float internally. To explicitly use double values, use DInsert_Cutting_Plane.
On some devices setting the "no clipping" heuristic may have the side effect of disabling cutting planes.
Cutting planes cannot be scaled by 0, and will show numerical problems if scaled by very small values.
HC_KEY DInsert_Cutting_Plane | ( | double | a, |
double | b, | ||
double | c, | ||
double | d | ||
) |
Similar to Insert_Cutting_Plane(), but accepts parameters of type double for increased precision.
a | - The parameters of an equation of the form ax + by + cz + d = 0, defining a plane. |
b | - As above. |
c | - As above. |
d | - As above. |
No additional details. See Insert_Cutting_Plane().