Skip to content

Commit

Permalink
Merge pull request #52 from dmurdoch/noRemap
Browse files Browse the repository at this point in the history
Deal with new check issues
  • Loading branch information
dmurdoch authored Sep 24, 2024
2 parents c656e16 + 15a31cc commit 793d298
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 29 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rgl2gltf
Type: Package
Title: Read and Write '.gltf' and '.glb' Files
Version: 1.0.4
Version: 1.0.5
Authors@R: c(person("Duncan", "Murdoch", role = c("aut", "cre"),
email = "murdoch.duncan@gmail.com"),
person("Morten S.", "Mikkelsen", role = c("cph")))
Expand All @@ -24,5 +24,5 @@ Suggests:
png,
jpeg
VignetteBuilder: knitr, rmarkdown
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ S3method("as.gltf", "shapelist3d")
S3method("as.gltf", "rglobject")
S3method("as.gltf", "rglscene")

S3method("as.gltf", "rglbackground")
S3method("as.gltf", "rglbboxdeco")
S3method("as.gltf", "rglspheres")
S3method("as.gltf", "rglsprites")
S3method("as.gltf", "rglsubscene")
S3method("as.gltf", "rgltext")

S3method("as.rglscene", "gltf")

S3method("merge", "rglobject")
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# rgl2gltf 1.0.4
# rgl2gltf 1.0.5

* Support transparency.
* Fix noRemap issue as requested by CRAN.

# rgl2gltf 1.0.3

Expand Down
2 changes: 1 addition & 1 deletion R/gltfObj.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Gltf <- R6Class("gltf",
#' The glTF standard requires `min` and `max` values in
#' accessors, whereas other uses of buffers may not.
#' This function stores in the usual way using the
#' [`Buffer$addAccessor()`][Buffer] method, and then adds
#' [`Buffer$addAccessor()`][rgl::Buffer] method, and then adds
#' `min` and `max` values.
#'
#' The standard also doesn't support signed 4 byte integers
Expand Down
11 changes: 3 additions & 8 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
1.0.3: Fixed issue found in rlibro additional tests. Now
I'm quite sure all existing CRAN issues have been addressed.
1.0.5:

1.0.2: Minor update in response to request from CRAN.

- Re-ran Roxygen to fix tidy issues.
- Updated URL for glTF web page.
- One very small enhancement.

Small update to add support for transparency and to avoid NoRemap issues
as requested by CRAN.
2 changes: 1 addition & 1 deletion man/Gltf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/as.gltf.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Rescaling in the enclosing subscene.
\code{as.gltf} is a generic function.

The method for \code{"rglscene"} objects can handle most
objects produced by \code{\link{scene3d}}, but not all
objects produced by \code{\link[rgl]{scene3d}}, but not all
objects will be handled. In particular:
\itemize{
\item{Lights, text, bounding box decorations and backgrounds are saved in \dQuote{extra} fields, so
Expand Down
4 changes: 2 additions & 2 deletions man/as.rglscene.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Convert a glTF object to an rglscene or mesh3d object.
}
\description{
These methods convert a \code{"gltf"} object to
a \code{"rglscene"} object, similar to what \code{\link{scene3d}}
a \code{"rglscene"} object, similar to what \code{\link[rgl]{scene3d}}
would produce, or a \code{"mesh3d"} object.
}
\usage{
Expand Down Expand Up @@ -34,7 +34,7 @@ that information, otherwise include only what standard glTF viewers would displa
\item{clone}{Whether to clone the \code{gltf} object. See the Details below.}
\item{quick}{If \code{TRUE}, \code{\link{plot3d}} will work
on the result, but it is not sufficiently complete to use
as the scene in \code{\link{rglwidget}}.}
as the scene in \code{\link[rgl]{rglwidget}}.}
\item{add}{If \code{quick = FALSE}, the scene will be plotted
in an existing rgl scene, and both old and new parts will be returned.}
\item{...}{\code{as.mesh3d} passes these arguments to \code{as.rglscene}.}
Expand Down
4 changes: 2 additions & 2 deletions man/gltfWidget.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Give some progress information.
}
\item{open3dParams}{
A list to pass as the \code{params} argument to
\code{\link{open3d}}.
\code{\link[rgl]{open3d}}.
}
\item{usePBR}{
Whether to use physically based rendering methods.
Expand All @@ -70,7 +70,7 @@ actually contains PBR parameters.
A list containing optional arguments to the \code{\link{setPBRshaders}} function.
}
\item{\dots}{
Additional parameters which will be passed to \code{rgl::\link{playwidget}}.
Additional parameters which will be passed to \code{rgl::\link[rgl]{playwidget}}.
}
}
\details{
Expand Down
2 changes: 1 addition & 1 deletion man/modifyShaders.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ modifyShaders(shaders, mod, ...)
}
\arguments{
\item{shaders}{
A list of shaders, e.g. as produced by \code{\link{getShaders}}.
A list of shaders, e.g. as produced by \code{\link[rgl]{getShaders}}.
}
\item{mod}{
Either a character value naming a built-in set of mods (currently just \code{"skins"}), or a list of mods as described
Expand Down
4 changes: 2 additions & 2 deletions man/playgltf.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Control the updates; see details below.
Whether to print status updates.
}
\item{...}{
Parameter settings to pass to \code{\link{plot3d.rglscene}} (and hence
to \code{\link{open3d}}).
Parameter settings to pass to \code{\link[rgl]{plot3d.rglscene}} (and hence
to \code{\link[rgl]{open3d}}).
}
}
\details{
Expand Down
2 changes: 1 addition & 1 deletion man/setPBRshaders.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ values to control the contribution from each of those components
to the image based lighting.
}
\item{defines, uniforms, attributes, textures}{
Values to use in \code{\link{setUserShaders}} in addition
Values to use in \code{\link[rgl]{setUserShaders}} in addition
to the ones determined by this function.
}
}
Expand Down
2 changes: 1 addition & 1 deletion man/showTags.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ displayed tags. The default will put the tag in front of
everything, so it won't be obscured by other objects.
}
\item{\dots}{
Other arguments to pass to \code{\link{text3d}}.
Other arguments to pass to \code{\link[rgl]{text3d}}.
}
}
\details{
Expand Down
2 changes: 1 addition & 1 deletion src/calc_tangents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int CalcTangents::get_num_vertices_of_face(const SMikkTSpaceContext *context,
} else if (working_mesh->draw_mode == GL_QUADS) {
return 4;
}
error("no vertices with less than 3 and more than 4 supported");
Rf_error("no vertices with less than 3 and more than 4 supported");
}

