public class Model
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
Model.Face |
static class |
Model.FaceIndexSet |
static class |
Model.Mesh |
static class |
Model.TexFace |
static class |
Model.Texture |
static class |
Model.TextureType |
static class |
Model.TexVertex |
static class |
Model.Vertex |
Modifier and Type | Field and Description |
---|---|
protected boolean |
swigCMemOwn |
Modifier | Constructor and Description |
---|---|
protected |
Model(long cPtr,
boolean cMemoryOwn) |
|
Model(Model model) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
delete() |
protected void |
finalize() |
java.util.Optional<Model.Texture> |
getActiveTexture(Model.TextureType type)
Active texture of a given type, may be null.
|
java.util.Optional<Chunk> |
getChunk()
Chunk container, may be null.
|
protected static long |
getCPtr(Model obj) |
int |
getFaceCount()
Face count.
|
java.util.Optional<Model.FaceIndexSet> |
getFilter()
Model filter.
|
java.util.Optional<ModelGroup> |
getGroup()
Model group, may be null.
|
int |
getKey()
Model identifier.
|
java.lang.String |
getLabel()
Model label.
|
java.util.Optional<Model.Mesh> |
getMesh()
Model mesh, may be null.
|
java.util.Map<java.lang.String,java.lang.String> |
getMeta()
Model meta data.
|
java.lang.String |
getPath()
Path to model file.
|
java.util.Optional<Model.FaceIndexSet> |
getSelection()
Model selection.
|
Model.Texture[] |
getTextures()
List of textures in the model.
|
int |
getVertexCount()
Vertex count.
|
boolean |
hasUV()
Returns true if model has UV coordinates.
|
boolean |
hasVertexColors()
Returns true if model has vertex colors.
|
boolean |
hasVertexConfidence()
Returns true if model has confidence values.
|
boolean |
isEnabled()
Enables/disables the model.
|
boolean |
isSelected()
Selects/deselects the model.
|
java.util.Optional<Vector> |
pickPoint(Vector origin,
Vector target)
Returns ray intersection with the model surface.
|
void |
removeTextures()
Remove textures.
|
void |
removeUV()
Remove UV mapping.
|
void |
removeVertexColors()
Remove vertex colors.
|
void |
removeVertexConfidence()
Remove confidence.
|
Image |
renderPreview(long width,
long height,
Matrix transform,
Progress progress)
Generate model preview image.
|
void |
setEnabled(boolean state)
Enables/disables the model.
|
void |
setFilter(Model.FaceIndexSet filter)
Model filter.
|
void |
setGroup(ModelGroup group)
Model group, may be null.
|
void |
setLabel(java.lang.String label)
Model label.
|
void |
setMesh(Model.Mesh mesh)
Model mesh, may be null.
|
void |
setMeta(java.util.Map<java.lang.String,java.lang.String> meta)
Model meta data.
|
void |
setSelected(boolean state)
Selects/deselects the model.
|
void |
setSelection(Model.FaceIndexSet selection)
Model selection.
|
protected Model(long cPtr, boolean cMemoryOwn)
public Model(Model model)
protected static long getCPtr(Model obj)
protected void finalize()
finalize
in class java.lang.Object
public void delete()
public void close()
close
in interface java.lang.AutoCloseable
public int getKey()
public java.util.Optional<Chunk> getChunk()
public void setLabel(java.lang.String label)
public java.lang.String getLabel()
public void setEnabled(boolean state)
public boolean isEnabled()
public void setSelected(boolean state)
public boolean isSelected()
public void setGroup(ModelGroup group)
public java.util.Optional<ModelGroup> getGroup()
public Model.Texture[] getTextures()
public java.util.Optional<Model.Texture> getActiveTexture(Model.TextureType type)
public void setMesh(Model.Mesh mesh)
public java.util.Optional<Model.Mesh> getMesh()
public java.lang.String getPath()
public void setMeta(java.util.Map<java.lang.String,java.lang.String> meta)
public java.util.Map<java.lang.String,java.lang.String> getMeta()
public int getFaceCount()
public int getVertexCount()
public boolean hasUV()
public boolean hasVertexColors()
public boolean hasVertexConfidence()
public void removeUV()
public void removeTextures()
public void removeVertexColors()
public void removeVertexConfidence()
public void setSelection(Model.FaceIndexSet selection)
public java.util.Optional<Model.FaceIndexSet> getSelection()
public void setFilter(Model.FaceIndexSet filter)
public java.util.Optional<Model.FaceIndexSet> getFilter()
public java.util.Optional<Vector> pickPoint(Vector origin, Vector target)
origin
- Ray origin.target
- Point on the ray.