de.rico.engine.geometry.modelloader.ms3d
Class ModelMS3DAscii

java.lang.Object
  extended by de.rico.engine.geometry.AbstractMesh
      extended by de.rico.engine.geometry.MeshVA
          extended by de.rico.engine.geometry.modelloader.ms3d.ModelMS3DAscii
All Implemented Interfaces:
ImportableModelIface

public class ModelMS3DAscii
extends MeshVA
implements ImportableModelIface

A MilkshapeModel represents a Milkshape 3D model. Currently, it can only load the exported ascii text version of an MD3D model. In the future, the binary version may be supported, but there really is no need for it because it does not matter how long it takes to load the animation. Loading should take place at game startup. If speed becomes extremely important in the future, the binary loader may be an option, or serialized models is another option. Unless someone contributes a binary loader or add the nehe lwjgl port of the binary loader that actually loads multiple texture correctly :) The model can also draw itself, fully textured, to OpenGL via JOGL. Bone animation is also supported. SPECIAL THANKS: Animation method was ported by naj from a MSVC++ Model Viewer tutorial written by Mete Ciragan (creator of Milkshape). Found at: http://mypage.iu.edu/~natjohns/najgl/

Version:
0.1
Author:
naj (changes and additional code, such as JOGL port, by Frank Bruns)

Constructor Summary
ModelMS3DAscii()
          Creates a new Milkshape 3D ASCII model object.
ModelMS3DAscii(BoundingVolume type)
          Creates a new 3DS mesh object.
 
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.MeshVA
addAnimation, addFaces, destroy, draw, finishModel, getAnimation, getAnimations, getCurrentAnimation, getFaces, getFacesTransformed, getTotalFrameCount, removeAnimation, setAnimation, 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

ModelMS3DAscii

public ModelMS3DAscii()
Creates a new Milkshape 3D ASCII model object.


ModelMS3DAscii

public ModelMS3DAscii(BoundingVolume type)
Creates a new 3DS mesh object. You can specifiy the type of the used bounding volume, too.

Parameters:
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