com.threerings.opengl.geometry.config
Class GeometryConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.opengl.geometry.config.GeometryConfig
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Direct Known Subclasses:
GeometryConfig.Stored, ParticleSystemConfig.ParticleGeometryConfig

public abstract class GeometryConfig
extends DeepObject
implements Exportable

Geometry configuration.


Nested Class Summary
static class GeometryConfig.ArrayStored
          Array geometry.
static class GeometryConfig.AttributeArrayConfig
          Describes an interleaved attribute array.
static class GeometryConfig.IndexedStored
          Indexed geometry.
static class GeometryConfig.Mode
          Mode constants.
static class GeometryConfig.SkinnedIndexedStored
          Skinned indexed geometry.
static class GeometryConfig.Stored
          Superclass of configurations with stored geometry.
 
Constructor Summary
GeometryConfig()
           
 
Method Summary
abstract  Geometry createGeometry(GlContext ctx, Scope scope, DeformerConfig deformer, PassDescriptor[] passes)
          Creates an instance of the geometry described by this config.
static GeometryConfig createQuad(float sizeX, float sizeY, int divisionsX, int divisionsY)
          Creates a new GeometryConfig instance representing a quad extending from (-sizeX/2, -sizeY/2, 0) to (+sizeX/2, +sizeY/2, 0) with the specified number of divisions in x and y.
abstract  Box getBounds()
          Returns the bounds of the geometry.
static GeometryConfig getQuad(int divisionsX, int divisionsY)
          Returns a shared GeometryConfig instance representing a quad extending from (-1, -1, 0) to (+1, +1, 0) with the specified number of divisions in x and y.
 GeometryConfig merge(List<TransformedGeometry> glist)
          Attempts to merge several transformed geometries.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeometryConfig

public GeometryConfig()
Method Detail

getQuad

public static GeometryConfig getQuad(int divisionsX,
                                     int divisionsY)
Returns a shared GeometryConfig instance representing a quad extending from (-1, -1, 0) to (+1, +1, 0) with the specified number of divisions in x and y.


createQuad

public static GeometryConfig createQuad(float sizeX,
                                        float sizeY,
                                        int divisionsX,
                                        int divisionsY)
Creates a new GeometryConfig instance representing a quad extending from (-sizeX/2, -sizeY/2, 0) to (+sizeX/2, +sizeY/2, 0) with the specified number of divisions in x and y.


getBounds

public abstract Box getBounds()
Returns the bounds of the geometry.


merge

public GeometryConfig merge(List<TransformedGeometry> glist)
Attempts to merge several transformed geometries.

Parameters:
glist - a list of the geometry to merge. Any successfully merged elements will be removed from the list.
Returns:
the combined geometry, or null if we could not merge any.

createGeometry

public abstract Geometry createGeometry(GlContext ctx,
                                        Scope scope,
                                        DeformerConfig deformer,
                                        PassDescriptor[] passes)
Creates an instance of the geometry described by this config.



Copyright © 2011. All Rights Reserved.