mirror of https://github.com/rusefi/jzy3d-api.git
added doc
This commit is contained in:
parent
b25b73cb88
commit
58c2796c1a
|
@ -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)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue