|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--yaarq.sys.yrqVisual
|
+--yaarq.sys.yrqBasicVisual
This class extends the yrqVisual class providing support for textured geometry.
The class enables all basic geometry and texture operations, combining Java3Ds shape3D, geometry and appearance model into one convenient encapsulation
Basic visuals are always added to yrqFrame instances, all their positioning and rotational properties are defined by the frame to which they are added. TODO: Nothing
| Field Summary |
| Fields inherited from class yaarq.sys.yrqVisual |
COLOR_AMBIENT, COLOR_DIFFUSE, COLOR_EMISSIVE, COLOR_SPECULAR, m_parent, MODE_ADD, MODE_BLEND, MODE_NONE, TEXTURE_DOT3BUMP, TEXTURE_LIGHTMAP, TEXTURE_MATERIAL, TEXTURE_REFLECT |
| Constructor Summary | |
yrqBasicVisual(javax.media.j3d.Geometry a_geometry,
javax.media.j3d.Texture2D a_texMaterial,
javax.media.j3d.Texture2D a_texLightMap,
javax.media.j3d.Texture2D a_texBumpMap,
javax.media.j3d.Texture2D a_texReflection,
boolean a_enableLighting,
int a_mode,
float a_transparency,
float a_shininess,
float a_brightness)
Constructs a new basic visual using passed parameters. |
|
| Method Summary | |
javax.media.j3d.Geometry |
getGeometry()
This method returns the geometry of the visual |
javax.media.j3d.Texture2D |
getTexture(int a_type)
This function returns one of the textures used in the visual. |
int |
getTransparencyMode()
Returns the transparency mode of the visual. |
float |
getTransparencyValue()
Returns the transparency value for this visual. |
void |
setBrightness(float a_brightness)
This method sets the material of the visual to a greyscale level having defined emissivity. |
void |
setColor(int a_type,
javax.vecmath.Color3f a_color)
This function allows setting a specified color component of the underlying material of the visual. |
void |
setGeometry(javax.media.j3d.Geometry a_geometry)
This method sets the geometry of the visual and replaces any previous geometry present in the visual. |
void |
setShininess(float a_shininess)
This method sets the material of the visual to a greyscale level having defined shininess, meaning specular and highlight components. |
void |
setTexture(int a_type,
javax.media.j3d.Texture2D a_texture)
This function sets one of the textures used in the visual. |
void |
setTextureAnimation(double a_left,
double a_top,
double a_width,
double a_height)
This function sets a continuous texture animation to the base material texture. |
void |
setTextureAnimation(int a_clipIndex,
int a_clipCountX,
int a_clipCountY)
This function set a clip-based texture animation to the base material texture. |
void |
setTransparency(float a_alpha,
int a_mode)
Sets the transparency factor for the visual. |
| Methods inherited from class yaarq.sys.yrqVisual |
attach, detach, getBaseShape3D, getBumpShape3D, getParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public yrqBasicVisual(javax.media.j3d.Geometry a_geometry,
javax.media.j3d.Texture2D a_texMaterial,
javax.media.j3d.Texture2D a_texLightMap,
javax.media.j3d.Texture2D a_texBumpMap,
javax.media.j3d.Texture2D a_texReflection,
boolean a_enableLighting,
int a_mode,
float a_transparency,
float a_shininess,
float a_brightness)
a_geometry - The geometry to use in construction of the visuala_texMaterial - The basic material texturea_texLightMap - The lightmap texture to multiply with the material texturea_texBumpMap - The bumpmap to applya_texReflection - The reflection map to applya_enableLighting - Flag for enabling per-vertex lighting calculationa_mode - One of the MODE_xxx constants, sets the transparency mode for the visuala_transparency - The alpha-transparency of the constructed visual, 0-1fa_shininess - The specular and highlight of the constructed visual, 0-1fa_brightness - The emissive component of the constructed visual, 0-1f| Method Detail |
public javax.media.j3d.Geometry getGeometry()
getGeometry in class yrqVisualpublic javax.media.j3d.Texture2D getTexture(int a_type)
getTexture in class yrqVisuala_type - The type of the texture to return. One of the TEXTURE_xxx constants
public int getTransparencyMode()
getTransparencyMode in class yrqVisualpublic float getTransparencyValue()
getTransparencyValue in class yrqVisualpublic void setBrightness(float a_brightness)
The values set by the convenience methods setBrightness and setShininess are only valid until the next call to setColor. Setting individual color components of the visual overrides previous settings.
setBrightness in class yrqVisuala_brightness - The brightness of the visual, 0-1f
public void setColor(int a_type,
javax.vecmath.Color3f a_color)
setColor in class yrqVisuala_type - Type of color to set. Must be one of the COLOR_xxx constantsa_color - The color to setpublic void setGeometry(javax.media.j3d.Geometry a_geometry)
setGeometry in class yrqVisualpublic void setShininess(float a_shininess)
The values set by the convenience methods setBrightness and setShininess are only valid until the next call to setColor. Setting individual color components of the visual overrides previous settings.
setShininess in class yrqVisuala_shininess - The shininess of the visual, 0-1f
public void setTexture(int a_type,
javax.media.j3d.Texture2D a_texture)
setTexture in class yrqVisuala_type - The type of the texture to set. One of the TEXTURE_xxx constantsa_texture - The texture to set
public void setTextureAnimation(double a_left,
double a_top,
double a_width,
double a_height)
setTextureAnimation in class yrqVisuala_left - Left clip position, normalized (0-1)a_top - Top clip position, normalized (0-1)a_width - Width of clip to use, normalized (0-1)a_height - Height of clip to use, normalized (0-1)
public void setTextureAnimation(int a_clipIndex,
int a_clipCountX,
int a_clipCountY)
setTextureAnimation in class yrqVisuala_clipIndex - Index of the clip within the texturea_clipCountX - Number of clips in X directiona_clipCountY - Number of clips in Y direction
public void setTransparency(float a_alpha,
int a_mode)
setTransparency in class yrqVisuala_alpha - Global transparency factor for this visuala_mode - Transparency mode for this visual
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||