Functions | |
void | Set_Conditions (const char *list) |
Allows the user to set conditions on a segment that will be used to determine whether or not a Conditional Style or Conditional Include should be applied. More... | |
void | UnSet_Conditions (void) |
Removes all the conditions established by a previous call to Set_Conditions(). More... | |
void | UnSet_One_Condition (const char *condition) |
Removes a given condition established by a previous call to Set_Conditions(). More... | |
void Set_Conditions | ( | const char * | list | ) |
Allows the user to set conditions on a segment that will be used to determine whether or not a Conditional Style or Conditional Include should be applied.
list | - A quoted string or a string variable containing a list of the desired conditions along with optional logical expressions. |
In certain cases it is required that the styling or inclusion of geometry into a segment be independent of its ancestry. A model of an automobile may include a single wheel assembly into four separate segments, however the brake pad may need to be highlighted in only one of the four instances. To do this one can conditionally style the particular segment that contains the highlighting colors. To do this, use Set_Condition() and Conditional_Style() together on the segment that includes the wheel. For instance:
HC_Set_Conditions("front_left"); HC_Conditional_Style("/include library/styles/highlight","front_left");
where "front left" is the condition and "/include library/styles/highlight" is the segment containing the highlight colors. When the condition is set and unset, the styling is activated and deactivated, respectively.
This example is simplistic but demonstrates that users can toggle the properties of their scene based on some predefined setup that has a name, rather than having to loop through geometry and keep track of large numbers of view attributes. This saves time and bookkeeping in large models.
Conditions can be aggregated and controlled with the logical expressions AND, OR and NOT or &&, || and !. In other words, a segment such as "/include library/styles/highlight" can be associated with numerous conditions, and the containing segment can activate an Include segment or a Style segment under many different conditions.
void UnSet_Conditions | ( | void | ) |
Removes all the conditions established by a previous call to Set_Conditions().
No additional details. See Set_Conditions()
void UnSet_One_Condition | ( | const char * | condition | ) |
Removes a given condition established by a previous call to Set_Conditions().
condition | - A quoted string or a string variable containing the desired condition to be changed. |
No additional details. See Set_Conditions()