PolyhedronStateDefined | R Documentation |
Polyhedron State scraped and defined
Rpolyhedra::PolyhedronState
-> PolyhedronStateDefined
file.id
polyhedron filename in original
source
polyhedron definition source (netlib|dmccooey)
name
polyhedron name (netlib|dmccooey)
symbol
the eqn(1) input for two symbols separated by a tab; the Johnson symbol, and the Schlafli symbol (netlib)
dual
the name of the dual polyhedron optionally followed by a horizontal tab and the number of the dual (netlib)
sfaces
polyhedron solid face list (netlib)
svertices
polyhedron solid vertices list (netlib)
vertices
Polyhedron vertices list (netlib|dmccooey)
vertices.centered
centered vertices for applying transformation matrices
net
polyhedron 2D net model with vertices defined for a planar representation (netlib)
solid
polyhedron list of edges which generate a solid (netlib|dmccooey)
hinges
Polyhedron hinge list (netlib)
dih
Dih attribute (netlib)
edges
polyhedron edges (netlib|dmccooey)
transformation.matrix
transformation matrix for calculations and visualizing polyhedron
new()
object initialization routine
PolyhedronStateDefined$new( source, file.id, name, vertices, solid, net = NULL, symbol = "", dual = NULL, sfaces = NULL, svertices = NULL, hinges = NULL, dih = NULL, normalize.size = TRUE )
source
the library to use
file.id
identifier of the definition file.
name
the polyhedron name
vertices
the vertices
solid
the solid object
net
the net
symbol
the symbol
dual
whether it is dual or not
sfaces
the solid faces
svertices
the solid vertices
hinges
the hinges
dih
the dih
normalize.size
whether it has to normalize the size or not
A new PolyhedronStateDefined object.
scrape()
scrape polyhedron. As the state is defined this functions do nothing
PolyhedronStateDefined$scrape()
current object
saveToJson()
saves the state to a JSON file
PolyhedronStateDefined$saveToJson(pretty = FALSE)
pretty
whether json output is pretty or not
a json object
getName()
get Polyhedron name
PolyhedronStateDefined$getName()
string with polyhedron name
getSymbol()
get Polyhedron symbol
PolyhedronStateDefined$getSymbol()
string with polyhedron symbol
adjustVertices()
adjust polyhedron Vertices
PolyhedronStateDefined$adjustVertices(normalize.size = TRUE)
normalize.size
whether it has to normalize the size or not
modified PolyhedronStateDefined object.
getVertices()
Get the polyhedron state
PolyhedronStateDefined$getVertices(solid = FALSE)
solid
toggles the production of solid vertices.
getNet()
Gets the net property
PolyhedronStateDefined$getNet()
getSolid()
Gets the solid property
PolyhedronStateDefined$getSolid()
inferEdges()
Infer edges
PolyhedronStateDefined$inferEdges(force.recalculation = FALSE)
force.recalculation
forces the recalculation of the edges
checkEdgesConsistency()
Checks edges consistency
PolyhedronStateDefined$checkEdgesConsistency()
triangulate()
Triangulates the polyhedron
PolyhedronStateDefined$triangulate(force = FALSE)
force
forces the triangulation.
getConvHull()
Gets the convex hull
PolyhedronStateDefined$getConvHull( transformation.matrix = self$transformation.matrix, vertices.id.3d = private$vertices.id.3d )
transformation.matrix
the transformation matrix
vertices.id.3d
the vertices ids
the convex hull
calculateMassCenter()
Calculates the center of mass.
PolyhedronStateDefined$calculateMassCenter( vertices.id.3d = private$vertices.id.3d, applyTransformation = TRUE )
vertices.id.3d
the vertices ids
applyTransformation
does it need to apply transformations?
getNormalizedSize()
Gets the normalized size
PolyhedronStateDefined$getNormalizedSize(size)
size
the object's size
getTransformedVertices()
Gets the transformed vertices
PolyhedronStateDefined$getTransformedVertices( vertices = self$vertices.centered, transformation.matrix = self$transformation.matrix )
vertices
input vertices
transformation.matrix
the transformation matrix
resetTransformationMatrix()
Resets the transformation matrix
PolyhedronStateDefined$resetTransformationMatrix()
applyTransformationMatrix()
Apply transformation matrix to polyhedron
PolyhedronStateDefined$applyTransformationMatrix(transformation.matrix)
transformation.matrix
the transformation matrix to apply to the polyhedron
an applied transformation.matrix
buildRGL()
Build 'rgl'
PolyhedronStateDefined$buildRGL(transformation.matrix = NULL)
transformation.matrix
the transformation matrix
exportToXML()
Exports the object to XML format
PolyhedronStateDefined$exportToXML()
expectEqual()
Determines if a polyhedron is equal to this one.
PolyhedronStateDefined$expectEqual(polyhedron)
polyhedron
the polyhedron to compare to.
serialize()
Serialize the object.
PolyhedronStateDefined$serialize()
clone()
The objects of this class are cloneable with this method.
PolyhedronStateDefined$clone(deep = FALSE)
deep
Whether to make a deep clone.
ken4rab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.