Reformatted MechanicalNode.class
This commit is contained in:
parent
af32448001
commit
9bbc8e4d2c
2 changed files with 220 additions and 231 deletions
|
@ -15,8 +15,7 @@ import resonantinduction.core.ResonantInduction;
|
|||
import universalelectricity.api.vector.Vector3;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
||||
/**
|
||||
* A mechanical node for mechanical energy.
|
||||
/** A mechanical node for mechanical energy.
|
||||
* <p/>
|
||||
* Useful Formula:
|
||||
* <p/>
|
||||
|
@ -26,19 +25,15 @@ import codechicken.multipart.TMultiPart;
|
|||
* Torque = r (Radius) * F (Force) * sin0 (Direction/Angle of the force applied. 90 degrees if
|
||||
* optimal.)
|
||||
*
|
||||
* @author Calclavia
|
||||
*/
|
||||
* @author Calclavia */
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class MechanicalNode extends Node<INodeProvider, TickingGrid, MechanicalNode>
|
||||
implements IMechanicalNode
|
||||
public class MechanicalNode extends Node<INodeProvider, TickingGrid, MechanicalNode> implements IMechanicalNode
|
||||
{
|
||||
public double torque = 0;
|
||||
public double prevAngularVelocity, angularVelocity = 0;
|
||||
public float acceleration = 2f;
|
||||
|
||||
/**
|
||||
* The current rotation of the mechanical node.
|
||||
*/
|
||||
/** The current rotation of the mechanical node. */
|
||||
public double angle = 0;
|
||||
public double prev_angle = 0;
|
||||
protected double maxDeltaAngle = Math.toRadians(180);
|
||||
|
@ -179,9 +174,7 @@ public class MechanicalNode extends Node<INodeProvider, TickingGrid, MechanicalN
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when one revolution is made.
|
||||
*/
|
||||
/** Called when one revolution is made. */
|
||||
protected void revolve()
|
||||
{
|
||||
|
||||
|
@ -218,9 +211,7 @@ public class MechanicalNode extends Node<INodeProvider, TickingGrid, MechanicalN
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The energy percentage loss due to resistance in seconds.
|
||||
*/
|
||||
/** The energy percentage loss due to resistance in seconds. */
|
||||
public double getTorqueLoad()
|
||||
{
|
||||
return load;
|
||||
|
@ -231,9 +222,7 @@ public class MechanicalNode extends Node<INodeProvider, TickingGrid, MechanicalN
|
|||
return load;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recache the connections. This is the default connection implementation.
|
||||
*/
|
||||
/** Recache the connections. This is the default connection implementation. */
|
||||
@Override
|
||||
public void doRecache()
|
||||
{
|
||||
|
|
|
@ -45,6 +45,7 @@ public class NodeGear implements INode, IConnector<GearNetwork>
|
|||
public void deconstruct()
|
||||
{
|
||||
this.rotationEffectMap.clear();
|
||||
this.connections.clear();
|
||||
|
||||
}
|
||||
|
||||
|
@ -68,8 +69,7 @@ public class NodeGear implements INode, IConnector<GearNetwork>
|
|||
@Override
|
||||
public void setNetwork(GearNetwork network)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue