public final class GeometryData extends java.lang.Object implements ICullable, IDestroyable
| Modifier and Type | Field and Description |
|---|---|
java.lang.Object |
physicData
User data to store physic informations
|
HwData |
rendererData
Used by renderer
|
| Constructor and Description |
|---|
GeometryData(FaceData faceData,
int materialKey) |
GeometryData(FaceData faceData,
java.lang.Object materialKey) |
GeometryData(FaceData faceData,
java.lang.String materialKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy(IGLApi glApi) |
IMaterial |
getMaterial() |
KeyRange<VertexData> |
getVertexDataRange() |
VertexData |
getVertices() |
IVolume<?> |
getVolume(int bvOptions) |
boolean |
isCulled() |
boolean |
isDrawBoundingVolume() |
boolean |
isVisible() |
boolean |
isVisibleAndNotCulled()
Renderer only if visible and not culled
|
void |
onVerticesAccess(boolean useNormals,
boolean useTangents) |
void |
onVerticesChanged(boolean positionChanged)
This method must be called when
getVertices() has been manually modified. |
void |
setCulled(boolean culled) |
void |
setDrawBoundingVolume(boolean drawBoundingVolume) |
void |
setMaterialKey(AssetKey materialKey) |
void |
setMaterialKey(int materialKey) |
void |
setMaterialKey(java.lang.Object materialKey) |
void |
setMaterialKey(java.lang.String materialKey) |
void |
setVisible(boolean visible) |
java.lang.String |
toString() |
GeometryData |
with(FaceData faceData)
Both the original and returned
GeometryData must be destroy when not used anymore
to keep asset reference counter balanced. |
GeometryData |
with(VertexData vertices)
Both the original and returned
GeometryData must be destroy when not used anymore
to keep asset reference counter balanced. |
public java.lang.Object physicData
public HwData rendererData
public GeometryData(FaceData faceData, java.lang.String materialKey)
public GeometryData(FaceData faceData, int materialKey)
public GeometryData(FaceData faceData, java.lang.Object materialKey)
public final java.lang.String toString()
toString in class java.lang.Objectpublic final GeometryData with(VertexData vertices)
GeometryData must be destroy when not used anymore
to keep asset reference counter balanced.Model or ModelInstance destruction,
but must be done manually when GeometryData is manipulated outside.vertices - GeometryData, a duplicate of this GeometryData with the specified verticespublic final GeometryData with(FaceData faceData)
GeometryData must be destroy when not used anymore
to keep asset reference counter balanced.Model or ModelInstance destruction,
but must be done manually when GeometryData is manipulated outside.faceData - GeometryData, a duplicate of this GeometryData with the specified faceDatapublic void destroy(IGLApi glApi)
destroy in interface IDestroyablepublic final IMaterial getMaterial()
public final IVolume<?> getVolume(int bvOptions)
getVolume in interface IBoundablebvOptions - bounding volume options.BoundingBox or BoundingSphere depending on options.VolumeOptions,
Box,
Sphere,
Cylinder,
Capsulepublic final void onVerticesChanged(boolean positionChanged)
getVertices() has been manually modified.public final KeyRange<VertexData> getVertexDataRange()
public final void onVerticesAccess(boolean useNormals,
boolean useTangents)
public final VertexData getVertices()
VertexData associated to this GeometryDatapublic final void setMaterialKey(java.lang.String materialKey)
materialKey - a material name, or nullsetMaterialKey(int),
setMaterialKey(AssetKey)public final void setMaterialKey(int materialKey)
materialKey - a material index, or -1setMaterialKey(String),
setMaterialKey(AssetKey)public final void setMaterialKey(AssetKey materialKey)
materialKey - a Material keysetMaterialKey(String),
setMaterialKey(int)public final void setMaterialKey(java.lang.Object materialKey)
materialKey - a material key (int, String, AssetKey)setMaterialKey(String),
setMaterialKey(int),
setMaterialKey(AssetKey)public final boolean isVisibleAndNotCulled()
public final boolean isVisible()
isVisible in interface ICullableGeometryData is visiblepublic final void setVisible(boolean visible)
visible - set new visibility state of this GeometryDatapublic final boolean isCulled()
isCulled in interface ICullableGeometryData is culled (by visibility algorithm, ...)public final void setCulled(boolean culled)
setCulled in interface ICullableculled - new culled state for this GeometryDatapublic final boolean isDrawBoundingVolume()
GeometryDatapublic final void setDrawBoundingVolume(boolean drawBoundingVolume)
Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com