|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectespresso3d.engine.base.E3DEngineItem
espresso3d.engine.renderer.base.E3DRenderable
espresso3d.engine.renderer.base.E3DTexturedRenderable
espresso3d.engine.geometry.E3DTriangle
| Constructor Summary | |
E3DTriangle(E3DEngine engine)
|
|
E3DTriangle(E3DEngine engine,
double ax,
double ay,
double az,
double bx,
double by,
double bz,
double cx,
double cy,
double cz,
double tax,
double tay,
double tbx,
double tby,
double tcx,
double tcy,
java.lang.String textureName)
If the texture id is unknown (or not loaded) just give it the name for now. |
|
E3DTriangle(E3DEngine engine,
double ax,
double ay,
double az,
double bx,
double by,
double bz,
double cx,
double cy,
double cz,
double tax,
double tay,
double tbx,
double tby,
double tcx,
double tcy,
java.lang.String textureName,
int glTextureID)
|
|
E3DTriangle(E3DEngine engine,
E3DVector3F vertexA,
E3DVector3F vertexB,
E3DVector3F vertexC)
A triangle that doesn't care about texture coords/textures. |
|
E3DTriangle(E3DEngine engine,
E3DVector3F vertexA,
E3DVector3F vertexB,
E3DVector3F vertexC,
E3DVector3F texCoordA,
E3DVector3F texCoordB,
E3DVector3F texCoordC,
int glTextureID)
|
|
E3DTriangle(E3DTriangle toCopy)
|
|
| Method Summary | |
double |
getAlpha()
|
E3DVector3F |
getCentroid()
|
float[] |
getFloatNormalArray()
|
float[] |
getFloatTexCoordArray()
|
float[] |
getFloatVertexArray()
|
float[] |
getFloatVertexColorArray()
|
E3DVector3F |
getNormal()
|
E3DVector4F |
getPlaneEquationCoords()
|
E3DVector3F[] |
getTextureCoord()
|
E3DVector3F |
getTextureCoordA()
Get the texture coordinate of the first vertex |
E3DVector3F |
getTextureCoordB()
Get the texture coordinate of the second vertex |
E3DVector3F |
getTextureCoordC()
Get the texture coordinate of the third vertex |
E3DVector3F[] |
getVertex()
Get the array of the triangle's vertices (will be length 3) |
E3DVector3F |
getVertexA()
Get the first vertex of the triangle |
E3DVector3F |
getVertexB()
Get the second vertex of the triangle |
E3DVector3F |
getVertexC()
Get the third vertex of the triangle |
E3DVector3F[] |
getVertexColor()
Get an array of colors for each of the triangles vertices |
E3DVector3F |
getVertexColorA()
Get the color of the first vertex |
E3DVector3F |
getVertexColorB()
Get the color of the second vertex |
E3DVector3F |
getVertexColorC()
Get the color of the third vertex |
boolean |
isPointInTriangle(E3DVector3F point)
This pointInTriangle checks if the point is on the inside of all the line segments of the triangle It is slightly faster than isPointInTriangleByAngles |
boolean |
isPointInTriangleByAngles(E3DVector3F point)
This checks if a point is in a triangle by seeing if the interior angles add up to 360Deg. |
void |
normaliseVertexColors()
Ensures all vertex colors are <= 1.0 |
void |
renderAtPosition(E3DVector3F atPosition)
To render outside of the normal rendering loop, this can be added to the external renderable list of the engine's because it implements renderAtPosition. |
void |
resetVertexColor(double color)
Resets all the vertex colors to all be color. |
void |
rotate(double angle,
E3DVector3F upVec,
E3DVector3F translatedAmt)
Rotate the triangle around aroundVec. |
void |
scale(double scaleAmt)
|
void |
setAlpha(double alpha)
|
void |
setNormal(E3DVector3F normal)
|
void |
setPlaneEquationCoords(E3DVector4F planeEq)
|
void |
setTextureCoord(E3DVector3F[] textureCoord)
|
void |
setTextureCoord(E3DVector3F textureCoordA,
E3DVector3F textureCoordB,
E3DVector3F textureCoordC)
Set the texture coords |
void |
setTextureCoordA(E3DVector3F textureCoord)
Set the texture coordinate of the first vertex |
void |
setTextureCoordB(E3DVector3F textureCoord)
Set the texture coordinate of the second vertex |
void |
setTextureCoordC(E3DVector3F textureCoord)
Set the texture coordinate of the third vertex |
void |
setVertex(E3DVector3F[] vertex)
Set the triangle's vertices |
void |
setVertex(E3DVector3F vertexA,
E3DVector3F vertexB,
E3DVector3F vertexC)
Set the vertices |
void |
setVertexA(E3DVector3F vertex)
Set the first vertex of the triangle |
void |
setVertexB(E3DVector3F vertex)
Set the second vertex of the triangle |
void |
setVertexC(E3DVector3F vertex)
Set the third vertex of the triangle |
void |
setVertexColor(E3DVector3F[] vertexColor)
Set the colors of each vertex of a triangle |
void |
setVertexColor(E3DVector3F vertexColorA,
E3DVector3F vertexColorB,
E3DVector3F vertexColorC)
Set the colors of each vertex of the triangle |
void |
setVertexColorA(E3DVector3F vertexColor)
Set the color of the first vertex |
void |
setVertexColorB(E3DVector3F vertexColor)
Set the color of the second vertex |
void |
setVertexColorC(E3DVector3F vertexColor)
Set the color of the third vertex |
java.lang.String |
toString()
|
void |
translate(E3DVector3F translationAmt)
Translate the triangle vertices |
| Methods inherited from class espresso3d.engine.renderer.base.E3DTexturedRenderable |
getGlTextureID, getTextureName, setGlTextureID, setTextureName |
| Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable |
render |
| Methods inherited from class espresso3d.engine.base.E3DEngineItem |
getEngine, setEngine |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public E3DTriangle(E3DEngine engine)
public E3DTriangle(E3DTriangle toCopy)
public E3DTriangle(E3DEngine engine,
double ax,
double ay,
double az,
double bx,
double by,
double bz,
double cx,
double cy,
double cz,
double tax,
double tay,
double tbx,
double tby,
double tcx,
double tcy,
java.lang.String textureName)
public E3DTriangle(E3DEngine engine,
E3DVector3F vertexA,
E3DVector3F vertexB,
E3DVector3F vertexC)
engine - vertexA - vertexB - vertexC -
public E3DTriangle(E3DEngine engine,
E3DVector3F vertexA,
E3DVector3F vertexB,
E3DVector3F vertexC,
E3DVector3F texCoordA,
E3DVector3F texCoordB,
E3DVector3F texCoordC,
int glTextureID)
public E3DTriangle(E3DEngine engine,
double ax,
double ay,
double az,
double bx,
double by,
double bz,
double cx,
double cy,
double cz,
double tax,
double tay,
double tbx,
double tby,
double tcx,
double tcy,
java.lang.String textureName,
int glTextureID)
| Method Detail |
public E3DVector3F getVertexA()
public void setVertexA(E3DVector3F vertex)
vertex - public E3DVector3F getVertexB()
public void setVertexB(E3DVector3F vertex)
vertex - public E3DVector3F getVertexC()
public void setVertexC(E3DVector3F vertex)
vertex - public E3DVector3F getVertexColorA()
public void setVertexColorA(E3DVector3F vertexColor)
vertexColor - E3DVector3F specifying RGB components right 0.0 <= R.G.B. <= 1.0public E3DVector3F getVertexColorB()
public void setVertexColorB(E3DVector3F vertexColor)
vertexColor - E3DVector3F specifying RGB components right 0.0 <= R.G.B. <= 1.0public E3DVector3F getVertexColorC()
public void setVertexColorC(E3DVector3F vertexColor)
vertexColor - E3DVector3F specifying RGB components right 0.0 <= R.G.B. <= 1.0public E3DVector3F getTextureCoordA()
public void setTextureCoordA(E3DVector3F textureCoord)
textureCoord - public E3DVector3F getTextureCoordB()
public void setTextureCoordB(E3DVector3F textureCoord)
textureCoord - public E3DVector3F getTextureCoordC()
public void setTextureCoordC(E3DVector3F textureCoord)
textureCoord - public E3DVector3F[] getTextureCoord()
public void setTextureCoord(E3DVector3F[] textureCoord)
textureCoord - The textureCoords to set
public void setTextureCoord(E3DVector3F textureCoordA,
E3DVector3F textureCoordB,
E3DVector3F textureCoordC)
textureCoordA - textureCoordB - textureCoordC - public E3DVector3F[] getVertex()
public void setVertex(E3DVector3F[] vertex)
vertex - Array of the 3 vertices (E3DVector3F's) of the triangle
public void setVertex(E3DVector3F vertexA,
E3DVector3F vertexB,
E3DVector3F vertexC)
vertexA - vertexB - vertexC - public E3DVector3F[] getVertexColor()
public void setVertexColor(E3DVector3F[] vertexColor)
vertexColor - Array of E3DVector3F's
public void setVertexColor(E3DVector3F vertexColorA,
E3DVector3F vertexColorB,
E3DVector3F vertexColorC)
vertexColorA - vertexColorB - vertexColorC - public void resetVertexColor(double color)
public void normaliseVertexColors()
public float[] getFloatVertexArray()
public float[] getFloatVertexColorArray()
public float[] getFloatNormalArray()
public float[] getFloatTexCoordArray()
public E3DVector3F getCentroid()
public boolean isPointInTriangle(E3DVector3F point)
point -
public boolean isPointInTriangleByAngles(E3DVector3F point)
point -
public void renderAtPosition(E3DVector3F atPosition)
renderAtPosition in class E3DTexturedRenderablepublic void setNormal(E3DVector3F normal)
normal - The normal to set.public E3DVector3F getNormal()
public E3DVector4F getPlaneEquationCoords()
public void setPlaneEquationCoords(E3DVector4F planeEq)
public void translate(E3DVector3F translationAmt)
public void scale(double scaleAmt)
public java.lang.String toString()
public void rotate(double angle,
E3DVector3F upVec,
E3DVector3F translatedAmt)
angle - upVec - translatedAmt - public double getAlpha()
public void setAlpha(double alpha)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||