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.
-
ANIMATE_BACKWARD
-
-
ANIMATE_FORWARD
-
-
ANIMATE_LOOP
-
-
ANIMATE_PINGPONG
- Variables for Animation nPlayMode
-
AXISALIGNMENT_NONE
-
-
AXISALIGNMENT_XYZ
-
-
AXISALIGNMENT_ZORIENTX
-
-
AXISALIGNMENT_ZORIENTY
- Variables for Axis Alignment operations
-
COLLISION_OFF
-
-
COLLISION_ON
- Variables for nCollideStyle
-
GEOMETRYMODE_EMPTY
-
-
GEOMETRYMODE_POINTS
-
-
GEOMETRYMODE_SOLID
-
-
GEOMETRYMODE_WIREFRAME
- Variables for geometry sampling operations
-
MODE_GLOBAL
-
-
MODE_LOCAL
- Variables for local/global modes (nLocal)
-
MODE_POSTCONCATENATE
-
-
MODE_PRECONCATENATE
-
-
MODE_REPLACE
- Variables for matrix/transform (nMode) operations
-
MORPH_BACKWARD
-
-
MORPH_FORWARD
-
-
MORPH_LOOP
-
-
MORPH_PINGPONG
- Variables for nMorphType
-
SHADINGMODE_FLAT
-
-
SHADINGMODE_NONE
-
-
SHADINGMODE_PHONG
-
-
SHADINGMODE_SMOOTH
- Variables for shading operations
-
SOUND_LOOP
-
-
SOUND_PLAY_ONCE
- Variables for Sound nPlayMode
-
TEXTURE_LIGHT_OFF
-
-
TEXTURE_LIGHT_ON
- Variables for nTextureLightingMode
-
nObjectId
-
-
observer
-
-
L3DObject()
-
-
animate(String)
- Loads animation .vue file and applies to object
NYA.
-
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.
-
getAnchor(String)
- Get Anchor
NYA.
-
getAxisAlignment()
- Get axis alignment state for object
NYA.
-
getBBox(float[])
- Get Bounding Box of an object
NYA.
-
getBBoxCenter(float[])
- Get Bounding Box center coordinates for an object
NYA.
-
getBBoxSize(float[])
- Get Bounding Box size for an object
NYA.
-
getCollideStyle()
- Get Collision Detection mode for an object
NYA.
-
getColor(float[])
- Sets object color (RGB)
NYA.
-
getColorHLS(float[])
- Gets object color (HLS)
Hue, Luminance, Saturation
NYA.
-
getGeometrySampling()
- Get Geometry Type for Object
NYA.
-
getName(String)
- Get Name
NYA.
-
getNumVertices()
- Get Number of Vertices on Object
NYA.
-
getOrientation(float[])
- Get Objects Current Orientation
NYA.
-
getPosition(float[])
- Get Objects Current Position
NYA.
-
getShadingMode()
- Get Shading Type for Object
NYA.
-
getTexture(String)
- Get Objects Current Texture
NYA.
-
getTextureLightingMode()
- Get Texture lighting mode for an object
NYA.
-
getTransform(float[])
- Get current Transform of Object
GOOD.
-
getTransparency()
- Get Objects Transparency value
NYA.
-
getVertices(int, float[])
- Get Coordinates of Vertices on Object
NYA.
-
hide()
- Hide Object
GOOD.
-
morph(L3DObject, L3DObject, L3DObject, int, int)
- Morphs an object from start object to end object (All must have same # of vertices)
NYA.
-
playAnimation(int, int, int)
- Plays animation .vue file and applies to object
NYA.
-
playSound(int)
- Plays Sound
NYA.
-
rotate(float, float, float, int, int)
- Rotate object
GOOD.
-
scale(float, float, float, int, int)
- Scale object
GOOD.
-
select(int, int, int)
- select an object or multiple objects
NYA.
-
setAnchor(String)
- Set Anchor
NYA.
-
setAxisAlignment(int)
- Turn on/off axis alignment for object
NYA.
-
setBBox(float[])
- Set Bounding Box of an object
NYA.
-
setBBoxCenter(float[])
- Set Bounding Box center coordinates for an object
NYA.
-
setBBoxSize(float[])
- Set Bounding Box size for an object
NYA.
-
setCollideStyle(int)
- Set Collision Detection mode for an object
NYA.
-
setColor(float, float, float)
- Sets object color (RGB)
GOOD.
-
setColorHLS(float, float, float)
- Sets object color (HLS)
Hue, Luminance, Saturation
GOOD.
-
setDescription(String)
- Sets object info description
NYA.
-
setGeometrySampling(int)
- Set Geometry Type for Object
NYA.
-
setName(String)
- Set Name
NYA.
-
setOrientation(float, float, float)
- Sets object orientation
NYA.
-
setPosition(float, float, float)
- Sets object position
NYA.
-
setShadingMode(int)
- Set Shading Type for Object
NYA.
-
setTexture(String)
- Set Objects Current Texture
NYA.
-
setTextureLightingMode(int)
- Set Texture lighting mode for an object
NYA.
-
setTransparency(float)
- Set Objects Transparency value
GOOD.
-
setVertices(int, float[])
- Set Coordinates of Vertices on Object
NYA.
-
show()
- Show Object
GOOD.
-
spin(float, float, float, float, int)
- Turns on the spin mode and sets its parameters
NYA.
-
streamOut(String)
- Stream out this to the specified string ...
-
transform(float[], int)
- Transform object
GOOD.
-
translate(float, float, float, int, int)
- Translate object
GOOD.
observer
public L3DObserver observer
nObjectId
public int nObjectId
MODE_PRECONCATENATE
public final static int MODE_PRECONCATENATE
MODE_POSTCONCATENATE
public final static int MODE_POSTCONCATENATE
MODE_REPLACE
public final static int MODE_REPLACE
- Variables for matrix/transform (nMode) operations
MODE_GLOBAL
public final static int MODE_GLOBAL
MODE_LOCAL
public final static int MODE_LOCAL
- Variables for local/global modes (nLocal)
SOUND_PLAY_ONCE
public final static int SOUND_PLAY_ONCE
- Variables for Sound nPlayMode
SOUND_LOOP
public final static int SOUND_LOOP
COLLISION_OFF
public final static int COLLISION_OFF
COLLISION_ON
public final static int COLLISION_ON
- Variables for nCollideStyle
TEXTURE_LIGHT_OFF
public final static int TEXTURE_LIGHT_OFF
TEXTURE_LIGHT_ON
public final static int TEXTURE_LIGHT_ON
- Variables for nTextureLightingMode
MORPH_FORWARD
public final static int MORPH_FORWARD
MORPH_BACKWARD
public final static int MORPH_BACKWARD
MORPH_LOOP
public final static int MORPH_LOOP
MORPH_PINGPONG
public final static int MORPH_PINGPONG
- Variables for nMorphType
ANIMATE_FORWARD
public final static int ANIMATE_FORWARD
ANIMATE_BACKWARD
public final static int ANIMATE_BACKWARD
ANIMATE_LOOP
public final static int ANIMATE_LOOP
ANIMATE_PINGPONG
public final static int ANIMATE_PINGPONG
- Variables for Animation nPlayMode
AXISALIGNMENT_NONE
public final static int AXISALIGNMENT_NONE
AXISALIGNMENT_ZORIENTX
public final static int AXISALIGNMENT_ZORIENTX
AXISALIGNMENT_ZORIENTY
public final static int AXISALIGNMENT_ZORIENTY
- Variables for Axis Alignment operations
AXISALIGNMENT_XYZ
public final static int AXISALIGNMENT_XYZ
SHADINGMODE_NONE
public final static int SHADINGMODE_NONE
SHADINGMODE_FLAT
public final static int SHADINGMODE_FLAT
SHADINGMODE_SMOOTH
public final static int SHADINGMODE_SMOOTH
- Variables for shading operations
SHADINGMODE_PHONG
public final static int SHADINGMODE_PHONG
GEOMETRYMODE_EMPTY
public final static int GEOMETRYMODE_EMPTY
GEOMETRYMODE_POINTS
public final static int GEOMETRYMODE_POINTS
GEOMETRYMODE_WIREFRAME
public final static int GEOMETRYMODE_WIREFRAME
- Variables for geometry sampling operations
GEOMETRYMODE_SOLID
public final static int GEOMETRYMODE_SOLID
L3DObject
public L3DObject()
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
setPosition
public int setPosition(float fXPos,
float fYPos,
float fZPos)
- Sets object position
NYA.
- Parameters:
- fXPos - X Position
- fYPos - Y Position
- fZPos - Z Position
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)
setDescription
public int setDescription(String strDescription)
- Sets object info description
NYA.
- Parameters:
- strDescription - String value of Object Description
hide
public int hide()
- Hide Object
GOOD.
show
public int show()
- Show Object
GOOD.
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
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
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
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
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)
getTransform
public int getTransform(float fMatrix[])
- Get current Transform of Object
GOOD.
- Parameters:
- fMatrix - Matrix Array (16-values), zeroed to hold return
getNumVertices
public int getNumVertices()
- Get Number of Vertices on Object
NYA.
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)
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)
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
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
setTexture
public int setTexture(String strURL)
- Set Objects Current Texture
NYA.
- Parameters:
- strURL - URL and filename of Texture to apply
getTexture
public int getTexture(String strURL)
- Get Objects Current Texture
NYA.
- Parameters:
- strURL - URL and filename of Texture currently applied
setTransparency
public int setTransparency(float fTransparency)
- Set Objects Transparency value
GOOD.
- Parameters:
- fTransparency - float value (0-1) of transparency (1 is transparent)
getTransparency
public float getTransparency()
- Get Objects Transparency value
NYA.
- Returns:
- float value (0-1) of transparency (1 is transparent)
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)
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)
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)
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)
playSound
public int playSound(int nPlayMode)
- Plays Sound
NYA.
- Parameters:
- nPlayMode - Mode of sound playing (play once or Loop)
setAnchor
public int setAnchor(String strAnchor)
- Set Anchor
NYA.
- Parameters:
- strAnchor - String value of Anchor target
getAnchor
public int getAnchor(String strAnchor)
- Get Anchor
NYA.
- Parameters:
- strAnchor - Null String to receive value
- Returns:
- strAnchor String value of Anchor target
setName
public int setName(String strName)
- Set Name
NYA.
- Parameters:
- strName - String name of object
getName
public int getName(String strName)
- Get Name
NYA.
- Parameters:
- strName - Null String to receive value
- Returns:
- strName String name of Object
setGeometrySampling
public int setGeometrySampling(int nGeometrySampling)
- Set Geometry Type for Object
NYA.
- Parameters:
- nGeometrySampling - Value of geometry mode (point cloud, wire, flat, smooth)
getGeometrySampling
public int getGeometrySampling()
- Get Geometry Type for Object
NYA.
- Returns:
- Integer Value of geometry mode (point cloud, wire, flat, smooth)
setShadingMode
public int setShadingMode(int nShadingMode)
- Set Shading Type for Object
NYA.
- Parameters:
- nShadingMode - Value of shading mode (none, flat, gouraud, phong, garlic)
getShadingMode
public int getShadingMode()
- Get Shading Type for Object
NYA.
- Returns:
- Integer Value of shading mode (none, flat, gouraud, phong, garlic)
setAxisAlignment
public int setAxisAlignment(int nAxisAlignment)
- Turn on/off axis alignment for object
NYA.
- Parameters:
- nAxisAlignment - Integer value of axis alignment
getAxisAlignment
public int getAxisAlignment()
- Get axis alignment state for object
NYA.
- Returns:
- Integer value of axis alignment condition
setTextureLightingMode
public int setTextureLightingMode(int nTextureLightingMode)
- Set Texture lighting mode for an object
NYA.
- Parameters:
- nTextureLightingMode - Integer value of texture lighting
getTextureLightingMode
public int getTextureLightingMode()
- Get Texture lighting mode for an object
NYA.
- Returns:
- Integer value of texture lighting
setCollideStyle
public int setCollideStyle(int nCollideStyle)
- Set Collision Detection mode for an object
NYA.
- Parameters:
- nCollideStyle - Integer value of collision mode
getCollideStyle
public int getCollideStyle()
- Get Collision Detection mode for an object
NYA.
- Returns:
- Integer value of collision mode
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
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
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
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
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
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
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
animate
public int animate(String strURL)
- Loads animation .vue file and applies to object
NYA.
- Parameters:
- strURL - URL and name of .vue file
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)
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)
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