org.xith3d.scenegraph
Class Geometry

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.NodeComponent
          extended by org.xith3d.scenegraph.Geometry
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.VertexContainer
Direct Known Subclasses:
GeomContainer, GeometryTranslocator

public abstract class Geometry
extends NodeComponent
implements org.openmali.spatial.VertexContainer

A Geometry contains mesh data. Usually a Appearance is associated to it, both composing a Shape3D


Nested Class Summary
static class Geometry.Optimization
           
 
Field Summary
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
Geometry()
          Constructs a new Geometry object.
 
Method Summary
abstract  Geometry cloneNodeComponent(boolean forceDuplicate)
          
 org.openmali.spatial.bounds.Bounds getCachedBounds()
           
 Geometry.Optimization getOptimization()
           
abstract  int getTexCoordSize(int unit)
           
abstract  int getVertexFormat()
           
abstract  boolean hasColorAlpha()
           
abstract  boolean hasColors()
           
abstract  boolean hasFeature(int flag)
           
abstract  boolean hasIndex()
           
abstract  boolean hasNormals()
           
abstract  boolean hasTextureCoordinates()
           
abstract  boolean hasVertexAttributes()
           
 boolean isBoundsDirty()
           
abstract  boolean isStrip()
           
abstract  boolean isTriangulatable()
           
abstract  boolean isTriangulated()
           
 void setBoundsDirty()
           
 void setCachedBounds(org.openmali.spatial.bounds.Bounds b)
           
 void setOptimization(Geometry.Optimization opt)
          Sets this Geometrie's Optimization to be used.
 
Methods inherited from class org.xith3d.scenegraph.NodeComponent
duplicateNodeComponent, freeOpenGLResources, freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openmali.spatial.VertexContainer
getVertex, getVertexCount
 

Constructor Detail

Geometry

public Geometry()
Constructs a new Geometry object.

Method Detail

setOptimization

public void setOptimization(Geometry.Optimization opt)
Sets this Geometrie's Optimization to be used.

Parameters:
opt -

getOptimization

public final Geometry.Optimization getOptimization()
Returns:
this Geometrie's Optimization to be used

setBoundsDirty

public void setBoundsDirty()

isBoundsDirty

public final boolean isBoundsDirty()

setCachedBounds

public void setCachedBounds(org.openmali.spatial.bounds.Bounds b)

getCachedBounds

public final org.openmali.spatial.bounds.Bounds getCachedBounds()

isTriangulatable

public abstract boolean isTriangulatable()
Returns:
true, if this Geometry is built of triangles or can at least be interpreted as triangles.

isTriangulated

public abstract boolean isTriangulated()
Returns:
true, if this Geometry is built of triangles.

hasIndex

public abstract boolean hasIndex()
Returns:
true, if this Geometry has an Index

isStrip

public abstract boolean isStrip()
Returns:
true, if this Geometry is a Strip

getVertexFormat

public abstract int getVertexFormat()
Returns:
the format of the vertices in this object.

hasFeature

public abstract boolean hasFeature(int flag)

hasNormals

public abstract boolean hasNormals()

hasColors

public abstract boolean hasColors()

hasTextureCoordinates

public abstract boolean hasTextureCoordinates()

hasVertexAttributes

public abstract boolean hasVertexAttributes()

hasColorAlpha

public abstract boolean hasColorAlpha()

getTexCoordSize

public abstract int getTexCoordSize(int unit)

cloneNodeComponent

public abstract Geometry cloneNodeComponent(boolean forceDuplicate)

Specified by:
cloneNodeComponent in class NodeComponent