Class l3d.L3DObject
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class l3d.L3DObject

java.lang.Object
   |
   +----l3d.L3DObject

public class L3DObject
extends Object
Live3D Object utility
GENERAL NOTES:
Unless otherwise noted: Methods return 1 (true) or 0 (false)
THE FOLLOWING CODES APPLY TO EACH METHOD LISTED:
GOOD = Method has been implemented and tested
AVAIL = Method has been implemented but not tested
NYA = Method has not been implemented.

Variable Index

 o ANIMATE_BACKWARD
 o ANIMATE_FORWARD
 o ANIMATE_LOOP
 o ANIMATE_PINGPONG
Variables for Animation nPlayMode
 o AXISALIGNMENT_NONE
 o AXISALIGNMENT_XYZ
 o AXISALIGNMENT_ZORIENTX
 o AXISALIGNMENT_ZORIENTY
Variables for Axis Alignment operations
 o COLLISION_OFF
 o COLLISION_ON
Variables for nCollideStyle
 o GEOMETRYMODE_EMPTY
 o GEOMETRYMODE_POINTS
 o GEOMETRYMODE_SOLID
 o GEOMETRYMODE_WIREFRAME
Variables for geometry sampling operations
 o MODE_GLOBAL
 o MODE_LOCAL
Variables for local/global modes (nLocal)
 o MODE_POSTCONCATENATE
 o MODE_PRECONCATENATE
 o MODE_REPLACE
Variables for matrix/transform (nMode) operations
 o MORPH_BACKWARD
 o MORPH_FORWARD
 o MORPH_LOOP
 o MORPH_PINGPONG
Variables for nMorphType
 o SHADINGMODE_FLAT
 o SHADINGMODE_NONE
 o SHADINGMODE_PHONG
 o SHADINGMODE_SMOOTH
Variables for shading operations
 o SOUND_LOOP
 o SOUND_PLAY_ONCE
Variables for Sound nPlayMode
 o TEXTURE_LIGHT_OFF
 o TEXTURE_LIGHT_ON
Variables for nTextureLightingMode
 o nObjectId
 o observer

Constructor Index

 o L3DObject()

Method Index

 o animate(String)
Loads animation .vue file and applies to object NYA.
 o clone()
Creates a clone of the object, A new instance is allocated and a bitwise clone of the current object is place in the new object.
 o getAnchor(String)
Get Anchor NYA.
 o getAxisAlignment()
Get axis alignment state for object NYA.
 o getBBox(float[])
Get Bounding Box of an object NYA.
 o getBBoxCenter(float[])
Get Bounding Box center coordinates for an object NYA.
 o getBBoxSize(float[])
Get Bounding Box size for an object NYA.
 o getCollideStyle()
Get Collision Detection mode for an object NYA.
 o getColor(float[])
Sets object color (RGB) NYA.
 o getColorHLS(float[])
Gets object color (HLS) Hue, Luminance, Saturation NYA.
 o getGeometrySampling()
Get Geometry Type for Object NYA.
 o getName(String)
Get Name NYA.
 o getNumVertices()
Get Number of Vertices on Object NYA.
 o getOrientation(float[])
Get Objects Current Orientation NYA.
 o getPosition(float[])
Get Objects Current Position NYA.
 o getShadingMode()
Get Shading Type for Object NYA.
 o getTexture(String)
Get Objects Current Texture NYA.
 o getTextureLightingMode()
Get Texture lighting mode for an object NYA.
 o getTransform(float[])
Get current Transform of Object GOOD.
 o getTransparency()
Get Objects Transparency value NYA.
 o getVertices(int, float[])
Get Coordinates of Vertices on Object NYA.
 o hide()
Hide Object GOOD.
 o morph(L3DObject, L3DObject, L3DObject, int, int)
