32 void Foam::triSurface::writeAC(Ostream& os)
const 39 static scalar colourMap[] =
60 os <<
"AC3Db" <<
endl;
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
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;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< surfacePatch > surfacePatchList
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< bool > boolList
Bool container classes.
List< label > labelList
A List of labels.
Istream and Ostream manipulators taking arguments.
const geometricSurfacePatchList & patches() const
triSurface()
Construct null.
vector point
Point is a vector.
triSurface subsetMesh(const boolList &include, labelList &pointMap, labelList &faceMap) const
Return new surface. Returns pointMap, faceMap from.
label size() const
Return the number of elements in the UList.