|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.motorola.iden.micro3d.Object3D
The Object3D
class is an abstact superclass for all the 3D
objects that can be rendered by the 3D engine.
Method Summary | |
Layout3D |
getLayout()
Returns the Layout3D used for rendering this
Object3D , or null if no Layout3D
has been associated with this Object3D .
|
Texture |
getSphereTexture()
Returns the Texture used for environmental texture mapping
with this Object3D or null if no sphere texture
has been associated with this Object3D .
|
Texture |
getTexture()
Returns the Texture used for rendering this
Object3D , or null if no Texture has
been set associated with this Object3D .
|
void |
setLayout(Layout3D layout)
Specifies a Layout3D to be used when rendering this
Object3D . |
void |
setSphereTexture(Texture sphereTexture)
Sets the specified parameter as a sphere texture for this Object3D . |
void |
setTexture(Texture texture)
Associates a Texture with this Object3D . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public Layout3D getLayout()
Layout3D
used for rendering this
Object3D
, or null
if no Layout3D
has been associated with this Object3D
.
Layout3D
used for rendering this
Object3D
.public void setLayout(Layout3D layout)
Layout3D
to be used when rendering this
Object3D
. The specified parameter can be null
,
but only Object3D
objects with a Layout3D
associated to them will be rendered.
layout
- the Layout3D
to use when rendering this
Object3D
.Layout3D
public Texture getSphereTexture()
Texture
used for environmental texture mapping
with this Object3D
or null
if no sphere texture
has been associated with this Object3D
.
null
if no sphere texture has been associated with this
Object3D
.public void setSphereTexture(Texture sphereTexture) throws java.lang.IllegalArgumentException
Object3D
. The sphere texture is used for environment mapping.
Setting the sphere texture will also enable the enivironment mapping. Once
the sphere texture has been set, this Object3D
will be rendered
with the specified sphere map. The sphere texture can be set to
null
. This effectively disables environment mapping for this
Object3D
.
The environment mapping does not have any effect on certain primitives.
For primitives, only the Triangle
and Quadrangle
support environment mapping. For all other primitives, invoking this
method will not affect the final result. Also, not all figures support
environment mapping. Only figures that are designed to support
environmental mapping will be rendered with the specified sphere texture.
All others will be unaffected.
sphereTexture
- the Texture
to use for environmental
texture mapping.java.lang.IllegalArgumentException
- if the Texture
is not a
sphere texture.Texture.isSphereTexture()
public Texture getTexture()
Texture
used for rendering this
Object3D
, or null
if no Texture
has
been set associated with this Object3D
.
Texture
used for rendering this Object3D
or null
if no texture is associated with this
Object3D
.public void setTexture(Texture texture) throws java.lang.IllegalArgumentException
Texture
with this Object3D
. The
specified texture will be used when the Object3D
is rendered.
This method does not affect certain primitives. The point and line
primitives cannot use textures, and therefore this method will not affect
the rendering of those primitives.
If the specified parameter is null
then this
Object3D
will be rendered without a texture. In case of
primitives that support texture mapping (triangle and quadrangle),
if the texture is set to null
, then those primitives
will be rendered with a solid color that has been set for
that primitive with the setColor()
method. The only exception
to this is the point sprite which cannot be rendered without a texture.
In the case of figures, depending on how the figure was created, the figure
will be either rendered without the texture, or will not be rendered at all.
texture
- the texture to use when rendering this
Object3D
.java.lang.IllegalArgumentException
- if the texture is an environmental
mapping texture.Texture.isSphereTexture()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |