sim.portrayal3d.network.ConeEdgePortrayal3D Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mason Show documentation
Show all versions of mason Show documentation
MASON is a fast discrete-event multiagent simulation library core in Java, designed to be the foundation for large custom-purpose Java simulations, and also to provide more than enough functionality for many lightweight simulation needs. MASON contains both a model library and an optional suite of visualization tools in 2D and 3D.
The newest version!
/*
* Created on Nov 18, 2006
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package sim.portrayal3d.network;
import java.awt.Color;
import javax.media.j3d.*;
import sim.portrayal3d.simple.PrimitivePortrayal3D;
import com.sun.j3d.utils.geometry.*;
/**
* @author Gabriel Balan
*
*/
public class ConeEdgePortrayal3D extends PrimitiveEdgePortrayal3D
{
public ConeEdgePortrayal3D()
{
super(new Cone(0.5f, 2f));
}
public ConeEdgePortrayal3D(float coneBaseRadius)
{
super(new Cone(coneBaseRadius, 2));
}
public ConeEdgePortrayal3D(Color labelColor)
{
super(new Cone(), labelColor);
}
protected void init(Node edgeModel)
{
super.init(edgeModel);
Cone c = (Cone)edgeModel;
PrimitivePortrayal3D.setShape3DFlags(c.getShape(Cone.BODY));
PrimitivePortrayal3D.setShape3DFlags(c.getShape(Cone.CAP));
}
//cap, body.
protected int numShapes(){return 2;}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy