27 const VertUVCoords *
uvMap =
nullptr;
36 const AffineXf3d *
xf =
nullptr;
43inline Vector3f
applyFloat(
const AffineXf3d * xf,
const Vector3f & p )
45 return xf ? Vector3f( (*xf)( Vector3d( p ) ) ) : p;
49inline Vector3f
applyFloat(
const Matrix3d * m,
const Vector3f & n )
51 return m ? Vector3f( *m * Vector3d( n ) ) : n;
55inline Vector3d
applyDouble(
const AffineXf3d * xf,
const Vector3f & p )
58 return xf ? (*xf)( pd ) : pd;
62inline Vector3d
applyDouble(
const Matrix3d * m,
const Vector3f & n )
65 return m ? *m * nd : nd;
84 return vert2packed_.
empty() ? (int)v : vert2packed_[v];
94MRMESH_API const VertCoords &
transformPoints(
const VertCoords & verts,
const VertBitSet & validVerts,
const AffineXf3d * xf, VertCoords & buf,
99MRMESH_API const VertNormals &
transformNormals(
const VertNormals & normals,
const VertBitSet & validVerts,
const Matrix3d * m, VertNormals & buf );
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
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 MRSaveSettings.h:70
MRMESH_API VertRenumber(const VertBitSet &validVerts, bool saveValidOnly)
prepares the mapping
int sizeVerts() const
return the total number of vertices to be saved
Definition MRSaveSettings.h:78
int operator()(VertId v) const
return packed index (if saveValidOnly = true) or same index (if saveValidOnly = false)
Definition MRSaveSettings.h:81
bool saveValidOnly() const
Definition MRSaveSettings.h:75
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
Definition MRCameraOrientationPlugin.h:8
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 MRSaveSettings.h:43
Vector3d applyDouble(const AffineXf3d *xf, const Vector3f &p)
converts given point in double precision and applies given transformation to it
Definition MRSaveSettings.h:55
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 MRSaveSettings.h:14
bool saveValidOnly
Definition MRSaveSettings.h:17
const MeshTexture * texture
optional texture to save with the geometry
Definition MRSaveSettings.h:30
ProgressCallback progress
to report save progress and cancel saving if user desires
Definition MRSaveSettings.h:39
bool rearrangeTriangles
Definition MRSaveSettings.h:21
std::string materialName
used to save texture and material in some formats (obj)
Definition MRSaveSettings.h:33
const VertColors * colors
optional per-vertex color to save with the geometry
Definition MRSaveSettings.h:24
const VertUVCoords * uvMap
optional per-vertex uv coordinate to save with the geometry
Definition MRSaveSettings.h:27
const AffineXf3d * xf
this transformation can optionally be applied to all vertices (points) of saved object
Definition MRSaveSettings.h:36