|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--VRObject
Field Summary | |
double |
above_ratio
Magic threshold for above ratio. |
static javax.vecmath.Color3f |
BLUE
|
javax.vecmath.Color3f |
current_color
|
protected double |
current_scale
|
double |
default_scale
|
static javax.vecmath.Color3f |
GREEN
|
double |
large_scale
|
static javax.vecmath.Color3f |
RED
Basic colors |
double |
small_scale
|
Constructor Summary | |
VRObject()
Default constructor. |
|
VRObject(java.lang.String filename)
Constructor which takes a 3ds file for geometry Creates a branch group whose geometry is defined in a 3ds file. |
|
VRObject(java.net.URL url)
Constructor which takes a url of a scene file for geometry. |
Method Summary | |
boolean |
above(VRObject target)
Determine if another VRObject is above this current object. |
boolean |
behind(VRObject target)
Determine if another VRObject is behind this current object. |
boolean |
below(VRObject target)
Determine if another VRObject is below this current object. |
protected void |
build_BG()
Builds the BranchGroup from the model. |
javax.media.j3d.BoundingBox |
get_bounds()
Get the bounding box around the model |
javax.media.j3d.BranchGroup |
get_branch()
Get the branch group for this entire model. |
javax.media.j3d.BranchGroup |
getCloud()
Creates a translucent box surrounding this VRObject |
boolean |
inFrontOf(VRObject target)
Determine if another VRObject is inFrontOf this current object. |
boolean |
is_color(javax.vecmath.Color3f query_color)
Query color of object. |
boolean |
is_large()
Determine if the current model is large. |
boolean |
is_normal()
Determine if the current model is normal scale. |
boolean |
is_small()
Determin if the current model is small. |
boolean |
leftOf(VRObject target)
Determine if another VRObject is left of this current object. |
boolean |
near(VRObject target)
Determine if another VRObject is nearby this current object. |
boolean |
rightOf(VRObject target)
Determine if another VRObject is right of this current object. |
void |
rotX(double angle)
Rotate the model around the X axis. |
void |
rotY(double angle)
Rotate the model around the Y axis. |
void |
rotZ(double angle)
Rotate the model around the Z axis. |
void |
scale_large()
Scale the model to be large. |
void |
scale_normal()
Scale the model to default size. |
void |
scale_small()
Scale the model to be small. |
void |
set_above(VRObject target)
Place a VRObject above this current object. |
void |
set_behind(VRObject target)
Place a VRObject behind this current object. |
void |
set_below(VRObject target)
Place a VRObject below this current object. |
void |
set_color(javax.vecmath.Color3f color)
Set the color of the model. |
void |
set_inFrontOf(VRObject target)
Place a VRObject in front of this current object. |
void |
set_leftOf(VRObject target)
Place a VRObject to the left of this current object. |
void |
set_near(VRObject target)
Randomly places the target object within a cube that surrounds the reference object. |
void |
set_rightOf(VRObject target)
Place a VRObject to the right of this current object. |
void |
set_scale(double scale)
Scale the model. |
void |
trans_absolute(javax.vecmath.Vector3d vector)
Tranlate model to absolute position. |
void |
trans_relative(javax.vecmath.Vector3d vector)
Translate model relative to current position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public double above_ratio
public double default_scale
public double large_scale
public double small_scale
protected double current_scale
public static final javax.vecmath.Color3f RED
public static final javax.vecmath.Color3f GREEN
public static final javax.vecmath.Color3f BLUE
public javax.vecmath.Color3f current_color
Constructor Detail |
public VRObject()
public VRObject(java.lang.String filename)
filename
- Name of the 3DS input filepublic VRObject(java.net.URL url)
url
- Url of the input file.Method Detail |
protected void build_BG()
public void scale_large()
public void scale_small()
public void scale_normal()
public boolean is_large()
public boolean is_small()
public boolean is_normal()
public void set_color(javax.vecmath.Color3f color)
color
- The color to set the model to.public boolean is_color(javax.vecmath.Color3f query_color)
query_color
- The color to test against.
Returns true if the current object is the color query_color.public void set_scale(double scale)
scale
- The new scale to be set for the model.public void rotX(double angle)
angle
- Angle in radians.public void rotY(double angle)
angle
- Angle in radians.public void rotZ(double angle)
angle
- Angle in radians.public javax.media.j3d.BoundingBox get_bounds()
public javax.media.j3d.BranchGroup get_branch()
public void trans_relative(javax.vecmath.Vector3d vector)
vector
- The tranlation vector.public void trans_absolute(javax.vecmath.Vector3d vector)
vector
- The absolute translation vector.public boolean above(VRObject target)
target
- The target VRObject which we wish to query.public boolean below(VRObject target)
target
- The target VRObject which we wish to query.public boolean leftOf(VRObject target)
target
- The target VRObject which we wish to query.public boolean rightOf(VRObject target)
target
- The target VRObject which we wish to query.public boolean inFrontOf(VRObject target)
target
- The target VRObject which we wish to query.public boolean behind(VRObject target)
target
- The target VRObject which we wish to query.public boolean near(VRObject target)
target
- The target VRObject which we wish to query.public void set_above(VRObject target)
target
- The target VRObject to translate.public void set_below(VRObject target)
target
- The target VRObject to translate.public void set_leftOf(VRObject target)
target
- The target VRObject to translate.public void set_rightOf(VRObject target)
target
- The target VRObject to translate.public void set_inFrontOf(VRObject target)
target
- The target VRObject to translate.public void set_behind(VRObject target)
target
- The target VRObject to translate.public void set_near(VRObject target)
target
- The target VRObject which we wish to move.public javax.media.j3d.BranchGroup getCloud()
none
-
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |