|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
synergynetframework.jme.gfx.twod.Grid
public class Grid
Grid
defines a four sided, two dimensional rectangular shape.
The local height of the Quad
defines it's size about the y-axis,
while the width defines the x-axis. The z-axis will always be 0. The plane is
subdivided into one or more sections along each axis, to form a grid of
smaller quads.
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 |
---|
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 | |
---|---|
Grid(java.lang.String name,
float width,
float height,
int xQuads,
int yQuads,
boolean centered)
Constructor creates a new Quade object with the provided
width and height. |
Method Summary | |
---|---|
void |
initialize(float width,
float height,
int xQuads,
int yQuads,
boolean centered)
initialize builds the data for the Grid object. |
void |
movePoint(int xIndex,
int yIndex,
float x,
float y)
Move a point within the grid. |
void |
moveUV(int xIndex,
int yIndex,
float x,
float y)
Move the texture coord of a point within the grid. |
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 |
Constructor Detail |
---|
public Grid(java.lang.String name, float width, float height, int xQuads, int yQuads, boolean centered)
Quade
object with the provided
width and height.
name
- The name of the Quad
.width
- The width of the Quad
.height
- The height of the Quad
.xQuads
- The number of quads along the x axisyQuads
- The number of quads along the y axiscentered
- If true, grid is centered on 0,0,0, otherwise the grid is from
0, 0, 0 to width, height, 0Method Detail |
---|
public void initialize(float width, float height, int xQuads, int yQuads, boolean centered)
initialize
builds the data for the Grid
object.
width
- the width of the Quad
.height
- the height of the Quad
.xQuads
- The number of quads along the x axisyQuads
- The number of quads along the y axiscentered
- If true, grid is centered on 0,0,0, otherwise the grid is from
0, 0, 0 to width, height, 0public void movePoint(int xIndex, int yIndex, float x, float y)
xIndex
- The x index of the point, from 0 to xQuadsyIndex
- The y index of the point, from 0 to yQuadsx
- The new x coordinate of the pointy
- The new y coordinate of the pointpublic void moveUV(int xIndex, int yIndex, float x, float y)
xIndex
- The x index of the point, from 0 to xQuadsyIndex
- The y index of the point, from 0 to yQuadsx
- The new texture x coordinate of the pointy
- The new texture y coordinate of the point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |