|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectthreeD.raytracer.primitives.PolynomialTerm
A PolynomialTerm object represents a single term of a polynomial function represented by a Polynomial object.
| Constructor Summary | |
PolynomialTerm()
Constructs a new PolynomialTerm object with a coefficient of 0.0 and all powers set to 0. |
|
PolynomialTerm(double coefficient,
int x,
int y,
int z)
Constructs a new PolynomialTerm object using the specified coefficient and the specified integer powers of x, y, and z. |
|
| Method Summary | |
void |
calculateDx()
Calculates the partial derivative of the polynomial term represented by this PolynomialTerm object with respect to X and stores it for later use. |
void |
calculateDy()
Calculates the partial derivative of the polynomial term represented by this PolynomialTerm object with respect to Y and stores it for later use. |
void |
calculateDz()
Calculates the partial derivative of the polynomial term represented by this PolynomialTerm object with respect to Z and stores it for later use. |
double |
evaluate(double x,
double y,
double z)
Evaluates the polynomial term represented by this PolynomialTerm object for the specfied x, y, and z values and returns the result as a double value. |
double |
expand(double value,
int power)
Raises the specified value to the specified integer power and returns the result as a double value. |
double |
getCoefficient()
Returns the coefficient of this PolynomialTerm object as a double value. |
PolynomialTerm |
getDx()
Returns the partial derivative of the polynomial term represented by this PolynomialTerm object with respect to X as a PolynomialTerm object. |
PolynomialTerm |
getDy()
Returns the partial derivative of the polynomial term represented by this PolynomialTerm object with respect to Y as a PolynomialTerm object. |
PolynomialTerm |
getDz()
Returns the partial derivative of the polynomial term represented by this PolynomialTerm object with respect to Z as a PolynomialTerm object. |
int |
getExpOfX()
Returns the exponent on X of this PolynomialTerm object as an integer value. |
int |
getExpOfY()
Returns the exponent on Y of this PolynomialTerm object as an integer value. |
int |
getExpOfZ()
Returns the exponent on Z of this PolynomialTerm object as an integer value. |
boolean |
isLikeTerm(PolynomialTerm term)
Returns true if the exponents of x, y, and z of this PolynomialTerm object are the same as the specified PolynomialTerm object. |
PolynomialTerm |
multiply(PolynomialTerm term)
Calculates the product of this PolynomialTerm object with the specified PolynomialTerm object and returns the result as a PolynomialTerm object. |
void |
setCoefficient(double coefficient)
Sets the coefficient of this PolynomialTerm object to the specified double value. |
void |
setExpOfX(int x)
Sets the exponent on X of this PolynomialTerm object to the specified integer value. |
void |
setExpOfY(int y)
Sets the exponent on Y of this PolynomialTerm object to the specified integer value. |
void |
setExpOfZ(int z)
Sets the exponent on Z of this PolynomialTerm object to the specified integer value. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PolynomialTerm()
public PolynomialTerm(double coefficient,
int x,
int y,
int z)
| Method Detail |
public void setCoefficient(double coefficient)
public void setExpOfX(int x)
public void setExpOfY(int y)
public void setExpOfZ(int z)
public double getCoefficient()
public int getExpOfX()
public int getExpOfY()
public int getExpOfZ()
public PolynomialTerm getDx()
public PolynomialTerm getDy()
public PolynomialTerm getDz()
public double evaluate(double x,
double y,
double z)
public void calculateDx()
public void calculateDy()
public void calculateDz()
public PolynomialTerm multiply(PolynomialTerm term)
public boolean isLikeTerm(PolynomialTerm term)
public double expand(double value,
int power)
public java.lang.String toString()
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||