void CalcTangents::get_position(const SMikkTSpaceContext *context,
Expand Down
12 changes: 7 additions & 5 deletions src/mikktspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,8 @@ static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext

static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int iNumUniqueVerts = 0, t=0, i=0;
int // iNumUniqueVerts = 0,
t=0, i=0;
for (t=0; t<iNrTrianglesIn; t++)
{
for (i=0; i<3; i++)
Expand Down Expand Up @@ -762,7 +763,7 @@ static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], cons

assert(bFound);
// if we found our own
if (index2rec == index) { ++iNumUniqueVerts; }
// if (index2rec == index) { ++iNumUniqueVerts; }

piTriList_in_and_out[offs] = index2rec;
}
Expand Down Expand Up @@ -1202,7 +1203,8 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
STSpace * pSubGroupTspace = NULL;
SSubGroup * pUniSubGroups = NULL;
int * pTmpMembers = NULL;
int iMaxNrFaces=0, iUniqueTspaces=0, g=0, i=0;
int iMaxNrFaces=0, // iUniqueTspaces=0,
g=0, i=0;
for (g=0; g<iNrActiveGroups; g++)
if (iMaxNrFaces < pGroups[g].iNrFaces)
iMaxNrFaces = pGroups[g].iNrFaces;
Expand All @@ -1222,7 +1224,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
}


iUniqueTspaces = 0;
// iUniqueTspaces = 0;
for (g=0; g<iNrActiveGroups; g++)
{
const SGroup * pGroup = &pGroups[g];
Expand Down Expand Up @@ -1353,7 +1355,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
// clean up and offset iUniqueTspaces
for (s=0; s<iUniqueSubGroups; s++)
free(pUniSubGroups[s].pTriMembers);
iUniqueTspaces += iUniqueSubGroups;
// iUniqueTspaces += iUniqueSubGroups;
}

// clean up
Expand Down

0 comments on commit 793d298

Please sign in to comment.