com.jme3.scene
クラス Geometry

java.lang.Object
  上位を拡張 com.jme3.scene.Spatial
      上位を拡張 com.jme3.scene.Geometry
すべての実装されたインタフェース:
Asset, Collidable, Savable, java.lang.Cloneable
直系の既知のサブクラス:
ParticleEmitter, Picture, TerrainPatch

public class Geometry
extends Spatial

Geometry defines a leaf node of the scene graph. The leaf node contains the geometric data for rendering objects. It manages all rendering information such as a Material object to define how the surface should be shaded and the Mesh data to contain the actual geometry.


入れ子のクラスの概要
 
クラス com.jme3.scene.Spatial から継承された入れ子のクラス/インタフェース
Spatial.CullHint
 
フィールドの概要
 
クラス com.jme3.scene.Spatial から継承されたフィールド
queueDistance
 
コンストラクタの概要
Geometry()
          Serialization only.
Geometry(java.lang.String name)
          Create a geometry node without any mesh data.
Geometry(java.lang.String name, Mesh mesh)
          Create a geometry node with mesh data.
 
メソッドの概要
 Geometry clone()
          This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry.
 Geometry clone(boolean cloneMaterial)
          This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry.
 int collideWith(Collidable other, CollisionResults results)
          Check collision with another Collidable.
 void computeWorldMatrix()
          Recomputes the matrix returned by getWorldMatrix().
 Spatial deepClone()
          Creates a deep clone of the geometry, this creates an identical copy of the mesh with the vertexbuffer data duplicated.
 void depthFirstTraversal(SceneGraphVisitor visitor)
          Visit each scene graph element ordered by DFS
 int getLodLevel()
          Returns the LOD level set with setLodLevel(int).
 Material getMaterial()
          Returns the material that is used for this geometry.
 Mesh getMesh()
          Returns the mseh to use for this geometry
 BoundingVolume getModelBound()
           
 int getTriangleCount()
          Returns this geometry's mesh triangle count.
 int getVertexCount()
          Returns this geometry's mesh vertex count.
 Matrix4f getWorldMatrix()
          A matrix that transforms the mesh from model space to world space.
 boolean isIgnoreTransform()
           
 void read(JmeImporter im)
           
 void setIgnoreTransform(boolean ignoreTransform)
           
 void setLodLevel(int lod)
          Sets the LOD level to use when rendering the mesh of this geometry.
 void setMaterial(Material material)
          Sets the material to use for this geometry.
 void setMesh(Mesh mesh)
          Sets the mesh to use for this geometry when rendering.
 void setModelBound(BoundingVolume modelBound)
          Sets the model bound to use for this geometry.
 void updateModelBound()
          Updates the bounding volume of the mesh.
 void write(JmeExporter ex)
           
 
クラス com.jme3.scene.Spatial から継承されたメソッド
addControl, addLight, breadthFirstTraversal, center, checkCulling, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setShadowMode, setUserData, toString, updateGeometricState, updateLogicalState, worldToLocal
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Geometry

public Geometry()
Serialization only. Do not use.


Geometry

public Geometry(java.lang.String name)
Create a geometry node without any mesh data. Both the mesh and the material are null, the geometry cannot be rendered until those are set.

パラメータ:
name - The name of this geometry

Geometry

public Geometry(java.lang.String name,
                Mesh mesh)
Create a geometry node with mesh data. The material of the geometry is null, it cannot be rendered until it is set.

パラメータ:
name - The name of this geometry
mesh - The mesh data for this geometry
メソッドの詳細

isIgnoreTransform

public boolean isIgnoreTransform()
戻り値:
If ignoreTransform mode is set.
関連項目:
setIgnoreTransform(boolean)

setIgnoreTransform

public void setIgnoreTransform(boolean ignoreTransform)
パラメータ:
ignoreTransform - If true, the geometry's transform will not be applied.

setLodLevel

public void setLodLevel(int lod)
Sets the LOD level to use when rendering the mesh of this geometry. Level 0 indicates that the default index buffer should be used, levels [1, LodLevels + 1] represent the levels set on the mesh with Mesh.setLodLevels(com.jme3.scene.VertexBuffer[]).

オーバーライド:
クラス Spatial 内の setLodLevel
パラメータ:
lod - The lod level to set

getLodLevel

public int getLodLevel()
Returns the LOD level set with setLodLevel(int).

戻り値:
the LOD level set

getVertexCount

