added doc

This commit is contained in:
Martin Pernollet 2014-12-30 11:27:26 +01:00
parent b25b73cb88
commit 58c2796c1a
8 changed files with 27 additions and 8 deletions

View File

@ -195,7 +195,7 @@ public class BoundingBox3d {
}
public double getTransformedRadius(LogTransformer transformers) {
return getTransformedCenter(transformers).distance(transformers.computePoint(new Coord3d(xmin, ymin, zmin)));
return getTransformedCenter(transformers).distance(transformers.compute(new Coord3d(xmin, ymin, zmin)));
}
/**

View File

@ -59,7 +59,7 @@ public class AxeTransformablePoint extends Point {
public void updateBounds() {
bbox.reset();
if(transformers != null) {
bbox.add(transformers.computePoint(this.xyz));
bbox.add(transformers.compute(this.xyz));
System.out.println(this.getClass() + "log");
} else {
bbox.add(this);

View File

@ -89,6 +89,6 @@ public class AxeTransformableScatter extends Scatter{
public void updateBounds() {
bbox.reset();
for (Coord3d c : coordinates)
bbox.add(transformers.computePoint(c));
bbox.add(transformers.compute(c));
}
}

View File

@ -61,7 +61,7 @@ public class AxeTransformableScatterPoint extends ScatterPoint{
public void updateBounds() {
bbox.reset();
for (LightPoint c : points)
bbox.add(transformers.computePoint(c.xyz));
bbox.add(transformers.compute(c.xyz));
}
}

View File

@ -1,5 +1,10 @@
package org.jzy3d.plot3d.primitives.log.transformers;
/**
* Specify an axe transform (e.g. for log axes)
*
* @author
*/
public interface AxeTransform {
public float compute(float value);
}

View File

@ -1,5 +1,10 @@
package org.jzy3d.plot3d.primitives.log.transformers;
/**
* Do not apply any transform (return input value).
*
* @author
*/
public class AxeTransformLinear implements AxeTransform {
@Override

View File

@ -1,6 +1,10 @@
package org.jzy3d.plot3d.primitives.log.transformers;
/**
* Apply log transform if value is greater than 0 (otherwise return 0).
*
* @author
*/
public class AxeTransformLog implements AxeTransform{
@Override

View File

@ -3,6 +3,12 @@ package org.jzy3d.plot3d.primitives.log.transformers;
import org.jzy3d.maths.Coord2d;
import org.jzy3d.maths.Coord3d;
/**
* A helper to apply 3 {@link AxeTransform} on each dimension of a {@link Coord3d}.
*
* @author
*
*/
public class LogTransformer {
protected AxeTransform x;
protected AxeTransform y;
@ -44,12 +50,11 @@ public class LogTransformer {
this.z = z;
}
public Coord3d computePoint(Coord3d point) {
public Coord3d compute(Coord3d point) {
return new Coord3d(getX().compute(point.x), getY().compute(point.y), getZ().compute(point.z));
}
public Coord2d computePoint(Coord2d point) {
public Coord2d compute(Coord2d point) {
return new Coord2d(getX().compute(point.x), getY().compute(point.y));
}
}