From 7e290b221bc58fd7bc496fcf3540920840dce4b2 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 3 Aug 2018 21:05:12 +0200 Subject: [PATCH] Remove a few unused and obsolete C++ test files --- makepanda/makepanda.vcproj | 3 -- panda/src/collide/test_collide.cxx | 70 --------------------------- panda/src/gobj/test_gobj.cxx | 25 ---------- panda/src/testbed/text_test.cxx | 78 ------------------------------ 4 files changed, 176 deletions(-) delete mode 100644 panda/src/collide/test_collide.cxx delete mode 100644 panda/src/gobj/test_gobj.cxx delete mode 100644 panda/src/testbed/text_test.cxx diff --git a/makepanda/makepanda.vcproj b/makepanda/makepanda.vcproj index 23ed91cdf5..6be22d7d1a 100644 --- a/makepanda/makepanda.vcproj +++ b/makepanda/makepanda.vcproj @@ -760,7 +760,6 @@ - @@ -1114,7 +1113,6 @@ - @@ -3705,7 +3703,6 @@ - diff --git a/panda/src/collide/test_collide.cxx b/panda/src/collide/test_collide.cxx deleted file mode 100644 index 38736d5d38..0000000000 --- a/panda/src/collide/test_collide.cxx +++ /dev/null @@ -1,70 +0,0 @@ -/** - * PANDA 3D SOFTWARE - * Copyright (c) Carnegie Mellon University. All rights reserved. - * - * All use of this software is subject to the terms of the revised BSD - * license. You should have received a copy of this license along - * with this source code in a file named "LICENSE." - * - * @file test_collide.cxx - * @author drose - * @date 2000-04-24 - */ - -#include "collisionTraverser.h" -#include "collisionNode.h" -#include "collisionSphere.h" -#include "collisionPlane.h" -#include "collisionHandlerPusher.h" - -#include "namedNode.h" -#include "pt_NamedNode.h" -#include "pointerTo.h" -#include "transformTransition.h" -#include "luse.h" -#include "get_rel_pos.h" -#include "renderRelation.h" - -int -main(int argc, char *argv[]) { - PT_NamedNode r = new NamedNode("r"); - - PT_NamedNode a = new NamedNode("a"); - PT_NamedNode b = new NamedNode("b"); - - PT(CollisionNode) aa = new CollisionNode("aa"); - PT(CollisionNode) ab = new CollisionNode("ab"); - PT(CollisionNode) ba = new CollisionNode("ba"); - - RenderRelation *r_a = new RenderRelation(r, a); - RenderRelation *r_b = new RenderRelation(r, b); - - RenderRelation *a_aa = new RenderRelation(a, aa); - RenderRelation *a_ab = new RenderRelation(a, ab); - RenderRelation *b_ba = new RenderRelation(b, ba); - - - CollisionSphere *aa1 = new CollisionSphere(LPoint3f(0, 0, 0), 1); - aa->add_solid(aa1); - a_aa->set_transition(new TransformTransition(LMatrix4f::translate_mat(0, -5, 0))); - - CollisionSphere *ab1 = new CollisionSphere(LPoint3f(0, 2, 0), 1.5); - ab->add_solid(ab1); - - Planef plane(LVector3f(0, 1, 0), LPoint3f(0, 0, 0)); - CollisionPlane *ba1 = new CollisionPlane(plane); - ba->add_solid(ba1); - - CollisionTraverser ct; - PT(CollisionHandlerPusher) chp = new CollisionHandlerPusher; - chp->add_collider(aa, a_aa); - ct.add_collider(aa, chp); - - ct.traverse(r); - - nout << "\nFrame 2:\n\n"; - - ct.traverse(r); - - return (0); -} diff --git a/panda/src/gobj/test_gobj.cxx b/panda/src/gobj/test_gobj.cxx deleted file mode 100644 index 0bbe93e907..0000000000 --- a/panda/src/gobj/test_gobj.cxx +++ /dev/null @@ -1,25 +0,0 @@ -/** - * PANDA 3D SOFTWARE - * Copyright (c) Carnegie Mellon University. All rights reserved. - * - * All use of this software is subject to the terms of the revised BSD - * license. You should have received a copy of this license along - * with this source code in a file named "LICENSE." - * - * @file test_gobj.cxx - * @author shochet - * @date 2000-02-02 - */ - -#include "geom.h" -#include "perspectiveProjection.h" - -int main() { - nout << "running test_gobj" << std::endl; - PT(GeomTri) triangle = new GeomTri; - Frustumf frust; - PT(PerspectiveProjection) proj = new PerspectiveProjection(frust); - LMatrix4f mat = proj->get_projection_mat(); - nout << "default proj matrix: " << mat; - return 0; -} diff --git a/panda/src/testbed/text_test.cxx b/panda/src/testbed/text_test.cxx deleted file mode 100644 index f0689940ad..0000000000 --- a/panda/src/testbed/text_test.cxx +++ /dev/null @@ -1,78 +0,0 @@ -/** - * PANDA 3D SOFTWARE - * Copyright (c) Carnegie Mellon University. All rights reserved. - * - * All use of this software is subject to the terms of the revised BSD - * license. You should have received a copy of this license along - * with this source code in a file named "LICENSE." - * - * @file text_test.cxx - */ - -#include "eventHandler.h" -#include "chancfg.h" -#include "textNode.h" -#include "eggLoader.h" -#include "pnotify.h" -#include "pt_NamedNode.h" - -extern PT_NamedNode render; -extern PT_NamedNode egg_root; -extern EventHandler event_handler; - -extern int framework_main(int argc, char *argv[]); -extern void (*define_keys)(EventHandler&); - -PT(TextNode) text_node; -char *textStr; - -void event_p(CPT_Event) { - text_node->set_text("I'm a woo woo woo!"); - - nout << "text is " << text_node->get_width() << " by " - << text_node->get_height() << "\n"; -} - -void event_s(CPT_Event) { - text_node->set_wordwrap(5.0); - - nout << "text is " << text_node->get_width() << " by " - << text_node->get_height() << "\n"; -} - -void text_keys(EventHandler& eh) { - eh.add_hook("p", event_p); - eh.add_hook("s", event_s); - - text_node = new TextNode("text_node"); - PT_NamedNode font = loader.load_sync("cmr12"); - text_node->set_font(font.p()); - text_node->set_wordwrap(20.0); - text_node->set_card_as_margin(0.25, 0.25, 0.25, 0.25); - PT(Texture) tex = new Texture; - tex->set_name("genericButton.rgb"); - tex->set_minfilter(SamplerState::FT_linear); - tex->set_magfilter(SamplerState::FT_linear); - tex->read("/beta/toons/textures/smGreyButtonUp.rgb"); - text_node->set_card_texture( tex ); - text_node->set_card_border(0.1, 0.1); - text_node->set_text( textStr ); - text_node->set_text_color( 0.0, 0.0, 0.0, 1.0 ); - if (text_node->has_card_texture()) - nout << "I've got a texture!" << "\n"; - else - nout << "I don't have a texture..." << "\n"; - nout << "text is " << text_node->get_width() << " by " - << text_node->get_height() << "\n"; - - new RenderRelation(egg_root, text_node); -} - -int main(int argc, char *argv[]) { - define_keys = &text_keys; - if (argc > 1) - textStr = argv[1]; - else - textStr = argv[0]; - return framework_main(argc, argv); -}