|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ glyphs overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.xerox.VTM.glyphs
Class VCbCurve

java.lang.Objectcom.xerox.VTM.glyphs.Glyph
com.xerox.VTM.glyphs.VCbCurve
- All Implemented Interfaces:
- java.lang.Cloneable
- public class VCbCurve
- extends Glyph
- implements java.lang.Cloneable
- extends Glyph
Cubic Curve - can be reoriented - CANNOT DETECT ENTRY/EXIT in curves, even when filled (they look as, but are not, closed shapes)
a cubic curve is a curved segment that has two endpoints and two control points. Each control point determines the shape of the curve by controlling one of the endpoint tangent vectors.
for this particular glyph, vx and vy correspond to the center of the imaginary segment linking the curve's start and end points
the coordinates of the control points are expressed respectively w.r.t start and end points in polar coordinates (orient=0 on segment linking start and end points, meaning that if orient=0 for both control points, start control1 control2 and end points are aligned)
| Field Summary | |
(package private) float |
ang1
|
(package private) float |
ang2
|
(package private) ProjCbCurve[] |
pc
array of projected coordinates - index of camera in virtual space is equal to index of projected coords in this array |
(package private) long |
vrad1
control points, polar coordinates - origin is vx,vy - orient=0 on segment linking start and end points |
(package private) long |
vrad2
|
(package private) long |
vs
size (distance between start and end point) |
| Fields inherited from class com.xerox.VTM.glyphs.Glyph |
bColor, borderColor, cGlyph, coef, color, dashedContour, DEFAULT_STROKE_WIDTH, dependants, filled, font, fontSize, fontSizePolicy, HSV, HSVb, ID, mouseInsideColor, orient, owner, paintBorder, selected, selectedColor, sensit, size, stickedGlyphs, stickedTo, stroke, strokeWidth, text, textHeight, textPos, textWidth, type, visible, vsm, vx, vy, vz |
| Constructor Summary | |
VCbCurve(long x,
long y,
float z,
long s,
java.awt.Color c,
float or,
long ctrlDist1,
float or1,
long ctrlDist2,
float or2)
|
|
| Method Summary | |
void |
addCamera(int verifIndex)
used internally to create new projected coordinates to use with the new camera |
java.lang.Object |
clone()
returns a clone of this object (only basic information is cloned for now: shape, orientation, position, size) |
(package private) void |
computeSize()
compute curve from VTM object model |
boolean |
coordInside(int x,
int y,
int camIndex)
detects whether the given point is inside this glyph or not |
void |
draw(java.awt.Graphics2D g,
int vW,
int vH,
int i,
java.awt.Stroke stdS,
java.awt.geom.AffineTransform stdT)
draw glyph |
boolean |
fillsView(long w,
long h,
int camIndex)
used to find out if glyph completely fills the view (in which case it is not necessary to repaint objects at a lower altitude) |
float |
getCtrlPointAngle1()
get orientation of control point 1 (polar coords) |
float |
getCtrlPointAngle2()
get orientation of control point 2 (polar coords) |
long |
getCtrlPointRadius1()
get distance from start point to control point 1 (polar coords) |
long |
getCtrlPointRadius2()
get distance from start point to control point 2 (polar coords) |
float |
getOrient()
get orientation |
float |
getSize()
get size (bounding circle radius) |
void |
initCams(int nbCam)
called when glyph is created in order to create the initial set of projected coordinates wrt the number of cameras in the space |
int |
mouseInOut(int x,
int y,
int camIndex)
returns 1 if mouse has entered the glyph, -1 if it has exited the glyph, 0 if nothing has changed (meaning it was already inside or outside it) |
void |
orientTo(float angle)
set orientation (absolute) |
void |
project(com.xerox.VTM.engine.Camera c,
com.xerox.VTM.engine.ViewPanel v)
project shape in camera coord sys prior to actual painting |
void |
removeCamera(int index)
if a camera is removed from the virtual space, we should delete the corresponding projected coordinates, but do not modify the array it self because we do not want to change other cameras' index - just point to null |
void |
resetMouseIn(int i)
reset prevMouseIn for projected coordinates nb i |
void |
reSize(float factor)
multiply bounding circle radius by factor |
void |
setCtrlPoint1(long d,
float o)
set position of control point 1 (polar coords w.r.t start point) |
void |
setCtrlPoint2(long d,
float o)
set position of control point 2 (polar coords w.r.t end point) |
void |
sizeTo(float radius)
set absolute size by setting bounding circle radius |
(package private) void |
textDraw(java.awt.Graphics2D g,
int i)
draw text associated with this glyph |
| Methods inherited from class com.xerox.VTM.glyphs.Glyph |
addDependant, addHSVbColor, addHSVColor, drawMe, getCGlyph, getColor, getColorb, getDependants, getFillStatus, getFont, getHSVbColor, getHSVColor, getID, getLocation, getOwner, getPaintBorderStatus, getStickedGlyphs, getStroke, getStrokeWidth, getText, getType, isSelected, isSensitive, isVisible, move, moveTo, propagateMove, removeDependant, select, setBorderColor, setCGlyph, setColor, setDashed, setFill, setFontSizePolicy, setHSVbColor, setHSVColor, setID, setMouseInsideColor, setOwner, setPaintBorder, setSelectedColor, setSensitivity, setSpecialFont, setStroke, setStrokeWidth, setText, setTextPos, setType, setVisible, setVSM, stick, toString, unstick, usesSpecialFont |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
vs
long vs
- size (distance between start and end point)
vrad1
long vrad1
- control points, polar coordinates - origin is vx,vy - orient=0 on segment linking start and end points
ang1
float ang1
vrad2
long vrad2
ang2
float ang2
pc
ProjCbCurve[] pc
- array of projected coordinates - index of camera in virtual space is equal to index of projected coords in this array
| Constructor Detail |
VCbCurve
public VCbCurve(long x,
long y,
float z,
long s,
java.awt.Color c,
float or,
long ctrlDist1,
float or1,
long ctrlDist2,
float or2)
| Method Detail |
setCtrlPoint1
public void setCtrlPoint1(long d,
float o)
- set position of control point 1 (polar coords w.r.t start point)
setCtrlPoint2
public void setCtrlPoint2(long d,
float o)
- set position of control point 2 (polar coords w.r.t end point)
getCtrlPointRadius1
public long getCtrlPointRadius1()
- get distance from start point to control point 1 (polar coords)
getCtrlPointAngle1
public float getCtrlPointAngle1()
- get orientation of control point 1 (polar coords)
getCtrlPointRadius2
public long getCtrlPointRadius2()
- get distance from start point to control point 2 (polar coords)
getCtrlPointAngle2
public float getCtrlPointAngle2()
- get orientation of control point 2 (polar coords)
initCams
public void initCams(int nbCam)
- called when glyph is created in order to create the initial set of projected coordinates wrt the number of cameras in the space
addCamera
public void addCamera(int verifIndex)
- used internally to create new projected coordinates to use with the new camera
removeCamera
public void removeCamera(int index)
- if a camera is removed from the virtual space, we should delete the corresponding projected coordinates, but do not modify the array it self because we do not want to change other cameras' index - just point to null
- Specified by:
removeCamerain classGlyph
resetMouseIn
public void resetMouseIn(int i)
- reset prevMouseIn for projected coordinates nb i
- Specified by:
resetMouseInin classGlyph
getOrient
public float getOrient()
orientTo
public void orientTo(float angle)
getSize
public float getSize()
computeSize
void computeSize()
- compute curve from VTM object model
sizeTo
public void sizeTo(float radius)
reSize
public void reSize(float factor)
fillsView
public boolean fillsView(long w,
long h,
int camIndex)
- used to find out if glyph completely fills the view (in which case it is not necessary to repaint objects at a lower altitude)
coordInside
public boolean coordInside(int x,
int y,
int camIndex)
- detects whether the given point is inside this glyph or not
- Specified by:
coordInsidein classGlyph
mouseInOut
public int mouseInOut(int x,
int y,
int camIndex)
- returns 1 if mouse has entered the glyph, -1 if it has exited the glyph, 0 if nothing has changed (meaning it was already inside or outside it)
- Specified by:
mouseInOutin classGlyph
project
public void project(com.xerox.VTM.engine.Camera c, com.xerox.VTM.engine.ViewPanel v)
textDraw
void textDraw(java.awt.Graphics2D g, int i)
- draw text associated with this glyph
draw
public void draw(java.awt.Graphics2D g, int vW, int vH, int i, java.awt.Stroke stdS, java.awt.geom.AffineTransform stdT)
clone
public java.lang.Object clone()
- returns a clone of this object (only basic information is cloned for now: shape, orientation, position, size)
|
|||||||||
| Home >> All >> com >> xerox >> VTM >> [ glyphs overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC