Exemple #1
0
        ///<summary>
        /// Constructs a new Terrain.
        ///</summary>
        ///<param name="shape">Shape to use for the terrain.</param>
        ///<param name="worldTransform">Transform to use for the terrain.</param>
        public Terrain(TerrainShape shape, AffineTransform worldTransform)
        {
            WorldTransform = worldTransform;
            Shape          = shape;

            Events = new ContactEventManager <Terrain>();
        }
Exemple #2
0
 /// <summary>
 /// Constructs a new mobile mesh collidable.
 /// </summary>
 /// <param name="shape">Shape to use in the collidable.</param>
 public MobileMeshCollidable(MobileMeshShape shape)
     : base(shape)
 {
     Events = new ContactEventManager <EntityCollidable>();
 }
Exemple #3
0
 ///<summary>
 /// Constructs a new static mesh.
 ///</summary>
 ///<param name="collidables">List of collidables in the static group.</param>
 public StaticGroup(IList <Collidable> collidables)
 {
     base.Shape = new StaticGroupShape(collidables, this);
     Events     = new ContactEventManager <StaticGroup>();
 }
Exemple #4
0
 ///<summary>
 /// Constructs a new static mesh.
 ///</summary>
 ///<param name="vertices">Vertex positions of the mesh.</param>
 ///<param name="indices">Index list of the mesh.</param>
 /// <param name="worldTransform">Transform to use to create the mesh initially.</param>
 public StaticMesh(Vector3[] vertices, int[] indices, AffineTransform worldTransform)
 {
     base.Shape = new StaticMeshShape(vertices, indices, worldTransform);
     Events     = new ContactEventManager <StaticMesh>();
 }
Exemple #5
0
 ///<summary>
 /// Constructs a new static mesh.
 ///</summary>
 ///<param name="vertices">Vertex positions of the mesh.</param>
 ///<param name="indices">Index list of the mesh.</param>
 public StaticMesh(Vector3[] vertices, int[] indices)
 {
     base.Shape = new StaticMeshShape(vertices, indices);
     Events     = new ContactEventManager <StaticMesh>();
 }
 ///<summary>
 /// Constructs a new InstancedMesh.
 ///</summary>
 ///<param name="meshShape">Shape to use for the instance.</param>
 ///<param name="worldTransform">Transform to use for the instance.</param>
 public InstancedMesh(InstancedMeshShape meshShape, AffineTransform worldTransform)
 {
     this.worldTransform = worldTransform;
     base.Shape          = meshShape;
     Events = new ContactEventManager <InstancedMesh>();
 }