📄 segtest.html
字号:
<title>segment - test example</title>
<h1>Test Example for Segment Description</h1>
<P>If you want that the <A HREF="outtest.html">test output</A> works
correctly, you of course have to define the colors. That means, we
need an instance of the class <B>wzSegmentDescription</B>. This
instance has to be initialized before the call of <A
HREF="cogoutput.hxx"> cogOutput</A>.
<P>For this purpose we define here a derived class
<B>wzSegmentTest</B> so that the constructor initializes the colors.
Then we declare one instance <B>test</B> as a static variable.
<P>If this file will be included into the <A HREF="test.html"> main
program</A> before <B>main()</B>, the colors will be initialized.
<P>You can replace this segment description by other test code with
the following command:
<P>> use seg <B>opt</B>
<P>Here, <B>opt</B> denotes one of the following options:
<UL>
<LI> without option, this default will be recovered. Moreover, you
see the actual list of options. Mail me if the list below is invalid;
</UL>
<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",wzFace(i));
}
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, before the output one instance of <B>wzSegmentTest</B> has to
be defined. This calls the constructor. Only after this, the colors,
names and materials are appropriately initialized.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -