mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: OBJstream: add line with normals
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -241,6 +241,20 @@ Foam::Ostream& Foam::OBJstream::write(const linePointRef& ln)
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::OBJstream::write
|
||||
(
|
||||
const linePointRef& ln,
|
||||
const vector& n0,
|
||||
const vector& n1
|
||||
)
|
||||
{
|
||||
write(ln.start(), n0);
|
||||
write(ln.end(), n1);
|
||||
write("l ") << nVertices_-1 << ' ' << nVertices_ << nl;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::OBJstream::write
|
||||
(
|
||||
const triPointRef& f,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,7 +92,7 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the name of the stream
|
||||
//- Return the number of vertices written
|
||||
label nVertices() const
|
||||
{
|
||||
return nVertices_;
|
||||
@ -135,6 +135,14 @@ public:
|
||||
//- Write line
|
||||
Ostream& write(const linePointRef&);
|
||||
|
||||
//- Write line with points and vector normals ('vn')
|
||||
Ostream& write
|
||||
(
|
||||
const linePointRef&,
|
||||
const vector& n0,
|
||||
const vector& n1
|
||||
);
|
||||
|
||||
//- Write triangle as points with lines or filled polygon
|
||||
Ostream& write(const triPointRef&, const bool lines = true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user