|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object camera3d.VcObject
Abstract superclass to all objects that can be added to the scene graph.
Field Summary | |
protected TransformMode |
transformationMode
|
Constructor Summary | |
VcObject()
Default Constructor. |
Method Summary | |
void |
addChangeListener(VcObjectChangeListener listener)
Adds the specified VcObjectChangeListener to be notified of changes made to this object. |
void |
addNode(javax.media.j3d.Node n)
Adds a node to pivot transform group. |
void |
addVcChild(VcObject vcObject)
Adds a VcObject as a child to this one. |
void |
detach()
Removes the BranchGroup from its parent in Java 3D tree. |
void |
getBoundingBox(javax.media.j3d.BoundingBox returnBB)
Returns parameters of this object's BoundingBox, in local coordinates. |
void |
getBoundingBoxInVWorld(javax.media.j3d.BoundingBox returnBB)
Returns parameters of this object's BoundingBox, in virtual world coordinates. |
javax.media.j3d.BranchGroup |
getBranchGroup()
Returns root BranchGroup |
java.util.List |
getChildrenList()
Returns a List containing all VcObjects kept as children of this object |
abstract javax.swing.Icon |
getIcon()
Returns a small Icon associated with the type of this object. |
java.lang.String |
getInfo()
|
static int |
getInstanceCounter()
Returns the number of objects instatiated so far. |
java.lang.String |
getLabel()
Returns the label which identifies this object. |
void |
getLocalToVworld(javax.media.j3d.Transform3D t3D)
Returns this objects Local to Vworld transform. |
void |
getParentRotScaleTG(javax.media.j3d.Transform3D t3D)
Returns the transform 3D which keeps the rotation and scaling parts of this object's transform. |
void |
getParentTransTG(javax.media.j3d.Transform3D t3D)
Returns the transform 3D which keeps the translation part of this object's transform. |
java.lang.String |
getTooltipText()
Returns a string describing this object. |
void |
getTransforms(javax.media.j3d.Transform3D transforms)
Returns all accumulated transforms but pivot transforms. |
void |
getTranslation(javax.vecmath.Point3d transP3d)
Returns this object's translation into the Vector3d object passed as input. |
double |
getXAngleDeg()
Returns the value (degrees) of X angle in absolute coordinate system. |
double |
getXAngleRad()
Returns the value (radians) of X angle in absolute coordinate system. |
double |
getXScale()
Returns the value of scale in X axis direction. |
double |
getXTranslation()
Returns the value of translation in X axis direction. |
double |
getYAngleDeg()
Returns the value (degrees) of Y angle in absolute coordinate system. |
double |
getYAngleRad()
Returns the value (radians) of Y angle in absolute coordinate system. |
double |
getYScale()
Returns the value of scale in Y axis direction. |
double |
getYTranslation()
Returns the value translation in Y axis direction. |
double |
getZAngleDeg()
Returns the value (degrees) of Z angle in absolute coordinate system. |
double |
getZAngleRad()
Returns the value (radians) of Z angle in absolute coordinate system. |
double |
getZScale()
Returns the value of scale in Z axis direction. |
double |
getZTranslation()
Returns the value of translation in Z axis direction. |
void |
hideBoundingBox()
|
boolean |
isInvalidData()
Returns a flag indicating whether internal data representating state needs updating. |
boolean |
isLive()
Returns a flag indicating whether the object is part of a live scene graph. |
boolean |
isSelected()
Returns a flag indicating whether this object is selected or not |
void |
printTransform(javax.media.j3d.Transform3D t3d)
|
void |
removeAllChangeListeners()
Removes all objects currently registered as listeners of changes made to this object. |
void |
removeAllNodes()
Removes all nodes currently under pivot transform group. |
void |
removeBoundingBox()
|
void |
removeChangeListener(VcObjectChangeListener chg)
Removes one object currently registered as a listener of changes made to this object. |
void |
removeNode(javax.media.j3d.Node n)
Removes a node from pivot transform group. |
void |
removeVcChild(int n)
Removes a VcObject from child transform group. |
void |
removeVcChild(VcObject vcObject)
Removes a VcObject from child transform group. |
void |
rotateAbsolute(TransformScope axis,
double deltaAngle)
Performs incremental rotation around one of the absolute axis. |
void |
rotateEuler(double x_angle,
double y_angle,
double z_angle)
Sets the value of the rotation around the absolute X,Y and Z axis. |
void |
rotateEulerLocal(double x_angle,
double y_angle,
double z_angle)
Rotates objects relative to its local coordinate system. |
void |
rotateEulerLocalX(double x_angle)
Rotates this object around local X axis. |
void |
rotateEulerLocalY(double y_angle)
Rotates this object around local Y axis. |
void |
rotateEulerLocalZ(double z_angle)
Rotates this object around local Z axis. |
void |
rotateEulerX(double x_angle)
Sets the value of the rotation around the absolute X axis. |
void |
rotateEulerY(double y_angle)
Sets the value of the rotation around the absolute Y axis. |
void |
rotateEulerZ(double z_angle)
Sets the value of the rotation around the absolute Z axis. |
void |
rotateLocal(TransformScope axis,
double deltaAngle)
Rotates object relative to its local axis system. |
void |
scaleRelative(TransformScope scope,
double scale)
Scales object relative to its local axis system. |
void |
scaleX(double scale)
Sets this objects's absolute scale along (local) X axis. |
void |
scaleXRelative(double scale)
|
void |
scaleY(double scale)
Sets this objects's absolute scale along (local) Y axis. |
void |
scaleYRelative(double scale)
|
void |
scaleZ(double scale)
Sets this objects's absolute scale along (local) Z axis. |
void |
scaleZRelative(double scale)
|
void |
select()
By calling this object this object shows himself "selected", what is indicated by some visual modifications. |
void |
setAbsoluteScale(double x,
double y,
double z)
Sets absolute scale for this object. |
void |
setGlobalAxisVisible(boolean visible)
|
abstract void |
setIcon(javax.swing.Icon icon)
Sets the Icon associated with the type of this object. |
void |
setLabel(java.lang.String s)
Sets the label which identifies this object. |
void |
setLocalAxisVisible(boolean visible)
|
void |
setOngoingTransformation(boolean transforming)
Sets flag used to indicate whether this object is undergoing a transformation or not. |
void |
setOngoingTransformationMode(TransformMode mode)
Sets a specific kind of transformation, useful for the displaying of gizmos, etc. |
void |
setRelativeScale(double x,
double y,
double z)
|
void |
setTooltipText(java.lang.String text)
Sets a text string describing this object. |
void |
setTransform(javax.media.j3d.Transform3D transform)
Sets this object transform. |
protected void |
setTransformsToIdentity()
|
void |
showBoundingBox()
|
void |
translate(double x,
double y,
double z)
|
void |
translate(javax.vecmath.Vector3d delta)
"Modern" translation method. |
void |
translateLocal(double x,
double y,
double z)
|
boolean |
underOngoingTransformation()
Returns flag that indicates whether this object is undergoing a transformation or not. |
void |
unselect()
|
void |
updateData()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TransformMode transformationMode
Constructor Detail |
public VcObject()
Method Detail |
public void rotateEulerLocalX(double x_angle)
x_angle
- Rotation to be applied (in degreees).public void rotateEulerLocalY(double y_angle)
y_angle
- Rotation to be applied (in degreees).public void rotateEulerLocalZ(double z_angle)
z_angle
- Rotation to be applied (in degreees).public void rotateEulerLocal(double x_angle, double y_angle, double z_angle)
x_angle
- angle of rotation to be applied (X axis) in radians.y_angle
- angle of rotation to be applied (Y axis) in radians.z_angle
- angle of rotation to be applied (Z axis) in radians.public void rotateEulerX(double x_angle)
x_angle
- new value of X rotation (in degrees).public void rotateEulerY(double y_angle)
y_angle
- new value of Y rotation (in degrees).public void rotateEulerZ(double z_angle)
z_angle
- new value of Z rotation (in degrees).public void rotateEuler(double x_angle, double y_angle, double z_angle)
x_angle
- new value of X rotation (in degrees).y_angle
- new value of Y rotation (in degrees).z_angle
- new value of Z rotation (in degrees).public void rotateLocal(TransformScope axis, double deltaAngle)
RotatableObject
rotateLocal
in interface RotatableObject
axis
- axis affected by rotation.deltaAngle
- public void rotateAbsolute(TransformScope axis, double deltaAngle)
rotateAbsolute
in interface RotatableObject
axis
- the axis around which the rotation will be performed.deltaAngle
- of the increment (in radians).public void addNode(javax.media.j3d.Node n)
n
- Node to be added.public void removeNode(javax.media.j3d.Node n)
n
- Node to be removed.public void removeAllNodes()
public javax.media.j3d.BranchGroup getBranchGroup()
public java.lang.String getLabel()
public void setLabel(java.lang.String s)
s
- String containing new label.public void detach()
public void getTranslation(javax.vecmath.Point3d transP3d)
public double getXAngleDeg()
public double getYAngleDeg()
public double getZAngleDeg()
public double getXAngleRad()
public double getYAngleRad()
public double getZAngleRad()
public double getXTranslation()
public double getYTranslation()
public double getZTranslation()
public double getXScale()
public double getYScale()
public double getZScale()
public void updateData()
public void translateLocal(double x, double y, double z)
public void translate(double x, double y, double z)
public void scaleX(double scale)
scale
- new absolute scalepublic void scaleY(double scale)
scale
- new absolute scalepublic void scaleZ(double scale)
scale
- new absolute scalepublic void scaleXRelative(double scale)
public void scaleYRelative(double scale)
public void scaleZRelative(double scale)
public void setRelativeScale(double x, double y, double z)
public void setAbsoluteScale(double x, double y, double z)
x
- scale value along local X axis.y
- scale value along local Y axis.z
- scale value along local Z axis.public void removeAllChangeListeners()
public void removeChangeListener(VcObjectChangeListener chg)
public void addChangeListener(VcObjectChangeListener listener)
listener
- Listener to be addedpublic void getBoundingBox(javax.media.j3d.BoundingBox returnBB)
public void showBoundingBox()
public void hideBoundingBox()
public void removeBoundingBox()
public boolean isLive()
isLive
in interface RotatableObject
public boolean isInvalidData()
public void addVcChild(VcObject vcObject)
vcObject
- object to be addedpublic void removeVcChild(VcObject vcObject)
vcObject
- object to be removedpublic void removeVcChild(int n)
n
- index of object to be removedpublic java.util.List getChildrenList()
public void setTransform(javax.media.j3d.Transform3D transform)
public void getBoundingBoxInVWorld(javax.media.j3d.BoundingBox returnBB)
public void setGlobalAxisVisible(boolean visible)
public void setLocalAxisVisible(boolean visible)
public void printTransform(javax.media.j3d.Transform3D t3d)
protected void setTransformsToIdentity()
public java.lang.String getInfo()
public void select()
public void unselect()
public void getParentTransTG(javax.media.j3d.Transform3D t3D)
t3D
- Transform3D which will receive the parent translation transform.public void getParentRotScaleTG(javax.media.j3d.Transform3D t3D)
t3D
- Transform3D which will receive the parent rotation and scale transform.public void getTransforms(javax.media.j3d.Transform3D transforms)
public void getLocalToVworld(javax.media.j3d.Transform3D t3D)
getLocalToVworld
in interface RotatableObject
t3D
- object into which will be copied the required transform.public void setOngoingTransformation(boolean transforming)
public boolean underOngoingTransformation()
public void setOngoingTransformationMode(TransformMode mode)
public boolean isSelected()
public void scaleRelative(TransformScope scope, double scale)
ScalableObject
scaleRelative
in interface ScalableObject
scope
- scope affected by rotation.scale
- public void translate(javax.vecmath.Vector3d delta)
translate
in interface TranslatableObject
delta
- new location of object.public abstract javax.swing.Icon getIcon()
public abstract void setIcon(javax.swing.Icon icon)
public java.lang.String getTooltipText()
public static int getInstanceCounter()
public void setTooltipText(java.lang.String text)
text
- the tool tip
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |