|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.earth.model.graph.ProjectorObject de.fhg.igd.earth.model.graph.ModelGraphObject de.fhg.igd.earth.model.graph.Node de.fhg.igd.earth.model.graph.Leaf de.fhg.igd.earth.model.graph.Shape de.fhg.igd.earth.model.graph.Polygon
This class represents a polygon (graphic object, leaf). A polygon includes coordinates, normals, textureCoordinates and a bounding box. For a wire frame visualization only the coordinates are needed. For a solid visualization the coordinates and the normals are needed. For a textured visualization the coordinates, the normals and the textureCoordinates are needed. The bounding box is stored permanently. Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG
Field Summary | |
private cBoundingBox |
boundingBox_
a bounding box object (2 points) |
private Vector |
coordinates_
point coordinates (cVector3d) |
private Vector |
normals_
normals (cVector3f) |
private Vector |
textureCoordinates_
texture coordinates (cVector2f) |
Fields inherited from class de.fhg.igd.earth.model.graph.Shape |
CULL_BACKFACE, CULL_FRONTFACE, CULL_NONE, STYLE_SOLID, STYLE_TEXTURE, STYLE_WIRE_FRAME |
Fields inherited from class de.fhg.igd.earth.model.graph.Leaf |
|
Fields inherited from class de.fhg.igd.earth.model.graph.Node |
boundless_, collidable_, icon_, parent_, pickable_ |
Fields inherited from class de.fhg.igd.earth.model.graph.ProjectorObject |
projectorObject_ |
Constructor Summary | |
Polygon()
Constructs and initializes an empty polygon. |
Method Summary | |
protected boolean |
addPoint(cPoint3d c)
Adds a Point to this polygon (blocked by mutable). |
boolean |
addPoint(cPoint3d c,
cVector3f n)
Adds a Point to this polygon (blocked by mutable). |
boolean |
addPoint(cPoint3d c,
cVector3f n,
cPoint2f t)
Adds a Point to this polygon (blocked by mutable). |
boolean |
addPoint(double cx,
double cy,
double cz)
Adds a Point to this polygon (blocked by mutable). |
boolean |
addPoint(double cx,
double cy,
double cz,
float nx,
float ny,
float nz)
Adds a Point to this polygon (blocked by mutable). |
boolean |
addPoint(double cx,
double cy,
double cz,
float nx,
float ny,
float nz,
float tx,
float ty)
Adds a Point to this polygon (blocked by mutable). |
protected void |
calcBoundingBox(cBoundingBox boundingBox)
Calculates the bounding box of this box. |
Object |
clone()
Clones this polygon |
Vector |
getCoordinates()
Returns the coordinates vector |
cPoint3d[] |
getCoordinatesArray()
Returns the coordinates array |
Vector |
getNormals()
Returns the normals vector |
cVector3f[] |
getNormalsArray()
Returns the normals array |
int |
getSubType()
Returns SUBTYPE_POLYGON |
Vector |
getTextureCoordinates()
Returns the textureCoordinates vector |
cPoint2f[] |
getTextureCoordinatesArray()
Returns the textureCoordinates array |
int |
getType()
Returns TYPE_LEAF |
protected boolean |
setCoordinates(Vector c)
Sets the coordinates vector (blocked by mutable). |
boolean |
setNormals(Vector n)
Sets the normals vector (blocked by mutable). |
boolean |
setTextureCoordinates(Vector tc)
Sets the textureCoordinates vector (blocked by mutable). |
Methods inherited from class de.fhg.igd.earth.model.graph.Shape |
getColor, getCullingMode, getHighLight, getHighLightColor, getImage, getStyle, getTransparency, setColor, setCullingMode, setHighLight, setHighLightColor, setImage, setStyle, setTransparency |
Methods inherited from class de.fhg.igd.earth.model.graph.Leaf |
createLeafList, createSubGroupList, createSubNodeList, detach, getVisible, searchDown, searchDown, searchDown, searchDown, searchDownInserter, searchDownInserter, setMutable, setVisible |
Methods inherited from class de.fhg.igd.earth.model.graph.Node |
broadcastCreation, broadcastResetChanges, createParentGroupList, delete, delete, getBoundingBox, getBoundless, getBranchGroup, getCollidable, getGroup, getIcon, getLeafList, getModelGraph, getParent, getParentGroupList, getPickable, getSubGroupList, getSubNodeList, isFocused, move, move, moveTo, publishChanges, resetProjectorObject, searchUp, searchUp, searchUp, searchUp, setBoundless, setCollidable, setIcon, setParent, setPickable |
Methods inherited from class de.fhg.igd.earth.model.graph.ModelGraphObject |
anyChanges, anySubChanges, getChanges, getChanges, getInfoTable, getInfoTableElements, getInfoTableKeys, getInfoTableSize, getInfoTableValues, getMutable, getName, getSubChanges, getSubChanges, getSubTypeName, getTimeStamp, getTrace, getTraceable, putInfo, resetChanges, setChanges, setInfoTable, setName, setSubChanges, setTrace, VectorClone |
Methods inherited from class de.fhg.igd.earth.model.graph.ProjectorObject |
getProjectorObject, setProjectorObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Vector normals_
private Vector coordinates_
private Vector textureCoordinates_
private cBoundingBox boundingBox_
Constructor Detail |
public Polygon()
Method Detail |
public int getType()
getType
in class ModelGraphObject
public int getSubType()
getSubType
in class ModelGraphObject
public boolean addPoint(double cx, double cy, double cz, float nx, float ny, float nz, float tx, float ty)
true
on success.public boolean addPoint(cPoint3d c, cVector3f n, cPoint2f t)
c
- coordinaten
- normalt
- textureCoordinate
true
on success.public boolean addPoint(double cx, double cy, double cz, float nx, float ny, float nz)
true
on success.public boolean addPoint(cPoint3d c, cVector3f n)
c
- coordinaten
- normal
true
on success.public boolean addPoint(double cx, double cy, double cz)
true
on success.protected boolean addPoint(cPoint3d c)
c
- coordinate
true
on success.protected boolean setCoordinates(Vector c)
c
- coordinates vector
true
on success.public Vector getCoordinates()
public cPoint3d[] getCoordinatesArray()
public boolean setTextureCoordinates(Vector tc)
tc
- textureCoordinates vector
true
on success.public Vector getTextureCoordinates()
public cPoint2f[] getTextureCoordinatesArray()
public boolean setNormals(Vector n)
n
- normals vector
true
on success.public Vector getNormals()
public cVector3f[] getNormalsArray()
protected void calcBoundingBox(cBoundingBox boundingBox)
calcBoundingBox
in class Node
boundingBox
- which will be combined withpublic Object clone()
clone
in class Shape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |