Modifier and Type | Field and Description |
---|---|
protected sc.fiji.snt.viewer.OBJMesh.RemountableDrawableVBO |
drawable |
protected sc.fiji.snt.viewer.OBJMesh.OBJFileLoaderPlus |
loader |
protected String |
unit |
Constructor and Description |
---|
OBJMesh(String filePath)
Instantiates a new wavefront OBJ mesh from a file path/URL.
|
OBJMesh(URL url,
String meshUnit) |
Modifier and Type | Method and Description |
---|---|
OBJMesh |
duplicate() |
BoundingBox |
getBoundingBox(String hemiHalf)
Gets the minimum bounding box of this mesh.
|
SNTPoint |
getCentroid(String hemihalf)
Returns the spatial centroid of the specified (hemi)mesh.
|
org.jzy3d.plot3d.primitives.vbo.drawable.DrawableVBO |
getDrawable()
Returns the
DrawableVBO associated with this mesh |
protected String |
getLabel() |
org.jzy3d.io.obj.OBJFile |
getObj()
Returns the
OBJFile associated with this mesh |
Collection<? extends SNTPoint> |
getVertices()
Returns the mesh vertices.
|
Collection<? extends SNTPoint> |
getVertices(String hemihalf)
Returns the mesh vertices.
|
double |
getVolume() |
void |
setBoundingBoxColor(ColorRGB boundingBoxColor)
Determines whether the mesh bounding box should be displayed.
|
void |
setBoundingBoxColor(String boundingBoxColor)
Determines whether the mesh bounding box should be displayed.
|
void |
setColor(ColorRGB color,
double transparencyPercent)
Assigns a color to the mesh.
|
void |
setColor(String color,
double transparencyPercent)
Script friendly method to assign a color to the mesh.
|
void |
setLabel(String label) |
void |
setTransparency(double transparencyPercent)
Changes the transparency of this mesh.
|
void |
setVolume(double volume) |
void |
translate(SNTPoint offset)
Translates the vertices of this mesh by the specified offset.
|
protected sc.fiji.snt.viewer.OBJMesh.OBJFileLoaderPlus loader
protected sc.fiji.snt.viewer.OBJMesh.RemountableDrawableVBO drawable
protected String unit
public OBJMesh(String filePath)
filePath
- the absolute path to the .OBJ file to be imported. URL
representations acceptedIllegalArgumentException
- if filePath is invalid or file does not
contain a compilable meshpublic OBJMesh duplicate()
public void translate(SNTPoint offset)
offset
- the translation offsetpublic void setColor(String color, double transparencyPercent)
color
- the color to render the imported file, either a 1)
HTML color codes starting with hash (#
), a
color preset ("red", "blue", etc.), or integer
triples of the form r,g,b
and range
[0, 255]
transparencyPercent
- the color transparency (in percentage)public void setColor(ColorRGB color, double transparencyPercent)
color
- the color to render the imported filetransparencyPercent
- the color transparency (in percentage)public void setTransparency(double transparencyPercent)
transparencyPercent
- the mesh transparency (in percentage).public void setBoundingBoxColor(ColorRGB boundingBoxColor)
boundingBoxColor
- the color of the mesh bounding box. If null, no
bounding box is displayedpublic void setBoundingBoxColor(String boundingBoxColor)
boundingBoxColor
- the color of the mesh bounding box, either a 1) HTML
color codes starting with hash (#
), a color
preset ("red", "blue", etc.), or integer triples of
the form r,g,b
and range [0, 255]
. If
null, or if string does not encode a valid color, no
bounding box is displayedpublic BoundingBox getBoundingBox(String hemiHalf)
hemiHalf
- either "left", "l", "right", "r" otherwise bounding box is
retrieved for both hemi-halves, i.e., the full mesh. It is
ignored if a hemisphere was already specified in the
constructor.protected String getLabel()
public void setLabel(String label)
public void setVolume(double volume)
public double getVolume()
public Collection<? extends SNTPoint> getVertices()
SNTPoint
spublic Collection<? extends SNTPoint> getVertices(String hemihalf)
hemihalf
- either "left", "l", "right", "r" otherwise centroid is
retrieved for both hemi-halves, i.e., the full meshSNTPoint
spublic SNTPoint getCentroid(String hemihalf)
hemihalf
- either "left", "l", "right", "r", otherwise centroid is
retrieved for both hemi-halves, i.e., the full meshpublic org.jzy3d.io.obj.OBJFile getObj()
OBJFile
associated with this meshpublic org.jzy3d.plot3d.primitives.vbo.drawable.DrawableVBO getDrawable()
DrawableVBO
associated with this meshCopyright © 2015–2021 Fiji. All rights reserved.