sdr 0.7

net.cscott.sdr.anim
Class Star

java.lang.Object
  extended by com.jme.scene.SceneElement
      extended by com.jme.scene.Spatial
          extended by com.jme.scene.Geometry
              extended by com.jme.scene.TriMesh
                  extended by net.cscott.sdr.anim.Star
All Implemented Interfaces:
com.jme.util.export.Savable, Serializable

public class Star
extends com.jme.scene.TriMesh

Star defines a N-sided, two dimensional star. The star fits in a circle with diameter size units. The center is at the origin. Texture coordinates are assigned such that i ranges from 0 at the center of the star to 1/2 where the points meet, to 1 at the tip of the point; and j ranges from 0 at the centerline of the point, to 1 at the edge of the point. This texture assignment makes it easy to create textures with radial gradients or outlines, but probably makes it hard to overlay an undistorted image on the star.

Version:
$Id: Star.java,v 1.2 2006-11-12 20:23:37 cananian Exp $
Author:
C. Scott Ananian
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.scene.Geometry
batchList
 
Fields inherited from class com.jme.scene.Spatial
geometricalControllers, localRotation, localScale, localTranslation, parent, worldRotation, worldScale, worldTranslation
 
Fields inherited from class com.jme.scene.SceneElement
COMPOSITE_MESH, CULL_ALWAYS, CULL_DYNAMIC, CULL_INHERIT, CULL_NEVER, cullMode, frustrumIntersects, GEOMBATCH, GEOMETRY, isCollidable, lightCombineMode, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, NM_GL_NORMALIZE_IF_SCALED, NM_GL_NORMALIZE_PROVIDED, NM_INHERIT, NM_OFF, NM_USE_PROVIDED, NODE, normalsMode, QUADBATCH, queueDistance, renderQueueMode, renderStateList, SHARED_MESH, SHAREDBATCH, SKY_BOX, TERRAIN_BLOCK, TERRAIN_PAGE, textureCombineMode, TRIANGLEBATCH, TRIMESH, worldBound, zOrder
 
Constructor Summary
Star(String name, float nPoints, float diameter)
          Constructor creates a new Star object with nPoints points and which fits in a circle of the given diameter.
 
Method Summary
 com.jme.math.Vector3f getCenter()
          getCenter returns the center of the Star.
 void initialize(float nPoints, float diameter)
          initialize(float,float) builds the data for the Star object.
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getBatch, getIndexBuffer, getMeshAsTriangles, getMeshAsTrianglesVertices, getTriangle, getTriangle, getTriangle, getTriangle, getTriangleCount, getType, hasCollision, hasTriangleCollision, hasTriangleCollision, reconstruct, reconstruct, setIndexBuffer, setupBatchList
 
Methods inherited from class com.jme.scene.Geometry
addBatch, applyRenderState, clearBatches, copyTextureCoords, copyTextureCoords, findPick, getBatchCount, getBatchIndex, getColorBuffer, getNormalBuffer, getNumberOfUnits, getTextureBuffer, getTextureBuffers, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldCoords, getWorldNormals, getWorldNormals, lockBounds, lockMeshes, lockShadows, lockTransforms, randomVertex, read, reconstruct, reconstruct, removeBatch, removeBatch, setColorBuffer, setDefaultColor, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTextureBuffer, setTextureBuffer, setVBOInfo, setVBOInfo, setVertexBuffer, swapBatches, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldData, write
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, getController, getControllers, getCullMode, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getNormalsMode, getParent, getRenderQueueMode, getTextureCombineMode, getUserData, getWorldRotation, getWorldScale, getWorldTranslation, localToWorld, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setParent, setUserData, setZOrder, updateGeometricState, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, worldToLocal
 
Methods inherited from class com.jme.scene.SceneElement
clearRenderState, getClassTag, getLastFrustumIntersection, getLocalCullMode, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalTextureCombineMode, getLocks, getName, getRenderState, getWorldBound, getZOrder, isCollidable, lock, lock, lockBranch, lockMeshes, setCullMode, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocks, setLocks, setName, setNormalsMode, setRenderQueueMode, setRenderState, setTextureCombineMode, setZOrder, toString, unlock, unlock, unlockBranch, unlockMeshes, updateRenderState, updateRenderState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Constructor Detail

Star

public Star(String name,
            float nPoints,
            float diameter)
Constructor creates a new Star object with nPoints points and which fits in a circle of the given diameter.

Method Detail

initialize

public void initialize(float nPoints,
                       float diameter)
initialize(float,float) builds the data for the Star object.


getCenter

public com.jme.math.Vector3f getCenter()
getCenter returns the center of the Star.

Returns:
Vector3f the center of the Star.

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian