40 lines
579 B
C#
40 lines
579 B
C#
using System;
|
|
|
|
namespace PhysicsTools
|
|
{
|
|
[Serializable]
|
|
public class SegmentProperties
|
|
{
|
|
[Serializable]
|
|
public enum Type
|
|
{
|
|
CYLINDER = 0,
|
|
BOX = 1
|
|
}
|
|
|
|
public Type type;
|
|
|
|
public SegmentPropertiesBase properties;
|
|
|
|
public SegmentProperties()
|
|
{
|
|
properties = new SegmentPropertiesCylinder();
|
|
type = Type.CYLINDER;
|
|
}
|
|
|
|
public void setType(Type t)
|
|
{
|
|
switch (t)
|
|
{
|
|
case Type.BOX:
|
|
properties = new SegmentPropertiesBox();
|
|
break;
|
|
case Type.CYLINDER:
|
|
properties = new SegmentPropertiesCylinder();
|
|
break;
|
|
}
|
|
type = t;
|
|
}
|
|
}
|
|
}
|