|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectthreeD.raytracer.engine.AbstractSurface
threeD.raytracer.primitives.Triangle
A Triangle object represents a triangle in 3d space.
| Constructor Summary | |
Triangle()
Constructs a new Triangle object with all vertices at the origin that is black. |
|
Triangle(Vector p1,
Vector p2,
Vector p3)
Constructs a new Triangle object with the specified vertices that is black. |
|
Triangle(Vector p1,
Vector p2,
Vector p3,
RGB color)
Constructs a new Triangle object with the specified vertices with the color represented by the specified RGB object. |
|
| Method Summary | |
Vector |
getNormalAt(Vector point)
Returns a Vector object that represents the vector normal to this sphere at the point represented by the specified Vector object. |
double[][] |
getParticleVertices()
|
boolean |
getSmooth()
|
Vector[] |
getVertices()
Returns an array of Vector objects representing the vertices of this Triangle object. |
boolean |
intersect(Ray ray)
Returns true if the ray represented by the specified Ray object intersects the triangle represented by this Triangle object in real space. |
Intersection |
intersectAt(Ray ray)
Returns an Intersection object representing the points along the ray represented by the specified Ray object that intersection between the ray and the triangle represented by this Triangle object occurs. |
void |
setSmooth(boolean s)
Sets the smooth flag which indicates if normal vectors should be interpolated. |
void |
setVertices(Vector p1,
Vector p2,
Vector p3)
Sets the vertices of this Triangle object to those specified. |
java.lang.String |
toString()
|
| Methods inherited from class threeD.raytracer.engine.AbstractSurface |
addShader, addTexture, addTransform, calculateTransform, getColor, getColorAt, getLocation, getParent, getRotationCoefficients, getScaleCoefficients, getShadeBack, getShadeFront, getShaderSet, getSize, getTexture, getTextures, getTextureSet, getTransform, getTransform, getTransforms, removeTexture, removeTransform, setColor, setLocation, setParent, setRotationCoefficients, setScaleCoefficients, setShadeBack, setShadeFront, setShaders, setSize, setTexture, setTextures, setTransform, setTransforms, shade |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Triangle()
public Triangle(Vector p1,
Vector p2,
Vector p3)
public Triangle(Vector p1,
Vector p2,
Vector p3,
RGB color)
| Method Detail |
public void setVertices(Vector p1,
Vector p2,
Vector p3)
public Vector[] getVertices()
public void setSmooth(boolean s)
s - Value to use.public boolean getSmooth()
public double[][] getParticleVertices()
getParticleVertices in interface ParticleGroupParticleGroup.getParticleVertices()public Vector getNormalAt(Vector point)
getNormalAt in interface Surfacepublic boolean intersect(Ray ray)
intersect in interface Surfacepublic Intersection intersectAt(Ray ray)
intersectAt in interface Surfacepublic java.lang.String toString()
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||