synergynetframework.jme.gfx.twod
Class PolygonMesh

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Geometry
          extended by com.jme.scene.TriMesh
              extended by com.jme.scene.shape.Quad
                  extended by synergynetframework.jme.gfx.twod.utils.GraphicsImageQuad
                      extended by synergynetframework.jme.gfx.twod.PolygonMesh
All Implemented Interfaces:
com.jme.util.export.Savable, java.io.Serializable

public class PolygonMesh
extends GraphicsImageQuad

The Class PolygonMesh.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.scene.TriMesh
com.jme.scene.TriMesh.Mode
 
Nested classes/interfaces inherited from class com.jme.scene.Spatial
com.jme.scene.Spatial.CullHint, com.jme.scene.Spatial.LightCombineMode, com.jme.scene.Spatial.NormalsMode, com.jme.scene.Spatial.TextureCombineMode
 
Field Summary
 float[][] coords
          The coords.
 com.jmex.awt.swingui.ImageGraphics gfx
          The gfx.
 
Fields inherited from class com.jme.scene.Geometry
states
 
Fields inherited from class com.jme.scene.Spatial
LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, queueDistance
 
Constructor Summary
PolygonMesh(java.lang.String name, int x, int y)
          Instantiates a new polygon mesh.
 
Method Summary
 void addCircleFilled(int radius, com.jme.renderer.ColorRGBA c, boolean border)
          Adds the circle filled.
 void addImage(java.net.URL resource)
          Adds the image.
 void addOvalFilled(int xRadius, int yRadius, com.jme.renderer.ColorRGBA c, boolean border)
          Adds the oval filled.
 void addPolygonFilled(float[][] coords, com.jme.renderer.ColorRGBA c, boolean border)
          Adds the polygon filled.
 void addSquareFilled(com.jme.renderer.ColorRGBA c, int curve, boolean border)
          Adds the square filled.
 void addTriangleFilled(com.jme.renderer.ColorRGBA c, boolean border)
          Adds the triangle filled.
 void changeTextureMode()
          Change texture mode.
 void clear()
          Clear.
 com.jme.renderer.ColorRGBA getOtherColour()
          Gets the other colour.
 java.lang.String getShapeType()
          Gets the shape type.
static void setBorder(com.jme.renderer.ColorRGBA c, int borderWidth)
          Sets the border.
 void setOtherColour(com.jme.renderer.ColorRGBA otherColour)
          Sets the other colour.
 void setShapeType(java.lang.String shapeType)
          Sets the shape type.
 
Methods inherited from class synergynetframework.jme.gfx.twod.utils.GraphicsImageQuad
getImageGraphics, getImageHeight, getImageWidth, getTextureState, recreateImageForSize, setTextureApplyMode, updateGraphics
 
Methods inherited from class com.jme.scene.shape.Quad
getCenter, getHeight, getWidth, initialize, resize, updateGeometry
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, hasCollision, hasTriangleCollision, randomPointOnTriangles, read, reconstruct, setIndexBuffer, setMode, setTriangleQuantity, write
 
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setHasDirtyVertices, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateWorldData, updateWorldVectors, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Field Detail

coords

public float[][] coords
The coords.


gfx

public com.jmex.awt.swingui.ImageGraphics gfx
The gfx.

Constructor Detail

PolygonMesh

public PolygonMesh(java.lang.String name,
                   int x,
                   int y)
Instantiates a new polygon mesh.

Parameters:
name - the name
x - the x
y - the y
Method Detail

setBorder

public static void setBorder(com.jme.renderer.ColorRGBA c,
                             int borderWidth)
Sets the border.

Parameters:
c - the c
borderWidth - the border width

addCircleFilled

public void addCircleFilled(int radius,
                            com.jme.renderer.ColorRGBA c,
                            boolean border)
Adds the circle filled.

Parameters:
radius - the radius
c - the c
border - the border

addImage

public void addImage(java.net.URL resource)
Adds the image.

Parameters:
resource - the resource

addOvalFilled

public void addOvalFilled(int xRadius,
                          int yRadius,
                          com.jme.renderer.ColorRGBA c,
                          boolean border)
Adds the oval filled.

Parameters:
xRadius - the x radius
yRadius - the y radius
c - the c
border - the border

addPolygonFilled

public void addPolygonFilled(float[][] coords,
                             com.jme.renderer.ColorRGBA c,
                             boolean border)
Adds the polygon filled.

Parameters:
coords - the coords
c - the c
border - the border

addSquareFilled

public void addSquareFilled(com.jme.renderer.ColorRGBA c,
                            int curve,
                            boolean border)
Adds the square filled.

Parameters:
c - the c
curve - the curve
border - the border

addTriangleFilled

public void addTriangleFilled(com.jme.renderer.ColorRGBA c,
                              boolean border)
Adds the triangle filled.

Parameters:
c - the c
border - the border

changeTextureMode

public void changeTextureMode()
Change texture mode.


clear

public void clear()
Clear.


getOtherColour

public com.jme.renderer.ColorRGBA getOtherColour()
Gets the other colour.

Returns:
the other colour

getShapeType

public java.lang.String getShapeType()
Gets the shape type.

Returns:
the shape type

setOtherColour

public void setOtherColour(com.jme.renderer.ColorRGBA otherColour)
Sets the other colour.

Parameters:
otherColour - the new other colour

setShapeType

public void setShapeType(java.lang.String shapeType)
Sets the shape type.

Parameters:
shapeType - the new shape type