32 void Foam::triSurface::writeAC(Ostream& os)
const 39 static scalar colourMap[] =
60 os <<
"AC3Db" <<
endl;
64 const word& pName = myPatches[patchI].name();
66 label colourI = patchI % 8;
67 label colourCompI = 3 * colourI;
69 os <<
"MATERIAL \"" << pName <<
"Mat\" rgb " 70 << colourMap[colourCompI] <<
' ' << colourMap[colourCompI+1]
71 <<
' ' << colourMap[colourCompI+2]
72 <<
" amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10" 77 os <<
"OBJECT world" << endl
78 <<
"kids " << myPatches.size() <<
endl;
87 const surfacePatch& sp = myPatches[patchI];
89 os <<
"OBJECT poly" << endl
90 <<
"name \"" << sp.name() <<
'"' <<
endl;
98 const label faceI = faceMap[faceIndex++];
100 include[faceI] =
true;
110 os <<
"numvert " << patch.nPoints() <<
endl;
112 forAll(patch.localPoints(), ptI)
114 const point& pt = patch.localPoints()[ptI];
116 os << pt.
x() <<
' ' << pt.y() <<
' ' << pt.z() <<
endl;
119 os <<
"numsurf " << patch.localFaces().size() <<
endl;
121 forAll(patch.localFaces(), faceI)
123 const labelledTri&
f = patch.localFaces()[faceI];
125 os <<
"SURF 0x20" << endl
126 <<
"mat " << patchI << endl
127 <<
"refs " << f.size() <<
endl;
129 os << f[0] <<
" 0 0" <<
endl;
130 os << f[1] <<
" 0 0" <<
endl;
131 os << f[2] <<
" 0 0" <<
endl;
134 os <<
"kids 0" <<
endl;
vector point
Point is a vector.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
triSurface()
Construct null.
List< surfacePatch > surfacePatchList
Ostream & endl(Ostream &os)
Add newline and flush stream.
triSurface subsetMesh(const boolList &include, labelList &pointMap, labelList &faceMap) const
Return new surface. Returns pointMap, faceMap from.
Istream and Ostream manipulators taking arguments.
List< label > labelList
A List of labels.
label size() const
Return the number of elements in the UList.
List< bool > boolList
Bool container classes.