de.rico.engine.geometry.modelloader.threeds
Class Model3DS

java.lang.Object
  extended by de.rico.engine.geometry.AbstractMesh
      extended by de.rico.engine.geometry.MeshDL
          extended by de.rico.engine.geometry.modelloader.threeds.Model3DS
All Implemented Interfaces:
ImportableModelIface

public class Model3DS
extends MeshDL
implements ImportableModelIface

This class represents a 3DS (3D Studio Max) model. This model does support static models only. You can't animate the model. Basic loader technology found at the joglutils project: https://joglutils.dev.java.net/

Author:
joglutils project (changes and additions by Frank Bruns)

Constructor Summary
Model3DS(boolean smooth)
          Creates a new 3DS model mesh, optionally shaded smoothly.
Model3DS(boolean smooth, BoundingVolume type)
          Creates a new 3DS mesh object, optionally smooth shaded.
 
Method Summary
 java.lang.String getFilePath()
          Returns the file path of the model file used.
 void load(java.lang.String modelFile, float scale)
          This method loads a model from the specified file.
 
Methods inherited from class de.rico.engine.geometry.MeshDL
addFace, destroy, draw, finishModel, getDisplayListId, getFaces, getFacesTransformed, specializedDraw, update
 
Methods inherited from class de.rico.engine.geometry.AbstractMesh
addShader, drawShaders, getBoundingVolume, getHeightOffset, getMaterial, getMouseOverMesh, getName, getPosition, getPosX, getPosY, getPosZ, getRotation, getRotX, getRotY, getRotZ, getScaleX, getScaleY, getScaleZ, getTex0Path, getTex1Path, getText0XMovement, getText0YMovement, getText1XMovement, getText1YMovement, getTexUnit0, getTexUnit1, isCollidable, isDrawingEnabled, isEnabledOcclusionCulling, isMouseOverMesh, isOccluded, isPickable, isShadowEnabled, isSmoothShaded, isTex0Flipped, isTex0MipMapped, isTex0Rotated, isTex1Flipped, isTex1MipMapped, isTex1Rotated, moveBackwardsGlobal, moveBackwardsLocal, moveDownGlobal, moveForwardGlobal, moveForwardLocal, moveLeftGlobal, moveLeftLocal, moveRightGlobal, moveRightLocal, moveTo, moveUpGlobal, performTransformations, rotateDown, rotateLeft, rotateRight, rotateUp, scale, setAttachedGround, setBlendDestFactor, setBlendFunction, setBlendSourceFactor, setCollidable, setDrawingEnabled, setEnabledOcclusionCulling, setEnvironmentMap, setMaterial, setName, setPickable, setPosition, setPosition, setPosX, setPosY, setPosZ, setRotation, setRotation, setRotX, setRotY, setRotZ, setScaleX, setScaleY, setScaleZ, setShadowEnabled, setShowBoundingVolume, setTex0Movement, setTex0TexEnvirMode, setTex0XMovement, setTex0YMovement, setTex1Movement, setTex1TexEnvirMode, setTex1XMovement, setTex1YMovement, setTexUnit0, setTexUnit0, setTexUnit1, setTexUnit1, setTransparency, showWireFrame, translateX, translateY, translateZ
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Model3DS

public Model3DS(boolean smooth)
Creates a new 3DS model mesh, optionally shaded smoothly. A word of advice: If you decide to enable smooth shading the creation of the mesh will take more time than without smooth shading, because smooth normals need to be calculated beforehand, which is pretty time consuming depending on the amount of triangles in the mesh.

Parameters:
smooth - shade mesh smoothly? --> true=yes, false=no

Model3DS

public Model3DS(boolean smooth,
                BoundingVolume type)
Creates a new 3DS mesh object, optionally smooth shaded. You can specifiy the type of the used bounding volume, too.
A word of advice: If you decide to enable smooth shading the creation of the mesh will take more time than without smooth shading, because smooth normals need to be calculated beforehand, which is pretty time consuming depending on the amount of triangles in the mesh.

Parameters:
smooth - shade mesh smoothly? --> true=yes, false=no
type - value from the BoundingVolume enumeration
Method Detail

getFilePath

public java.lang.String getFilePath()
Description copied from interface: ImportableModelIface
Returns the file path of the model file used. This is usually important for the editor.

Specified by:
getFilePath in interface ImportableModelIface
Returns:
file path of the model file

load

public void load(java.lang.String modelFile,
                 float scale)
Description copied from interface: ImportableModelIface
This method loads a model from the specified file.

Specified by:
load in interface ImportableModelIface
Parameters:
modelFile - path to the model file
scale - scale factor