Package com.simsilica.lemur.geom
Class MBox
java.lang.Object
com.jme3.scene.Mesh
com.simsilica.lemur.geom.MBox
- All Implemented Interfaces:
Savable
,JmeCloneable
,Cloneable
A mesh implementation that creates a box with a specified
number of slices, masking off one or more sides. Separate
slice counts can be provided for x,y,z axes and any or all
of the sides can be turns on or off. In other words, this
can be used directly as a Box implementation with more
triangles (subdivided) or it can be used as a subdivided
Quad if only one side it specified.
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Create a shallow clone of this Mesh.protected int
fillSide
(int lastIndex, int side, int colAxis, int colCount, int rowAxis, int rowCount, int otherAxis, FloatBuffer verts, FloatBuffer norms, FloatBuffer texes, ShortBuffer index) void
read
(JmeImporter e) protected void
void
protected float[]
spread
(float min, float max, int count) void
write
(JmeExporter e) Methods inherited from class com.jme3.scene.Mesh
addMorphTarget, clearBuffer, clearCollisionData, cloneFields, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getInstanceCount, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getMorphIndex, getMorphTarget, getMorphTargetNames, getMorphTargets, getNumLodLevels, getPatchVertexCount, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, hasMorphTargets, isAnimated, isAnimatedByBone, isAnimatedByJoint, jmeClone, prepareForAnim, removeMorphTarget, removeMorphTarget, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPatchVertexCount, setStatic, setStreamed, updateBound, updateCounts
-
Field Details
-
TOP_MASK
public static final int TOP_MASK- See Also:
-
BOTTOM_MASK
public static final int BOTTOM_MASK- See Also:
-
FRONT_MASK
public static final int FRONT_MASK- See Also:
-
BACK_MASK
public static final int BACK_MASK- See Also:
-
LEFT_MASK
public static final int LEFT_MASK- See Also:
-
RIGHT_MASK
public static final int RIGHT_MASK- See Also:
-
ALL_MASK
public static final int ALL_MASK- See Also:
-
-
Constructor Details
-
MBox
public MBox()Serialization only. Do not use. -
MBox
public MBox(float xExtent, float yExtent, float zExtent, int xSlices, int ySlices, int zSlices) -
MBox
public MBox(float xExtent, float yExtent, float zExtent, int xSlices, int ySlices, int zSlices, int sideMask)
-
-
Method Details
-
getExtents
-
resize
-
clone
Description copied from class:Mesh
Create a shallow clone of this Mesh. Thevertex buffers
are shared between this and the clone mesh, the rest of the data is cloned. -
refreshGeometry
protected void refreshGeometry() -
spread
protected float[] spread(float min, float max, int count) -
fillSide
protected int fillSide(int lastIndex, int side, int colAxis, int colCount, int rowAxis, int rowCount, int otherAxis, FloatBuffer verts, FloatBuffer norms, FloatBuffer texes, ShortBuffer index) -
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classMesh
- Throws:
IOException
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classMesh
- Throws:
IOException
-