30 const VertUVCoords *
uvMap =
nullptr;
39 const AffineXf3d *
xf =
nullptr;
46inline Vector3f
applyFloat(
const AffineXf3d * xf,
const Vector3f & p )
48 return xf ? Vector3f( (*xf)( Vector3d( p ) ) ) : p;
52inline Vector3f
applyFloat(
const Matrix3d * m,
const Vector3f & n )
54 return m ? Vector3f( *m * Vector3d( n ) ) : n;
58inline Vector3d
applyDouble(
const AffineXf3d * xf,
const Vector3f & p )
61 return xf ? (*xf)( pd ) : pd;
65inline Vector3d
applyDouble(
const Matrix3d * m,
const Vector3f & n )
68 return m ? *m * nd : nd;
87 return vert2packed_.
empty() ? (int)v : vert2packed_[v];
97MRMESH_API const VertCoords &
transformPoints(
const VertCoords & verts,
const VertBitSet & validVerts,
const AffineXf3d * xf, VertCoords & buf,
102MRMESH_API const VertNormals &
transformNormals(
const VertNormals & normals,
const VertBitSet & validVerts,
const Matrix3d * m, VertNormals & buf );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
std::vector<T>-like container that requires specific indexing type,
Definition MRMesh/MRVector.h:20
bool empty() const
Definition MRMesh/MRVector.h:40
maps valid points to packed sequential indices
Definition MRMesh/MRSaveSettings.h:73
MRMESH_API VertRenumber(const VertBitSet &validVerts, bool saveValidOnly)
prepares the mapping
int sizeVerts() const
return the total number of vertices to be saved
Definition MRMesh/MRSaveSettings.h:81
int operator()(VertId v) const
return packed index (if saveValidOnly = true) or same index (if saveValidOnly = false)
Definition MRMesh/MRSaveSettings.h:84
bool saveValidOnly() const
Definition MRMesh/MRSaveSettings.h:78
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:626
Vector3f applyFloat(const AffineXf3d *xf, const Vector3f &p)
returns the point as is or after application of given transform to it in double precision
Definition MRMesh/MRSaveSettings.h:46
Vector3d applyDouble(const AffineXf3d *xf, const Vector3f &p)
converts given point in double precision and applies given transformation to it
Definition MRMesh/MRSaveSettings.h:58
MRMESH_API const VertNormals & transformNormals(const VertNormals &normals, const VertBitSet &validVerts, const Matrix3d *m, VertNormals &buf)
MRMESH_API const VertCoords & transformPoints(const VertCoords &verts, const VertBitSet &validVerts, const AffineXf3d *xf, VertCoords &buf, const VertRenumber *vertRenumber=nullptr)
Definition MRMeshTexture.h:13
determines how to save points/lines/mesh
Definition MRMesh/MRSaveSettings.h:14
bool saveValidOnly
Definition MRMesh/MRSaveSettings.h:17
const MeshTexture * texture
optional texture to save with the geometry
Definition MRMesh/MRSaveSettings.h:33
ProgressCallback progress
to report save progress and cancel saving if user desires
Definition MRMesh/MRSaveSettings.h:42
bool rearrangeTriangles
Definition MRMesh/MRSaveSettings.h:24
std::string materialName
used to save texture and material in some formats (obj)
Definition MRMesh/MRSaveSettings.h:36
const VertColors * colors
optional per-vertex color to save with the geometry
Definition MRMesh/MRSaveSettings.h:27
const VertUVCoords * uvMap
optional per-vertex uv coordinate to save with the geometry
Definition MRMesh/MRSaveSettings.h:30
const AffineXf3d * xf
this transformation can optionally be applied to all vertices (points) of saved object
Definition MRMesh/MRSaveSettings.h:39