Exemple #1
0
        public Arco(TgcMesh mesh, float meshRotationAngle) : base(mesh)
        {
            this.meshRotationAngle = meshRotationAngle;

            cuerpo = BulletRigidBodyFactory.Instance.CreateRigidBodyFromTgcMesh(mesh);
            TGCQuaternion rot = new TGCQuaternion();

            rot.RotateAxis(new TGCVector3(0, 1, 0), meshRotationAngle);
            cuerpo.WorldTransform = TGCMatrix.RotationTGCQuaternion(rot).ToBulletMatrix();

            UpdateAABB();
            AABBGol = new TgcBoundingAxisAlignBox(AABB.PMin + new TGCVector3(10, 10, 10), AABB.PMax - new TGCVector3(10, 10, 10));
            AABBGol.transform(Mesh.Transform);

            Ka         = 0.4f;
            Kd         = 0.55f;
            Ks         = 0.05f;
            shininess  = 0;
            reflection = 0;
        }