|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.motorola.iden.micro3d.Object3D
|
+--com.motorola.iden.micro3d.Primitive
Primitive class is the base for all the 3D primitives. The
Micro3D engine supports rendering of several 3D primitives. The following
3D primitives are supported.
| Field Summary | |
static int |
BLENDING_ADD
Blending type - additive blending (dist 100%+src 100%). |
static int |
BLENDING_HALF
Blending type - 50%. |
static int |
BLENDING_NONE
Blending type - none. |
static int |
BLENDING_SUB
Blending type - subtractive blending (dist 100%-src 100%). |
static int |
FACE_NORMAL
Identifier for a vector that is serving as a face normal. |
static int |
NORMAL
Identifier for a vector that is serving as a vertex normal. |
static int |
VERTEX_A
Identifier for vertex A. |
static int |
VERTEX_B
Identifier for vertex B. |
static int |
VERTEX_C
Identifier for vertex C. |
static int |
VERTEX_D
Identifier for vertex D. |
| Method Summary | |
void |
enableColorKeyTransparency(boolean enable)
Enables/disables color key transparency. |
int |
getBlendingType()
Returns the blending type. |
int |
getColor()
Returns the color that is used for rendering this Primitive.
|
abstract Vector3D |
getVector(int vectorID)
Returns the Vector3D for the specified vector. |
boolean |
hasColorKeyTransparency()
Determines whether the primitive has color key transparency enabled. |
void |
setBlendingType(int blendingType)
Sets the blending type. |
void |
setColor(int color)
Sets the color that should be used when rendering a Primitive.
|
abstract void |
setVector(int vectorID,
Vector3D vector)
Sets the specified vector to the Vector3D provided. |
| Methods inherited from class com.motorola.iden.micro3d.Object3D |
getLayout, getSphereTexture, getTexture, setLayout, setSphereTexture, setTexture |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int VERTEX_A
public static final int VERTEX_B
public static final int VERTEX_C
public static final int VERTEX_D
public static final int NORMAL
public static final int FACE_NORMAL
public static final int BLENDING_NONE
public static final int BLENDING_HALF
public static final int BLENDING_ADD
public static final int BLENDING_SUB
| Method Detail |
public abstract Vector3D getVector(int vectorID)
throws java.lang.IllegalArgumentException
Vector3D for the specified vector. Certain
Primitive types support a specific set of Primitive
constants. Always consult the extending class for the list of constants
supported as vector descriptors.
vectorID - the ID of the vector to return.Vector3D for the specified vector ID.java.lang.IllegalArgumentException - if an invalid vector ID is specified.VERTEX_A,
VERTEX_B,
VERTEX_C,
VERTEX_D,
FACE_NORMAL,
NORMAL
public abstract void setVector(int vectorID,
Vector3D vector)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException
Vector3D provided. Certain
Primitive types support a specific set of Primitive
constants. Always consult the extending class for the list of constants
supported as vector descriptors.
vectorID - the ID of the vector being set.vector - the Vector3D to set.java.lang.IllegalArgumentException - if an invalid vectorID
is specified.java.lang.NullPointerException - if the vector is null.VERTEX_A,
VERTEX_B,
VERTEX_C,
VERTEX_D,
FACE_NORMAL,
NORMALpublic int getColor()
Primitive.
Not all Primitive types use the color setting.
Primitive.public void setColor(int color)
Primitive.
Not all Primitive types use the color setting and some will not
use a color setting when they have a Texture mapped to them.
See Graphics for information on specifying RGB values.
color - the color to use when rendering this Primitive.Graphicspublic int getBlendingType()
BLENDING_NONE,
BLENDING_HALF,
BLENDING_ADD,
BLENDING_SUB
public void setBlendingType(int blendingType)
throws java.lang.IllegalArgumentException
Layout3D associated with this primitive must have
semi-transparency enabled.
blendingType - blending type.java.lang.IllegalArgumentException - is the specified blending type is invalid.BLENDING_NONE,
BLENDING_HALF,
BLENDING_ADD,
BLENDING_SUB,
Layout3D.setSemiTransparent(boolean transparent)public boolean hasColorKeyTransparency()
true if color key transparency is enabled,
false otherwise.public void enableColorKeyTransparency(boolean enable)
enable - true to enable color key transparency,
false to disable.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||