|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.scene.plugins.blender.AbstractBlenderHelper
com.jme3.scene.plugins.blender.curves.CurvesHelper
public class CurvesHelper
A class that is used in mesh calculations.
Field Summary | |
---|---|
protected int |
minimumBasisUFunctionDegree
Minimum basis U function degree for NURBS curves and surfaces. |
protected int |
minimumBasisVFunctionDegree
Minimum basis V function degree for NURBS curves and surfaces. |
Fields inherited from class com.jme3.scene.plugins.blender.AbstractBlenderHelper |
---|
blenderVersion, fixUpAxis, upAxisRotationQuaternion |
Constructor Summary | |
---|---|
CurvesHelper(java.lang.String blenderVersion,
boolean fixUpAxis)
This constructor parses the given blender version and stores the result. |
Method Summary | |
---|---|
protected java.util.List<Geometry> |
applyBevelAndTaper(Curve curve,
java.util.List<Geometry> bevelObject,
Curve taperObject,
boolean smooth,
BlenderContext blenderContext)
This method applies bevel and taper objects to the curve. |
protected Vector3f |
getLoc(Structure curveStructure)
This method returns the translation of the curve. |
protected float |
getTaperScale(float[] taperPoints,
float taperLength,
float percent)
This method returns the taper scale that should be applied to the object. |
protected java.util.List<Geometry> |
loadBezierCurve(Vector3f loc,
Structure nurb,
java.util.List<Geometry> bevelObject,
Curve taperObject,
BlenderContext blenderContext)
This method loads the bezier curve. |
protected java.util.List<Geometry> |
loadNurb(Vector3f loc,
Structure nurb,
java.util.List<Geometry> bevelObject,
Curve taperObject,
BlenderContext blenderContext)
This method loads the NURBS curve or surface. |
protected Curve |
loadTaperObject(Structure taperStructure,
BlenderContext blenderContext)
This method loads the taper object. |
boolean |
shouldBeLoaded(Structure structure,
BlenderContext blenderContext)
This method analyzes the given structure and the data contained within blender context and decides if the feature should be loaded. |
java.util.List<Geometry> |
toCurve(Structure curveStructure,
BlenderContext blenderContext)
This method converts given curve structure into a list of geometries representing the curve. |
Methods inherited from class com.jme3.scene.plugins.blender.AbstractBlenderHelper |
---|
applyProperties, clearState, isBlank, loadProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int minimumBasisUFunctionDegree
protected int minimumBasisVFunctionDegree
Constructor Detail |
---|
public CurvesHelper(java.lang.String blenderVersion, boolean fixUpAxis)
blenderVersion
- the version read from the blend filefixUpAxis
- a variable that indicates if the Y asxis is the UP axis or notMethod Detail |
---|
public java.util.List<Geometry> toCurve(Structure curveStructure, BlenderContext blenderContext) throws BlenderFileException
curveStructure
- the curve structureblenderContext
- the blender context
BlenderFileException
protected java.util.List<Geometry> loadBezierCurve(Vector3f loc, Structure nurb, java.util.List<Geometry> bevelObject, Curve taperObject, BlenderContext blenderContext) throws BlenderFileException
loc
- the translation of the curvenurb
- the nurb structurebevelObject
- the bevel objecttaperObject
- the taper objectblenderContext
- the blender context
BlenderFileException
- an exception is thrown when there are problems with the blender fileprotected java.util.List<Geometry> loadNurb(Vector3f loc, Structure nurb, java.util.List<Geometry> bevelObject, Curve taperObject, BlenderContext blenderContext) throws BlenderFileException
loc
- object's locationnurb
- the NURBS data structurebevelObject
- the bevel object to be appliedtaperObject
- the taper object to be appliedblenderContext
- the blender context
BlenderFileException
- an exception is throw when problems with blender loaded data occursprotected float getTaperScale(float[] taperPoints, float taperLength, float percent)
taperPoints
- the taper pointstaperLength
- the taper curve lengthpercent
- the percent of way along the whole taper curvestore
- the vector where the result will be storedprotected java.util.List<Geometry> applyBevelAndTaper(Curve curve, java.util.List<Geometry> bevelObject, Curve taperObject, boolean smooth, BlenderContext blenderContext)
curve
- the curve we apply the objects tobevelObject
- the bevel objecttaperObject
- the taper objectsmooth
- the smooth flagblenderContext
- the blender context
protected Curve loadTaperObject(Structure taperStructure, BlenderContext blenderContext) throws BlenderFileException
taperStructure
- the taper structureblenderContext
- the blender context
BlenderFileException
protected Vector3f getLoc(Structure curveStructure)
curveStructure
- the curve structure
public boolean shouldBeLoaded(Structure structure, BlenderContext blenderContext)
AbstractBlenderHelper
shouldBeLoaded
in class AbstractBlenderHelper
structure
- structure to be analyzedblenderContext
- the blender context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |