|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscenic.SceneNode
scenic.SceneLeaf
scenic.ScenePrimitives
public class ScenePrimitives
This scene node type is used to draw primitives. The primitives are triangles which can be colored and textured in the same way as in OpenGL and DirectX. The primitives are defined by attributes. Each attribute is an array of numbers that defines a certain property such as position, color or texture coordinate of the primitives to be drawn. Textures can also be defined. The triangles as defined by an index array (indices).
| Nested Class Summary | |
|---|---|
static class |
ScenePrimitives.Attribute
This class contains attribute information. |
| Field Summary | |
|---|---|
static int |
COLOR_ATTRIBUTE
The color attribute defines the diffuse colors of the vertices. |
static int |
POSITION_ATTRIBUTE
The position attribute defines the positions of the vertices. |
static int |
TEX_COORD1_ATTRIBUTE
The texture coordinate attribute defines the texture coordinates of the vertices. |
| Constructor Summary | |
|---|---|
ScenePrimitives()
|
|
| Method Summary | |
|---|---|
ScenePrimitives.Attribute |
getAttribute(int index)
Gets the given attribute. |
int[] |
getIndices()
Gets the indices. |
ScenicImage |
getTexture(int index)
Gets the texture at the given index. |
void |
setAttribute(int index,
int size,
byte[] data)
Sets the given attribute. |
void |
setAttribute(int index,
int size,
float[] data)
Sets the given attribute. |
void |
setIndices(int[] indices)
Sets the indices. |
void |
setTexture(int index,
ScenicImage texture)
Sets the texture at the given index. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int POSITION_ATTRIBUTE
public static final int COLOR_ATTRIBUTE
public static final int TEX_COORD1_ATTRIBUTE
| Constructor Detail |
|---|
public ScenePrimitives()
| Method Detail |
|---|
public ScenePrimitives.Attribute getAttribute(int index)
index - the index of the attribute.
public void setAttribute(int index,
int size,
float[] data)
index - the index of the attribute.size - the size of the attributedata - the data.
public void setAttribute(int index,
int size,
byte[] data)
index - the index of the attribute.size - the size of the attributedata - the data.public ScenicImage getTexture(int index)
index - the index of the texture.
public void setTexture(int index,
ScenicImage texture)
index - the index of the texture.texture - the texture.public int[] getIndices()
public void setIndices(int[] indices)
indices - the indices.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||