📄 segmattest.html
字号:
<title>segment - test example</title>
<h1>Test Example for Segment Description</h1>
<P>The output functions do not use (per default) the region number,
but the material number.
<P>Per default, the material <B>wzRegion::material()</B> is the same
as the region. But it can be modified. This allows to manipulate the
output.
<P>At first, we copy <A HREF="segtest.html"> default test code</A>:
<PRE>
#include "<A HREF="wzsegment.hxx">wzsegment.hxx</A>"
class test_segment_description: public wzSegmentDescription
{
public:
test_segment_description();
};
test_segment_description::test_segment_description()
:wzSegmentDescription()
{
int i; wzRegion r; wzFace f; wzEdge e; wzVertex v;
r = wzRegion("default region");
f = wzFace("default face");
e = wzEdge("default edge");
v = wzVertex("default vertex");
for(i=2;i<64;i++){
r = wzRegion("unknown region");
f = wzFace("unknown face");
}
wzRegion( 1).color()="#099011311";
wzRegion( 2).color()="#201000";
wzRegion( 3).color()="#000300611";
wzRegion( 4).color()="#111111111";
wzRegion( 5).color()="#b11a00155";
wzRegion( 6).color()="#311200211";
wzRegion( 7).color()="#000d11100";
wzRegion( 8).color()="#100300111";
wzRegion( 9).color()="#300300300";
wzRegion(10).color()="#100011211";
wzRegion(11).color()="#400711911";
wzFace ( 1).color()="#099011311";
wzFace ( 2).color()="#201000";
wzFace ( 3).color()="#000300611";
wzEdge ( 1).color()="#099011311";
wzVertex( 1).color()="#099011311";
</PRE>
<P>Now, let's modify some materials:
<PRE>
wzRegion(1).material().invalidate();
wzRegion(3).material() = wzRegion(2);
}
</PRE>
<P>The default region is invalid (0), thus, now the first region will
not be shown or written out. As region 2, as region 3 will be written
out with number 2.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -