Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.xerox.VTM.glyphs
Class VBoolShape  view VBoolShape download VBoolShape.java

java.lang.Object
  extended bycom.xerox.VTM.glyphs.Glyph
      extended bycom.xerox.VTM.glyphs.VBoolShape
All Implemented Interfaces:
java.lang.Cloneable

public class VBoolShape
extends Glyph
implements java.lang.Cloneable

Boolean shape - defined by a main glyph and a list of boolean operations (applied according to their order in the constructor's array) -right now we only support RectangularShape derivatives (Ellipse, Rectangle)


Field Summary
(package private)  BooleanOps[] booleanShapes
          list of boolean operations (applied in the order given by the array)
(package private)  ProjBoolean[] pc
          array of projected coordinates - index of camera in virtual space is equal to index of projected coords in this array
(package private)  int shapeType
          1=ellipse 2=rectangle
(package private)  long szx
          main shape size in virtual space
(package private)  long szy
          main shape size in virtual space
 
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
VBoolShape(long x, long y, float z, long sx, long sy, int st, BooleanOps[] b, java.awt.Color c)
           
 
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)
 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)
 long getHeight()
          get full height
 int getMainShapeType()
          public only because accessed by svg export module
 BooleanOps[] getOperations()
          public only because accessed by svg export module
 float getOrient()
          orientation is disabled
 float getSize()
          size is disabled
 long getWidth()
          get full width
 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)
          orientation is disabled
 void orientToNS(float angle)
          orientation is disabled
 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)
          size is disabled
 void sizeTo(float radius)
          size is disabled
 void sizeToNS(float radius)
          size is disabled
(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

booleanShapes

BooleanOps[] booleanShapes
list of boolean operations (applied in the order given by the array)


szx

long szx
main shape size in virtual space


szy

long szy
main shape size in virtual space


shapeType

int shapeType
1=ellipse 2=rectangle


pc

ProjBoolean[] pc
array of projected coordinates - index of camera in virtual space is equal to index of projected coords in this array

Constructor Detail

VBoolShape

public VBoolShape(long x,
                  long y,
                  float z,
                  long sx,
                  long sy,
                  int st,
                  BooleanOps[] b,
                  java.awt.Color c)
Method Detail

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

Specified by:
initCams in class Glyph

addCamera

public void addCamera(int verifIndex)
used internally to create new projected coordinates to use with the new camera

Specified by:
addCamera in class Glyph

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:
removeCamera in class Glyph

resetMouseIn

public void resetMouseIn(int i)
reset prevMouseIn for projected coordinates nb i

Specified by:
resetMouseIn in class Glyph

getOrient

public float getOrient()
orientation is disabled

Specified by:
getOrient in class Glyph

orientTo

public void orientTo(float angle)
orientation is disabled

Specified by:
orientTo in class Glyph

orientToNS

public void orientToNS(float angle)
orientation is disabled


getSize

public float getSize()
size is disabled

Specified by:
getSize in class Glyph

sizeTo

public void sizeTo(float radius)
size is disabled

Specified by:
sizeTo in class Glyph

sizeToNS

public void sizeToNS(float radius)
size is disabled


getWidth

public long getWidth()
get full width


getHeight

public long getHeight()
get full height


reSize

public void reSize(float factor)
size is disabled

Specified by:
reSize in class Glyph

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)

Specified by:
fillsView in class Glyph

coordInside

public boolean coordInside(int x,
                           int y,
                           int camIndex)
detects whether the given point is inside this glyph or not

Specified by:
coordInside in class Glyph

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:
mouseInOut in class Glyph

project

public void project(com.xerox.VTM.engine.Camera c,
                    com.xerox.VTM.engine.ViewPanel v)
project shape in camera coord sys prior to actual painting

Specified by:
project in class Glyph

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)
draw glyph

Specified by:
draw in class Glyph

getMainShapeType

public int getMainShapeType()
public only because accessed by svg export module


getOperations

public BooleanOps[] getOperations()
public only because accessed by svg export module


clone

public java.lang.Object clone()
returns a clone of this object (only basic information is cloned for now: shape, orientation, position, size)

Specified by:
clone in class Glyph