Exemplo n.º 1
0
        internal void AddComponent(MyActorComponent component) 
        {
            // only flat hierarchy 
            Debug.Assert(component.Type != MyActorComponentEnum.GroupLeaf || GetGroupRoot() == null);
            Debug.Assert(component.Type != MyActorComponentEnum.GroupRoot || GetGroupLeaf() == null);

            component.Assign(this);
            m_components.Add(component);
        }
Exemplo n.º 2
0
 internal void RemoveComponent(MyActorComponent component)
 {
     component.OnRemove(this);
     m_components.Remove(component);
 }
Exemplo n.º 3
0
 internal void Clear()
 {
     WorldMatrix = MatrixD.Zero;
     CommonObjectData = default(MyObjectDataCommon);
     NonVoxelObjectData = MyObjectDataNonVoxel.Invalid;
     VoxelCommonObjectData = MyObjectDataVoxelCommon.Invalid;
     Mesh = LodMeshId.NULL;
     MergedMesh = MyMergedLodMeshId.NULL;
     Instancing = InstancingId.NULL;
     DepthShaders = MyMaterialShadersBundleId.NULL;
     Shaders = MyMaterialShadersBundleId.NULL;
     ForwardShaders = MyMaterialShadersBundleId.NULL;
     DrawSubmesh = default(MyDrawSubmesh);
     PerMaterialIndex = 0;
     SectionSubmeshes = null;
     InstanceCount = 0;
     StartInstance = 0;
     SkinningMatrices = null;
     Type = MyMaterialType.OPAQUE;
     Flags = 0;
     Lod = 0;
     ObjectBuffer = null;
     Parent = null;
     Material = MyMeshMaterialId.NULL;
     UnusedMaterials = UnusedMaterials ?? new HashSet<string>();
     UnusedMaterials.Clear();
 }