|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mt4j.components.MTComponent
org.mt4j.components.visibleComponents.AbstractVisibleComponent
public abstract class AbstractVisibleComponent
The Class AbstractVisibleComponent. Abstract class for creating visible components. It provides methods for storing and changing style information, like the fill- and stroke color.
| Constructor Summary | |
|---|---|
AbstractVisibleComponent(processing.core.PApplet pApplet)Instantiates a new abstract visible component. |
|
AbstractVisibleComponent(processing.core.PApplet pApplet, Icamera globalCamera, Icamera objectCamera)Instantiates a new abstract visible component. |
|
AbstractVisibleComponent(processing.core.PApplet pApplet, java.lang.String name, Icamera objectCamera)Instantiates a new abstract visible component. |
|
| Method Summary | |
|---|---|
protected void |
applyStyle()Apply style. |
protected abstract boolean |
componentContainsPointLocal(Vector3D testPoint)Checks whether the specified point is contained in this component. |
abstract void |
drawComponent(processing.core.PGraphics g)Draws this component only (Not its children!). |
MTColor |
getFillColor()Gets the fill color. |
int |
getFillDrawMode()Gets the fill draw mode. |
FillPaint |
getFillPaint()Gets the fill paint. |
abstract Vector3D |
getIntersectionLocal(Ray ray)Returns the intersection point of the ray and this component (children are not checked for intersections). |
short |
getLineStipple()Gets the line stipple. |
GLMaterial |
getMaterial()Gets the material. |
MTColor |
getStrokeColor()Gets the stroke color. |
float |
getStrokeWeight()Gets the stroke weight. |
StyleInfo |
getStyleInfo()Gets the style info. |
boolean |
isDrawSmooth()Checks if is draw smooth. |
boolean |
isNoFill()Checks if is no fill. |
boolean |
isNoStroke()Checks if is no stroke. |
void |
postDraw(processing.core.PGraphics graphics)Post draw. |
void |
postDrawChildren(processing.core.PGraphics g)Post draw Children. |
void |
preDraw(processing.core.PGraphics graphics)This method is called just before the components drawComponent method is invoked. |
void |
setDrawSmooth(boolean drawSmooth)Sets the draw smooth. |
void |
setFillColor(MTColor fillColor)Sets the fill color. |
void |
setFillDrawMode(int fillDrawMode)Sets the draw mode which will be used for creating display lists. |
void |
setFillPaint(FillPaint fillPaint)Sets the fill paint. |
void |
setLineStipple(short stipplePattern)Sets a line stipple pattern for drawing outlines. |
void |
setMaterial(GLMaterial material)Sets the material used by opengl lightning. |
void |
setNoFill(boolean noFill)Sets the no fill. |
void |
setNoStroke(boolean noStroke)Sets the no stroke. |
void |
setStrokeColor(MTColor strokeColor)Sets the stroke color. |
void |
setStrokeWeight(float strokeWeight)Sets the stroke weight. |
void |
setStyleInfo(StyleInfo styleInfo)Sets the style info. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractVisibleComponent(processing.core.PApplet pApplet)
pApplet - the applet
public AbstractVisibleComponent(processing.core.PApplet pApplet,
Icamera globalCamera,
Icamera objectCamera)
pApplet - the appletglobalCamera - the global cameraobjectCamera - the object camera
public AbstractVisibleComponent(processing.core.PApplet pApplet,
java.lang.String name,
Icamera objectCamera)
pApplet - the appletname - the nameobjectCamera - the object camera| Method Detail |
|---|
public FillPaint getFillPaint()
public void setFillPaint(FillPaint fillPaint)
fillPaint - the new fill paintpublic void preDraw(processing.core.PGraphics graphics)
MTComponentpreDraw in class MTComponent
graphics - the graphics contextpublic void postDraw(processing.core.PGraphics graphics)
MTComponentpostDraw in class MTComponent
public void postDrawChildren(processing.core.PGraphics g)
MTComponentpostDrawChildren in class MTComponent
g - the graphics contextpublic StyleInfo getStyleInfo()
public void setStyleInfo(StyleInfo styleInfo)
styleInfo - the styleInfo to setprotected void applyStyle()
public abstract Vector3D getIntersectionLocal(Ray ray)
MTComponentgetIntersectionLocal in class MTComponent
ray - the rays, in local spaceMTComponent.globalToLocal(org.mt4j.util.math.Vector3D)public abstract void drawComponent(processing.core.PGraphics g)
MTComponentdrawComponent in interface IMTComponent
drawComponent in class MTComponent
g - the graphics contextprotected abstract boolean componentContainsPointLocal(Vector3D testPoint)
MTComponentcomponentContainsPointLocal in class MTComponent
testPoint - the test pointpublic void setFillColor(MTColor fillColor)
fillColor - the new fill colorpublic MTColor getFillColor()
public void setStrokeColor(MTColor strokeColor)
strokeColor - the new stroke colorpublic MTColor getStrokeColor()
public float getStrokeWeight()
StyleInfo.getStrokeWeight()public boolean isDrawSmooth()
StyleInfo.isDrawSmooth()public boolean isNoFill()
StyleInfo.isNoFill()public boolean isNoStroke()
StyleInfo.isNoStroke()public void setDrawSmooth(boolean drawSmooth)
drawSmooth - the draw smoothStyleInfo.setDrawSmooth(boolean)public void setNoFill(boolean noFill)
noFill - the no fillStyleInfo.setNoFill(boolean)public void setNoStroke(boolean noStroke)
noStroke - the no strokeStyleInfo.setNoStroke(boolean)public void setStrokeWeight(float strokeWeight)
strokeWeight - the stroke weightStyleInfo.setStrokeWeight(float)public int getFillDrawMode()
public void setFillDrawMode(int fillDrawMode)
fillDrawMode - the fill draw modepublic void setLineStipple(short stipplePattern)
stipplePattern - the stipple patternpublic short getLineStipple()
public void setMaterial(GLMaterial material)
material - the new materialpublic GLMaterial getMaterial()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||