Skip to content

Commit

Permalink
Small comments to improve readability of code
Browse files Browse the repository at this point in the history
  • Loading branch information
cignoni committed Aug 23, 2024
1 parent 2c835e4 commit 8c00dd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions wrap/io_trimesh/export_ply.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ namespace io {
template <class SaveMeshType>
class ExporterPLY
{
// Si occupa di convertire da un tipo all'altro.
// usata nella saveply per matchare i tipi tra stotype e memtype.
// Ad es se in memoria c'e' un int e voglio salvare un float
// src sara in effetti un puntatore a int il cui valore deve
// essere convertito al tipo di ritorno desiderato (stotype)
// It takes care of converting from one type to another.
// It is used in saveply to match types between stotype and memtype (e.g. the type in the file and the type in memory).
// For example if there is an int in memory and I want to save a float
// src will actually be a pointer to int whose value must
// be converted to the desired return type (stotype)

template <class StoType>
static void PlyConv(int mem_type, void *src, StoType &dest)
{
switch (mem_type){
case ply::T_FLOAT : dest = (StoType) (* ((float *) src)); break;
case ply::T_DOUBLE: dest = (StoType) (* ((double *) src)); break;
case ply::T_DOUBLE : dest = (StoType) (* ((double *) src)); break;
case ply::T_INT : dest = (StoType) (* ((int *) src)); break;
case ply::T_SHORT : dest = (StoType) (* ((short *) src)); break;
case ply::T_CHAR : dest = (StoType) (* ((char *) src)); break;
Expand Down
2 changes: 1 addition & 1 deletion wrap/io_trimesh/io_ply.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class PlyInfo
}

/* Note that saving a per vertex point3 attribute is a mess.
* Actually require to allocate 3 float attribute and save them. And they are never deallocated... */
* Actually it requires to allocate 3 float attribute and save them. And they are never deallocated... */
template<class MeshType>
void AddPerVertexPoint3fAttribute(MeshType &m, const std::string& attrName, std::string propName="")
{
Expand Down

0 comments on commit 8c00dd6

Please sign in to comment.