public int getVertexCount()
Returns this geometry's mesh vertex count.

定義:
クラス Spatial 内の getVertexCount
戻り値:
this geometry's mesh vertex count.
関連項目:
Mesh.getVertexCount()

getTriangleCount

public int getTriangleCount()
Returns this geometry's mesh triangle count.

定義:
クラス Spatial 内の getTriangleCount
戻り値:
this geometry's mesh triangle count.
関連項目:
Mesh.getTriangleCount()

setMesh

public void setMesh(Mesh mesh)
Sets the mesh to use for this geometry when rendering.

パラメータ:
mesh - the mesh to use for this geometry
例外:
java.lang.IllegalArgumentException - If mesh is null

getMesh

public Mesh getMesh()
Returns the mseh to use for this geometry

戻り値:
the mseh to use for this geometry
関連項目:
setMesh(com.jme3.scene.Mesh)

setMaterial

public void setMaterial(Material material)
Sets the material to use for this geometry.

オーバーライド:
クラス Spatial 内の setMaterial
パラメータ:
material - the material to use for this geometry

getMaterial

public Material getMaterial()
Returns the material that is used for this geometry.

戻り値:
the material that is used for this geometry
関連項目:
setMaterial(com.jme3.material.Material)

getModelBound

public BoundingVolume getModelBound()
戻り値:
The bounding volume of the mesh, in model space.

updateModelBound

public void updateModelBound()
Updates the bounding volume of the mesh. Should be called when the mesh has been modified.

定義:
クラス Spatial 内の updateModelBound

computeWorldMatrix

public void computeWorldMatrix()
Recomputes the matrix returned by getWorldMatrix(). This will require a localized transform update for this geometry.


getWorldMatrix

public Matrix4f getWorldMatrix()
A matrix that transforms the mesh from model space to world space. This matrix is computed based on the world transform of this geometry. In order to receive updated values, you must call computeWorldMatrix() before using this method.

戻り値:
Matrix to transform from local space to world space

setModelBound

public void setModelBound(BoundingVolume modelBound)
Sets the model bound to use for this geometry. This alters the bound used on the mesh as well via Mesh.setBound(com.jme3.bounding.BoundingVolume) and forces the world bounding volume to be recomputed.

定義:
クラス Spatial 内の setModelBound
パラメータ:
modelBound - The model bound to set

collideWith

public int collideWith(Collidable other,
                       CollisionResults results)
インタフェース Collidable の記述:
Check collision with another Collidable.

パラメータ:
other - The object to check collision against
results - Will contain the list of CollisionResults.
戻り値:
how many collisions were found between this and other

depthFirstTraversal

public void depthFirstTraversal(SceneGraphVisitor visitor)
クラス Spatial の記述:
Visit each scene graph element ordered by DFS

定義:
クラス Spatial 内の depthFirstTraversal

clone

public Geometry clone(boolean cloneMaterial)
This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry. Exception: if the mesh is marked as being a software animated mesh, (bind pose is set) then the positions and normals are deep copied.

オーバーライド:
クラス Spatial 内の clone
戻り値:
A clone of this Spatial, the scene graph in its entirety is cloned and can be altered independently of the original scene graph. Note that meshes of geometries are not cloned explicitly, they are shared if static, or specially cloned if animated. All controls will be cloned using the Control.cloneForSpatial method on the clone.
関連項目:
Mesh.cloneForAnim()

clone

public Geometry clone()
This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry. Exception: if the mesh is marked as being a software animated mesh, (bind pose is set) then the positions and normals are deep copied.

オーバーライド:
クラス Spatial 内の clone
戻り値:
A clone of this Spatial, the scene graph in its entirety is cloned and can be altered independently of the original scene graph. Note that meshes of geometries are not cloned explicitly, they are shared if static, or specially cloned if animated. All controls will be cloned using the Control.cloneForSpatial method on the clone.
関連項目:
Mesh.cloneForAnim()

deepClone

public Spatial deepClone()
Creates a deep clone of the geometry, this creates an identical copy of the mesh with the vertexbuffer data duplicated.

定義:
クラス Spatial 内の deepClone
戻り値:
Similar to Spatial.clone() except will create a deep clone of all geometry's meshes, normally this method shouldn't be used instead use Spatial.clone()
関連項目:
Spatial.clone()

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
オーバーライド:
クラス Spatial 内の write
例外:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
オーバーライド:
クラス Spatial 内の read
例外:
java.io.IOException