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. |
A HOOPS "scene" is the segment tree and all the geometry within a single HOOPS 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 that light sources follow in HOOPS.
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 can be as many cutting planes as you want in a scene. There might be some limit as to how many planes can be handled in 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---other geometry is removed if it is cut away by any plane.
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.
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 and/or returns double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.
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. |