Morphs an object from start object to end object (All must have same # of vertices) NYA.
 o playAnimation(int, int, int)
Plays animation .vue file and applies to object NYA.
 o playSound(int)
Plays Sound NYA.
 o rotate(float, float, float, int, int)
Rotate object GOOD.
 o scale(float, float, float, int, int)
Scale object GOOD.
 o select(int, int, int)
select an object or multiple objects NYA.
 o setAnchor(String)
Set Anchor NYA.
 o setAxisAlignment(int)
Turn on/off axis alignment for object NYA.
 o setBBox(float[])
Set Bounding Box of an object NYA.
 o setBBoxCenter(float[])
Set Bounding Box center coordinates for an object NYA.
 o setBBoxSize(float[])
Set Bounding Box size for an object NYA.
 o setCollideStyle(int)
Set Collision Detection mode for an object NYA.
 o setColor(float, float, float)
Sets object color (RGB) GOOD.
 o setColorHLS(float, float, float)
Sets object color (HLS) Hue, Luminance, Saturation GOOD.
 o setDescription(String)
Sets object info description NYA.
 o setGeometrySampling(int)
Set Geometry Type for Object NYA.
 o setName(String)
Set Name NYA.
 o setOrientation(float, float, float)
Sets object orientation NYA.
 o setPosition(float, float, float)
Sets object position NYA.
 o setShadingMode(int)
Set Shading Type for Object NYA.
 o setTexture(String)
Set Objects Current Texture NYA.
 o setTextureLightingMode(int)
Set Texture lighting mode for an object NYA.
 o setTransparency(float)
Set Objects Transparency value GOOD.
 o setVertices(int, float[])
Set Coordinates of Vertices on Object NYA.
 o show()
Show Object GOOD.
 o spin(float, float, float, float, int)
Turns on the spin mode and sets its parameters NYA.
 o streamOut(String)
Stream out this to the specified string ...
 o transform(float[], int)
Transform object GOOD.
 o translate(float, float, float, int, int)
Translate object GOOD.

Variables

 o observer
  public L3DObserver observer
 o nObjectId
  public int nObjectId
 o MODE_PRECONCATENATE
  public final static int MODE_PRECONCATENATE
 o MODE_POSTCONCATENATE
  public final static int MODE_POSTCONCATENATE
 o MODE_REPLACE
  public final static int MODE_REPLACE
Variables for matrix/transform (nMode) operations
 o MODE_GLOBAL
  public final static int MODE_GLOBAL
 o MODE_LOCAL
  public final static int MODE_LOCAL
Variables for local/global modes (nLocal)
 o SOUND_PLAY_ONCE
  public final static int SOUND_PLAY_ONCE
Variables for Sound nPlayMode
 o SOUND_LOOP
  public final static int SOUND_LOOP
 o COLLISION_OFF
  public final static int COLLISION_OFF
 o COLLISION_ON
  public final static int COLLISION_ON
Variables for nCollideStyle
 o TEXTURE_LIGHT_OFF
  public final static int TEXTURE_LIGHT_OFF
 o TEXTURE_LIGHT_ON
  public final static int TEXTURE_LIGHT_ON
Variables for nTextureLightingMode
 o MORPH_FORWARD
  public final static int MORPH_FORWARD
 o MORPH_BACKWARD
  public final static int MORPH_BACKWARD
 o MORPH_LOOP
  public final static int MORPH_LOOP
 o MORPH_PINGPONG
  public final static int MORPH_PINGPONG
Variables for nMorphType
 o ANIMATE_FORWARD
  public final static int ANIMATE_FORWARD
 o ANIMATE_BACKWARD
  public final static int ANIMATE_BACKWARD
 o ANIMATE_LOOP
  public final static int ANIMATE_LOOP
 o ANIMATE_PINGPONG
  public final static int ANIMATE_PINGPONG
Variables for Animation nPlayMode
 o AXISALIGNMENT_NONE
  public final static int AXISALIGNMENT_NONE
 o AXISALIGNMENT_ZORIENTX
  public final static int AXISALIGNMENT_ZORIENTX
 o AXISALIGNMENT_ZORIENTY
  public final static int AXISALIGNMENT_ZORIENTY
Variables for Axis Alignment operations
 o AXISALIGNMENT_XYZ
  public final static int AXISALIGNMENT_XYZ
 o SHADINGMODE_NONE
  public final static int SHADINGMODE_NONE
 o SHADINGMODE_FLAT
  public final static int SHADINGMODE_FLAT
 o SHADINGMODE_SMOOTH
  public final static int SHADINGMODE_SMOOTH
Variables for shading operations
 o SHADINGMODE_PHONG
  public final static int SHADINGMODE_PHONG
 o GEOMETRYMODE_EMPTY
  public final static int GEOMETRYMODE_EMPTY
 o GEOMETRYMODE_POINTS
  public final static int GEOMETRYMODE_POINTS
 o GEOMETRYMODE_WIREFRAME
  public final static int GEOMETRYMODE_WIREFRAME
Variables for geometry sampling operations
 o GEOMETRYMODE_SOLID
  public final static int GEOMETRYMODE_SOLID

Constructors

 o L3DObject
  public L3DObject()

Methods

 o clone
  protected Object clone() throws CloneNotSupportedException
Creates a clone of the object, A new instance is allocated and a bitwise clone of the current object is place in the new object. NYA.
Returns:
a clone of this Object.
Throws: OutOfMemoryError
If there is not enough memory.
Throws: CloneNotSupportedException
Object explicitly does not want to be cloned, or it does not support the Cloneable interface.
Overrides:
clone in class Object
 o setPosition
  public int setPosition(float fXPos,
                         float fYPos,
                         float fZPos)
Sets object position NYA.
Parameters:
fXPos - X Position
fYPos - Y Position
fZPos - Z Position
 o setOrientation
  public int setOrientation(float fPitch,
                            float fYaw,
                            float fRoll)
Sets object orientation NYA.
Parameters:
fPitch - X Rotation Value (radians)
fYaw - Y Rotation Value (radians)
fRoll - Z Rotation Value (radians)
 o setDescription
  public int setDescription(String strDescription)
Sets object info description NYA.
Parameters:
strDescription - String value of Object Description
 o hide
  public int hide()
Hide Object GOOD.
 o show
  public int show()
Show Object GOOD.
 o select
  public int select(int nSelectionState,
                    int nSelectChildren,
                    int nExclusiveSelection)
select an object or multiple objects NYA.
Parameters:
nSelectionState - Selection State On/Off
nSelectChildren - Select children of this object too
nExclusiveSelection - UnSelect all previous objects in selected state
 o rotate
  public int rotate(float fPitch,
                    float fYaw,
                    float fRoll,
                    int nMode,
                    int nLocal)
Rotate object GOOD.
Parameters:
fPitch - X Rotation Value (radians)
fYaw - Y Rotation Value (radians)
fRoll - Z Rotation Value (radians)
nMode - Mode value (Pre-, Post-concatenate, or Replace)
nLocal - Integer value (0=false, 1=true) for Local Mode
 o scale
  public int scale(float fScaleX,
                   float fScaleY,
                   float fScaleZ,
                   int nMode,
                   int nLocal)
Scale object GOOD.
Parameters:
fScaleX - X Scale Value
fScaleY - Y Scale Value
fScaleZ - Z Scale Value
nMode - Mode value (Pre-, Post-concatenate, or Replace)
nLocal - Integer value (0=false, 1=true) for Local Mode
 o translate
  public int translate(float fTranslateX,
                       float fTranslateY,
                       float fTranslateZ,
                       int nMode,
                       int nLocal)
Translate object GOOD.
Parameters:
fTranslateX - X Translation Value
fTranslateY - Y Translation Value
fTranslateZ - Z Translation Value
nMode - Mode value (Pre-, Post-concatenate, or Replace)
nLocal - Integer value (0=false, 1=true) for Local Mode
 o transform
  public int transform(float fMatrix[],
                       int nMode)
Transform object GOOD.
Parameters:
fMatrix - Matrix Array (16-values)
nMode - Mode value (Pre-, Post-concatenate, or Replace)
 o getTransform
  public int getTransform(float fMatrix[])
Get current Transform of Object GOOD.
Parameters:
fMatrix - Matrix Array (16-values), zeroed to hold return
 o getNumVertices
  public int getNumVertices()
Get Number of Vertices on Object NYA.
 o setVertices
  public int setVertices(int nNumVertices,
                         float fCoords[])
Set Coordinates of Vertices on Object NYA.
Parameters:
nNumVertices - Integer of vertex count
fCoords - Array of x,y,z coordinates for vertices (Size = 3*numVertices)
 o getVertices
  public int getVertices(int nNumVertices,
                         float fCoords[])
Get Coordinates of Vertices on Object NYA.
Parameters:
nNumVertices - Integer of vertex count
fCoords - Null array to hold vertex coordinates (Size = 3*numVertices)
Returns:
fCoords Array of x,y,z coordinates for vertices (Size = 3*numVertices)
 o getPosition
  public int getPosition(float fPosition[])
Get Objects Current Position NYA.
Parameters:
fPosition - Null 3-Value array to hold x, y, z information
Returns:
fPosition 3-Value Array of x,y,z coordinates for Object
 o getOrientation
  public int getOrientation(float fOrientation[])
Get Objects Current Orientation NYA.
Parameters:
fOrientation - Null 3-Value array to hold x, y, z rotation information
Returns:
fOrientation 3-Value Array of x,y,z rotations for Object
 o setTexture
  public int setTexture(String strURL)
Set Objects Current Texture NYA.
Parameters:
strURL - URL and filename of Texture to apply
 o getTexture
  public int getTexture(String strURL)
Get Objects Current Texture NYA.
Parameters:
strURL - URL and filename of Texture currently applied
 o setTransparency
  public int setTransparency(float fTransparency)
Set Objects Transparency value GOOD.
Parameters:
fTransparency - float value (0-1) of transparency (1 is transparent)
 o getTransparency
  public float getTransparency()
Get Objects Transparency value NYA.
Returns:
float value (0-1) of transparency (1 is transparent)
 o setColor
  public int setColor(float fRed,
                      float fGreen,
                      float fBlue)
Sets object color (RGB) GOOD.
Parameters:
fRed - Red Value (0-1)
fGreen - Green Value (0-1)
fBlue - Blue Value (0-1)
 o getColor
  public int getColor(float fColor[])
Sets object color (RGB) NYA.
Parameters:
fColor - 3-Value float Array (R,G,B - Each value is 0-1)
 o setColorHLS
  public int setColorHLS(float fHue,
                         float fLightness,
                         float fSaturation)
Sets object color (HLS) Hue, Luminance, Saturation GOOD.
Parameters:
fHue - Hue Value (0-1)
fLightness - Green Value (0-1)
fBlue - Blue Value (0-1)
 o getColorHLS
  public int getColorHLS(float fColorHLS[])
Gets object color (HLS) Hue, Luminance, Saturation NYA.
Parameters:
fColorHLS - Null 3-part array to hold return values
Returns:
fColorHLS 3-Part array with H,L,S values (0-1)
 o playSound
  public int playSound(int nPlayMode)
Plays Sound NYA.
Parameters:
nPlayMode - Mode of sound playing (play once or Loop)
 o setAnchor
  public int setAnchor(String strAnchor)
Set Anchor NYA.
Parameters:
strAnchor - String value of Anchor target
 o getAnchor
  public int getAnchor(String strAnchor)
Get Anchor NYA.
Parameters:
strAnchor - Null String to receive value
Returns:
strAnchor String value of Anchor target
 o setName
  public int setName(String strName)
Set Name NYA.
Parameters:
strName - String name of object
 o getName
  public int getName(String strName)
Get Name NYA.
Parameters:
strName - Null String to receive value
Returns:
strName String name of Object
 o setGeometrySampling
  public int setGeometrySampling(int nGeometrySampling)
Set Geometry Type for Object NYA.
Parameters:
nGeometrySampling - Value of geometry mode (point cloud, wire, flat, smooth)
 o getGeometrySampling
  public int getGeometrySampling()
Get Geometry Type for Object NYA.
Returns:
Integer Value of geometry mode (point cloud, wire, flat, smooth)
 o setShadingMode
  public int setShadingMode(int nShadingMode)
Set Shading Type for Object NYA.
Parameters:
nShadingMode - Value of shading mode (none, flat, gouraud, phong, garlic)
 o getShadingMode
  public int getShadingMode()
Get Shading Type for Object NYA.
Returns:
Integer Value of shading mode (none, flat, gouraud, phong, garlic)
 o setAxisAlignment
  public int setAxisAlignment(int nAxisAlignment)
Turn on/off axis alignment for object NYA.
Parameters:
nAxisAlignment - Integer value of axis alignment
 o getAxisAlignment
  public int getAxisAlignment()
Get axis alignment state for object NYA.
Returns:
Integer value of axis alignment condition
 o setTextureLightingMode
  public int setTextureLightingMode(int nTextureLightingMode)
Set Texture lighting mode for an object NYA.
Parameters:
nTextureLightingMode - Integer value of texture lighting
 o getTextureLightingMode
  public int getTextureLightingMode()
Get Texture lighting mode for an object NYA.
Returns:
Integer value of texture lighting
 o setCollideStyle
  public int setCollideStyle(int nCollideStyle)
Set Collision Detection mode for an object NYA.
Parameters:
nCollideStyle - Integer value of collision mode
 o getCollideStyle
  public int getCollideStyle()
Get Collision Detection mode for an object NYA.
Returns:
Integer value of collision mode
 o getBBox
  public int getBBox(float fBBox[])
Get Bounding Box of an object NYA.
Parameters:
fBBox - Null 6-part array to hold Bounding Box values
Returns:
fBBox 6-part array, 1-3 x,y,z of back lower left coords, 4-6 xyz of front upper right
 o setBBox
  public int setBBox(float fBBox[])
Set Bounding Box of an object NYA.
Parameters:
fBBox - 6-part array, 1-3 x,y,z of back lower left coords, 4-6 xyz of front upper right
 o getBBoxSize
  public int getBBoxSize(float fBBoxSize[])
Get Bounding Box size for an object NYA.
Parameters:
fBBoxSize - Null 3-part array to hold values
Returns:
fBBoxSize 3-Part array with height, width, and length of box
 o setBBoxSize
  public int setBBoxSize(float fBBoxSize[])
Set Bounding Box size for an object NYA.
Parameters:
fBBoxSize - 3-Part array with height, width, and length of box
 o getBBoxCenter
  public int getBBoxCenter(float fBBoxCenter[])
Get Bounding Box center coordinates for an object NYA.
Parameters:
fBBoxCenter - Null 3-part array to hold values
Returns:
fBBoxCenter 3-Part array with x, y, z center of box
 o setBBoxCenter
  public int setBBoxCenter(float fBBoxCenter[])
Set Bounding Box center coordinates for an object NYA.
Parameters:
fBBoxCenter - 3-Part array with x, y, z center of box
 o spin
  public int spin(float fPitch,
                  float fYaw,
                  float fRoll,
                  float fAngle,
                  int nLocal)
Turns on the spin mode and sets its parameters NYA.
Parameters:
fPitch - X Rotation Value (radians)
fYaw - Y Rotation Value (radians)
fRoll - Z Rotation Value (radians)
nMode - Mode value (Pre-, Post-concatenate, or Replace)
nLocal - Integer value (0=false, 1=true) for Local Mode
 o animate
  public int animate(String strURL)
Loads animation .vue file and applies to object NYA.
Parameters:
strURL - URL and name of .vue file
 o playAnimation
  public int playAnimation(int nStartFrame,
                           int nEndFrame,
                           int nPlayMode)
Plays animation .vue file and applies to object NYA.
Parameters:
nStartFrame - starting frame of animation
nEndFrame - ending frame of animation
nPlayMode - sets mode (play once, loop, ping-pong)
 o morph
  public int morph(L3DObject objectStart,
                   L3DObject objectEnd,
                   L3DObject objectmorph,
                   int nFrames,
                   int nMorphType)
Morphs an object from start object to end object (All must have same # of vertices) NYA.
Parameters:
objectStart - the starting object
objectEnd - the ending object
objectMorph - the object that will be morphed
nFrames - The number of frames over which the morph occurs
nMorphType - (forward, backward, ping-pong)
 o streamOut
  public int streamOut(String strStream)
Stream out this to the specified string ... append at end NYA.
Parameters:
strStream - String to stream to

All Packages  Class Hierarchy  This Package  Previous  Next  Index