39 const VertUVCoords *
uvMap =
nullptr;
52 const AffineXf3d *
xf =
nullptr;
65inline Vector3f
applyFloat(
const AffineXf3d * xf,
const Vector3f & p )
67 return xf ? Vector3f( (*xf)( Vector3d( p ) ) ) : p;
71inline Vector3f
applyFloat(
const Matrix3d * m,
const Vector3f & n )
73 return m ? Vector3f( *m * Vector3d( n ) ) : n;
77inline Vector3d
applyDouble(
const AffineXf3d * xf,
const Vector3f & p )
80 return xf ? (*xf)( pd ) : pd;
84inline Vector3d
applyDouble(
const Matrix3d * m,
const Vector3f & n )
87 return m ? *m * nd : nd;
106 return vert2packed_.
empty() ? (int)v : vert2packed_[v];
116MRMESH_API
const VertCoords &
transformPoints(
const VertCoords & verts,
const VertBitSet & validVerts,
const AffineXf3d * xf, VertCoords & buf,
121MRMESH_API
const VertNormals &
transformNormals(
const VertNormals & normals,
const VertBitSet & validVerts,
const Matrix3d * m, VertNormals & buf );
std::vector<T>-like container that requires specific indexing type,
Definition MRVector.h:23
maps valid points to packed sequential indices
Definition MRSaveSettings.h:92
MRMESH_API VertRenumber(const VertBitSet &validVerts, bool saveValidOnly)
prepares the mapping
const MeshTexture * texture
optional texture to save with the geometry
Definition MRSaveSettings.h:46
ProgressCallback progress
to report save progress and cancel saving if user desires
Definition MRSaveSettings.h:61
std::optional< Color > solidColor
the color of whole object
Definition MRSaveSettings.h:58
int sizeVerts() const
return the total number of vertices to be saved
Definition MRSaveSettings.h:100
std::optional< LengthUnit > lengthUnit
units of input coordinates and transformation, to be serialized if the format supports it
Definition MRSaveSettings.h:55
const std::vector< Color > * primitiveColors
per-face colors for meshes, per-undirected-edge colors for polylines, unused for point clouds and oth...
Definition MRSaveSettings.h:36
std::string materialName
the name of file (UTF8 encoded) without extension to save texture in some formats (e....
Definition MRSaveSettings.h:49
int operator()(VertId v) const
return packed index (if saveValidOnly = true) or same index (if saveValidOnly = false)
Definition MRSaveSettings.h:103
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:65
bool saveValidOnly() const
Definition MRSaveSettings.h:97
const VertColors * colors
optional per-vertex color to save with the geometry
Definition MRSaveSettings.h:33
const VertUVCoords * uvMap
optional per-vertex uv coordinate to save with the geometry
Definition MRSaveSettings.h:39
Vector3d applyDouble(const AffineXf3d *xf, const Vector3f &p)
converts given point in double precision and applies given transformation to it
Definition MRSaveSettings.h:77
bool onlyValidPoints
Definition MRSaveSettings.h:23
const AffineXf3d * xf
this transformation can optionally be applied to all vertices (points) of saved object
Definition MRSaveSettings.h:52
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)
bool saveTriCornerUVCoords
Definition MRSaveSettings.h:43
bool empty() const
Definition MRVector.h:53
bool packPrimitives
Definition MRSaveSettings.h:30
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMeshTexture.h:13
determines how to save points/lines/mesh
Definition MRSaveSettings.h:20