|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Segment
Object3d
,
Point3d
,
VA
Field Summary | |
double |
beta
|
(package private) java.awt.Button |
beta_bt
|
(package private) java.awt.Label |
beta_lb
|
(package private) java.awt.Scrollbar |
beta_sb
|
(package private) java.awt.Label |
beta_txt
|
boolean |
blocked
When the joint cant turn, e.g. |
Segment[] |
child
Array of child segments. |
(package private) int |
dbeta
|
double |
force
|
int |
id
unique number for this segment |
Point3d |
joint_axis
The rotation axis of this segment. |
java.awt.Point |
joint_axis2d
The projected position of the joint axis. |
Point3d |
joint_pos
The 3d location of the joint. |
java.awt.Point |
joint_pos2d
The projected position of the joint. |
boolean |
jointconstraint
|
java.lang.String |
label
The label of the segment. |
Point3d |
limb_pos
The 3d location of the end of the segment. |
java.awt.Point |
limb_pos2d
The projected position of the end of the segment. |
double |
linForce
the following two are the components of the force when acting on a rigid body |
(package private) int |
lwid
|
double |
maxbeta
|
double |
minbeta
|
int |
noch
number of children this segment has. |
int |
nochSave
used for truncating the kinematics chain and pasting on later. |
(package private) boolean |
nodraw
The segments which will not be draw are marked with this one. |
private static int |
PAR
Field number for parent in .seg file |
Segment |
parent
parent segment. |
Plane[] |
plane
Array of planes. |
(package private) int |
planec
# of planes in this segment. |
Point3d[] |
pool
Array of 3d points for this segment |
java.awt.Point[] |
pool2d
Array of (projected) 2d points for this segment |
(package private) int |
poolc
number of points in the pool[] |
double |
Rad
The is the radius used to extend the skeletal joint system into solid cylindirical system. |
double |
rotForce
|
(package private) java.awt.Panel |
savePan
|
Segment[] |
seg
All the segments under the topmost. |
(package private) java.awt.Panel |
seg_pan
|
(package private) int |
segc
|
double |
segmentdepth
The view depth of this segment (no effect of children) imposed. |
private java.awt.Shape |
shape
This must be redundant. |
int |
sidec
The is the # of sides used to extend the skeletal joint system into solid cylindirical system. |
double |
suggested_F
.seg file suggested Eye parameters |
double |
suggested_Fz
.seg file suggested Eye parameters |
double |
suggested_scale
.seg file suggested Eye parameters |
double |
torque
The force the joint receives. |
(package private) int |
totalplanec
# of total planes as itself+descendants -not sure of validity- |
int |
userTag
|
Point3d |
X
The total angle the joint rotated in radians. |
Point3d |
Y
The total angle the joint rotated in radians. |
Point3d |
Z
The total angle the joint rotated in radians. |
Constructor Summary | |
Segment(java.lang.String s)
This is the constructor used to create a segment (and its descendants!) from a .seg file. |
|
Segment(java.lang.String s,
int extrapool,
int extraplane)
|
|
Segment(java.lang.String lb,
int ident,
int MAXchild,
Point3d jpos,
Point3d lpos,
Point3d ax,
int axistype)
Create the specified Segment. |
|
Segment(java.lang.String lb,
int ident,
int MAXchild,
Point3d jpos,
Point3d lpos,
Point3d ax,
int axistype,
int pointcount,
int planecount)
Create the specified Segment |
Method Summary | |
private void |
_list(java.util.Vector v,
Segment seg)
Used by list() to fetch the segments and its descendants. |
private int |
_outputOBJ(Segment parent,
int parentlwid,
int lwidfromup)
|
void |
_rotateJoint(Point3d place,
Point3d around,
double T)
This method is called to rotate a JOINT because of a parent segment rotation. |
void |
_rotateLimb(Point3d place,
Point3d around,
double T)
This method rotates the limb (limb_pos) around the joint. |
private void |
_rotateSolid(Point3d place,
Point3d around,
double T)
This method rotates the solid system (pool[]). |
void |
_translate(double dx,
double dy,
double dz)
Translates the segment and its descendant by dx,dy,dz. |
void |
_translate(Point3d delta)
|
void |
_updateFrame()
|
int |
add2pool(Point3d p,
java.awt.Point pp)
Add 3d and corresponding 2d point to the point pool. |
void |
addChild(Segment kid)
Add the kid segment to this segment |
int |
addPlane(Point3d P0,
Point3d P1,
Point3d P2,
Point3d P3,
java.awt.Point r0,
java.awt.Point r1,
java.awt.Point r2,
java.awt.Point r3)
Add the plane given by pointer (from pool[]) with default color. |
int |
addPlane(Point3d P0,
Point3d P1,
Point3d P2,
Point3d P3,
java.awt.Point r0,
java.awt.Point r1,
java.awt.Point r2,
java.awt.Point r3,
int fillcol,
int linecol)
Add the plane given by by pointer (from pool[]) with given fill and line color. |
int |
addPlane(Point3d P0,
Point3d P1,
Point3d P2,
Point3d P3,
java.awt.Point r0,
java.awt.Point r1,
java.awt.Point r2,
java.awt.Point r3,
int fillcol,
int linecol,
int side,
int texture)
|
int |
addPlane(java.util.Vector v)
Add the plane defined by vector of 3d,2d pairs |
int |
addPlane(java.util.Vector v,
int fillcol,
int linecol)
Add the plane defined by vector of 3d,2d pairs |
int |
addPlane(java.util.Vector v,
int fillcol,
int linecol,
int side,
int texture)
Add the plane defined by vector of 3d,2d pairs |
void |
applyForce(Point3d F)
|
void |
constructSegment(java.lang.String lb,
int ident,
int MAXchild,
Point3d jpos,
Point3d lpos,
Point3d ax,
int axistype)
calls constructSegment with 40 points and 20 planes. |
void |
constructSegment(java.lang.String lb,
int ident,
int MAXchild,
Point3d jpos,
Point3d lpos,
Point3d ax,
int MAXpoint,
int MAXplane,
int axistype)
Sets up the variables and the arrays required to hold this segment. |
double |
cosineTo(Segment other)
returns the cosine of the angle between this limb and the other |
double |
cosineTo2d(Segment other)
returns the cosine of the angle between this projected limb and the other |
void |
disablePanel()
|
private boolean |
easy_num(java.lang.String u)
|
void |
enablePanel()
|
Segment |
getJoint(java.lang.String lb)
Searches the segment for the labeled segment and returns the refrence. |
int |
getuserTaget()
|
(package private) double |
limblen()
returns the length of this segment |limb_pos-joint_pos|. |
void |
limbpoints2pool(java.util.Vector v)
|
void |
limbpoints2pool(java.util.Vector v,
Point3d orig)
Adds the points defined in the segment file into the point pool. |
java.util.Vector |
list()
Returns a vector of segments including this and its descendants. |
(package private) java.awt.Panel |
makePanel(java.lang.String s)
|
void |
mirror()
|
void |
moveSegment(double rate)
|
void |
movetoy(Point3d newposition)
Moves the segment (and descendants) to a new position |
static java.io.DataInputStream |
openfileREAD(java.lang.String fn)
open file for read. |
static java.io.DataOutputStream |
openfileWRITE(java.lang.String fn)
open file for write. |
private void |
outlineOBJ(int son,
int par)
|
private int |
outpointOBJ()
|
void |
outputOBJ()
|
void |
print()
Recersively prints the segment. |
void |
printJointAngles()
Recersively prints the joint angles. |
void |
project(Eye eye)
Project limb_pos, joint_pos (the skeletal system) using eye. |
void |
projectaxis(Eye eye)
project the joint_axis using eye. |
void |
projectSolid(Eye eye)
Project the pool/plane system points to pool2d. |
void |
pullTo(Point3d target)
|
Segment |
readSegment(java.lang.String fn,
int extrapool,
int extraplane)
Reads a .seg file and creates and returns a segment build from the file. |
private void |
recprint(Segment seg)
Recersively prints the segment. |
void |
resetJoints()
Recursively reset the joint angles to zero. |
private int |
resolve(java.lang.String u,
java.util.Vector vlimbs,
java.util.Vector labels)
|
void |
restoreChildren()
|
void |
rotateEachJoint(double T)
This method rotates this+descendant segments joints by T radians. |
void |
rotateJoint(double T)
|
void |
scale(double sc)
Scales the segment and its descendant by sc. |
void |
scale(Point3d place,
double sc)
Scales the segment and its descendant by sc taking place as the origin. |
int |
setTotalplanec()
Returns and SETS the totalplanec of the segments |
void |
setupPlane(int nplane)
|
void |
setupPlane(int nplane,
int extra)
|
void |
setupPool(java.util.Vector pnts)
|
void |
setupPool(java.util.Vector pnts,
int extra)
|
void |
setupSolid(int c,
double R,
boolean recursive)
|
void |
setupSolid(Segment root,
int c,
double R,
boolean recursive)
This method extends the skeletal system (joint_pos-limb_pos) to a cylinderical form. |
void |
setuserTag(int what,
boolean recursive)
|
java.lang.String |
str()
Returns a string describing the segment. |
void |
truncateChildren()
|
void |
unBlock()
|
(package private) void |
unmakePanel()
|
(package private) void |
update_panel()
|
void |
updateAllPanel()
This method rotates this segment's joint by T radians. |
void |
updateDepth(Eye eye,
int mode)
|
void |
updateFrame()
|
void |
updateGeom()
|
void |
vplanes2plane(java.util.Vector v)
|
void |
Xrot(double t)
rotate segment tree around X axis. |
void |
Yrot(double t)
rotate segment tree around Y axis. |
void |
Zrot(double t)
rotate segment tree around Z axis. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public int id
public int noch
public Segment[] child
public Segment parent
public int nochSave
public Point3d joint_axis
public Point3d limb_pos
public Point3d joint_pos
public java.awt.Point joint_axis2d
public java.awt.Point limb_pos2d
public int userTag
public java.awt.Point joint_pos2d
public Point3d X
public Point3d Y
public Point3d Z
public double beta
public double minbeta
public double maxbeta
public boolean jointconstraint
public boolean blocked
public double torque
public double force
public double linForce
public double rotForce
public java.lang.String label
public double Rad
public double segmentdepth
public int sidec
public Segment[] seg
int segc
public Plane[] plane
int planec
int totalplanec
public Point3d[] pool
public java.awt.Point[] pool2d
int poolc
boolean nodraw
private java.awt.Shape shape
Shape
int lwid
public double suggested_scale
public double suggested_F
public double suggested_Fz
private static final int PAR
java.awt.Panel seg_pan
java.awt.Panel savePan
java.awt.Scrollbar beta_sb
java.awt.Label beta_txt
java.awt.Label beta_lb
java.awt.Button beta_bt
int dbeta
Constructor Detail |
public Segment(java.lang.String lb, int ident, int MAXchild, Point3d jpos, Point3d lpos, Point3d ax, int axistype, int pointcount, int planecount)
constructSegment
public Segment(java.lang.String lb, int ident, int MAXchild, Point3d jpos, Point3d lpos, Point3d ax, int axistype)
constructSegment
public Segment(java.lang.String s)
readSegment
public Segment(java.lang.String s, int extrapool, int extraplane)
Method Detail |
public void truncateChildren()
public void restoreChildren()
public void _updateFrame()
public void updateFrame()
public void pullTo(Point3d target)
public void applyForce(Point3d F)
public void moveSegment(double rate)
private int outpointOBJ()
private void outlineOBJ(int son, int par)
public void outputOBJ()
private int _outputOBJ(Segment parent, int parentlwid, int lwidfromup)
public void unBlock()
public void setupSolid(int c, double R, boolean recursive)
public void setupSolid(Segment root, int c, double R, boolean recursive)
public void setupPool(java.util.Vector pnts)
public void setupPool(java.util.Vector pnts, int extra)
public void setupPlane(int nplane, int extra)
public void setupPlane(int nplane)
public void limbpoints2pool(java.util.Vector v)
public void limbpoints2pool(java.util.Vector v, Point3d orig)
public void updateGeom()
public void updateDepth(Eye eye, int mode)
public void vplanes2plane(java.util.Vector v)
public int setTotalplanec()
public void constructSegment(java.lang.String lb, int ident, int MAXchild, Point3d jpos, Point3d lpos, Point3d ax, int axistype)
public void constructSegment(java.lang.String lb, int ident, int MAXchild, Point3d jpos, Point3d lpos, Point3d ax, int MAXpoint, int MAXplane, int axistype)
public void addChild(Segment kid)
public int add2pool(Point3d p, java.awt.Point pp)
public int addPlane(java.util.Vector v)
public int addPlane(java.util.Vector v, int fillcol, int linecol)
public int addPlane(java.util.Vector v, int fillcol, int linecol, int side, int texture)
public int addPlane(Point3d P0, Point3d P1, Point3d P2, Point3d P3, java.awt.Point r0, java.awt.Point r1, java.awt.Point r2, java.awt.Point r3)
public int addPlane(Point3d P0, Point3d P1, Point3d P2, Point3d P3, java.awt.Point r0, java.awt.Point r1, java.awt.Point r2, java.awt.Point r3, int fillcol, int linecol)
public int addPlane(Point3d P0, Point3d P1, Point3d P2, Point3d P3, java.awt.Point r0, java.awt.Point r1, java.awt.Point r2, java.awt.Point r3, int fillcol, int linecol, int side, int texture)
public void resetJoints()
public java.util.Vector list()
private void _list(java.util.Vector v, Segment seg)
public Segment getJoint(java.lang.String lb)
public void setuserTag(int what, boolean recursive)
public int getuserTaget()
private void recprint(Segment seg)
public void printJointAngles()
public void print()
recprint
public double cosineTo(Segment other)
public double cosineTo2d(Segment other)
public java.lang.String str()
public void projectaxis(Eye eye)
public void projectSolid(Eye eye)
public void project(Eye eye)
public void rotateEachJoint(double T)
public void updateAllPanel()
_rotateLimb
,
_rotateJoint
public void disablePanel()
public void enablePanel()
public void rotateJoint(double T)
public void _rotateJoint(Point3d place, Point3d around, double T)
private void _rotateSolid(Point3d place, Point3d around, double T)
public void _rotateLimb(Point3d place, Point3d around, double T)
public void movetoy(Point3d newposition)
public void _translate(Point3d delta)
public void _translate(double dx, double dy, double dz)
public void mirror()
public void scale(double sc)
public void scale(Point3d place, double sc)
double limblen()
public void Xrot(double t)
public void Yrot(double t)
public void Zrot(double t)
private boolean easy_num(java.lang.String u)
private int resolve(java.lang.String u, java.util.Vector vlimbs, java.util.Vector labels)
public static java.io.DataInputStream openfileREAD(java.lang.String fn) throws java.io.IOException
public static java.io.DataOutputStream openfileWRITE(java.lang.String fn) throws java.io.IOException
public Segment readSegment(java.lang.String fn, int extrapool, int extraplane)
void unmakePanel()
java.awt.Panel makePanel(java.lang.String s)
void update_panel()
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |