marchingcubes
Class MCLight
java.lang.Object
|
+--marchingcubes.MCLight
- public class MCLight
- extends java.lang.Object
|
Constructor Summary |
MCLight(marchingcubes.MCVector3 direction,
double ia,
double ir,
double ig,
double ib)
constructor of a MCLight object |
|
Method Summary |
static java.awt.Color |
lambert(marchingcubes.MCVector3 n,
java.util.Vector lights,
marchingcubes.MCMaterial m)
computes the color of a face using Lambert lighting model |
static java.awt.Color |
phong(marchingcubes.MCVector3 n,
java.util.Vector lights,
marchingcubes.MCMaterial m)
computes the color of a face using Phong lighting model |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MCLight
public MCLight(marchingcubes.MCVector3 direction,
double ia,
double ir,
double ig,
double ib)
- constructor of a MCLight object
- Parameters:
direction - light directionia - ambient intensityir - red intensityig - green intensityib - blue intensity
lambert
public static java.awt.Color lambert(marchingcubes.MCVector3 n,
java.util.Vector lights,
marchingcubes.MCMaterial m)
- computes the color of a face using Lambert lighting model
- Parameters:
n - normal to the facelights - lights to be taken in accountm - material of the face
- Returns:
- the color of the face
phong
public static java.awt.Color phong(marchingcubes.MCVector3 n,
java.util.Vector lights,
marchingcubes.MCMaterial m)
- computes the color of a face using Phong lighting model
- Parameters:
n - normal to the facelights - lights to be taken in accountm - material of the face
- Returns:
- the color of the face