public void Create(SOMaterial useMaterial, fGameObject parent, int nLayer = -1) { if (curve == null) { curve = new DCurve3(); } axis = Frame3f.Identity; meshObject = GameObjectFactory.CreateMeshGO("revolve_preview"); meshObject.SetMaterial(MaterialUtil.ToMaterialf(useMaterial), true); if (nLayer != -1) { meshObject.SetLayer(nLayer); } bUpdatePending = true; meshObject.SetParent(parent, false); meshObject.SetLocalScale(1.001f * Vector3f.One); }
public void Destroy() { meshObject.SetParent(null); meshObject.Destroy(); }