Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r2017 - in trunk/scenes: . csafe csafe/python


Chronological Thread 
  • From: "James Bigler" <bigler@cs.utah.edu>
  • To: manta@sci.utah.edu
  • Subject: [Manta] r2017 - in trunk/scenes: . csafe csafe/python
  • Date: Tue, 29 Jan 2008 21:31:20 -0700 (MST)

Author: bigler
Date: Tue Jan 29 07:52:08 2008
New Revision: 2017

Added:
   trunk/scenes/csafe/python/csafe_demo.py
      - copied, changed from r2010, trunk/scenes/csafe/python/csafe.py
Removed:
   trunk/scenes/csafe/python/csafe.py
Modified:
   trunk/scenes/CMakeLists.txt
   trunk/scenes/csafe/CMakeLists.txt
   trunk/scenes/csafe/python/   (props changed)
   trunk/scenes/csafe/python/SceneMenus.py
Log:
scenes/CMakeLists.txt

  If SCENE_CSAFE is turned on, make sure BUILD_NRRDPARTICLES is turned on as
  well.  It's not good to turn on a feature and have it break at link time.

scenes/csafe/CMakeLists.txt

  A bit of cleaning up.  Don't use FindManta.cmake.  It is outdated and does 
the
  wrong thing when you are part of the Manta build.
  
scenes/csafe/python

  Ignore .pyc files.
  
scenes/csafe/python/SceneMenus.py

  Should be pulling stuff in from csafe not example (the name was changed in a
  previous commit).

scenes/csafe/python/csafe.py
scenes/csafe/python/csafe_demo.py

  Grief happens when you name a python source file the same name as python
  module, so renaming the module.

  Don't import stuff from wxPython.  This is the *really* old way of doing
  things and is deprecated.  Consequently, I had to rename some wx<Var> names 
to
  wx.<Var>.

  Don't import TestGroup.  Not sure what this file is, but it's not in the
  source tree and doesn't seem to be needed.


Modified: trunk/scenes/CMakeLists.txt
==============================================================================
--- trunk/scenes/CMakeLists.txt (original)
+++ trunk/scenes/CMakeLists.txt Tue Jan 29 07:52:08 2008
@@ -69,7 +69,9 @@
 IF(FOUND_TEEM AND MANTA_SSE AND BUILD_SWIG_INTERFACE)
 SET(SCENE_CSAFE TRUE CACHE BOOL "csafe demo")
 IF(SCENE_CSAFE)
-   INCLUDE_DIRECTORIES(${TEEM_INCLUDE_DIRS})
+  # The CSAFE stuff requires nrrd particles.
+  SET(BUILD_NRRDPARTICLES TRUE CACHE BOOL "Build NRRD particle data 
reader/scene" FORCE)
+  INCLUDE_DIRECTORIES(${TEEM_INCLUDE_DIRS})
    SUBDIRS(csafe)
 #   ADD_LIBRARY(scene_volumeTest volumeTest.cc)
 #   TARGET_LINK_LIBRARIES

Modified: trunk/scenes/csafe/CMakeLists.txt
==============================================================================
--- trunk/scenes/csafe/CMakeLists.txt   (original)
+++ trunk/scenes/csafe/CMakeLists.txt   Tue Jan 29 07:52:08 2008
@@ -44,18 +44,6 @@
 # STEP ONE: CMake Options
 #
 
-PROJECT (CSAFE)
-
-# Project wide CMake options.
-SET(BUILD_SHARED_LIBS ON)
-SET(CMAKE_VERBOSE_MAKEFILE ON)
-
-# Set and hide output path options.
-SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL 
-  "Single output directory for building all libraries.")
-SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL 
-  "Single output directory for building all executables.")
-
 
###############################################################################
 #
 # STEP TWO: Locate Manta.
@@ -68,7 +56,7 @@
 #
 # Additionally several .cmake scripts from the Manta build are executed to 
 # insure a similar build environment will be used by the project.
-INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/FindManta.cmake)
+#INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/FindManta.cmake)
 
 # If certain SCIRun classes are used from Manta it is necessary to define
 #FORCE_ADD_FLAGS(CMAKE_CXX_FLAGS "-DSCI_NOPERSISTENT")
@@ -79,6 +67,19 @@
 # It's important that new Manta components be compiled into a shared library 
 # so that python bindings may be created for them.
 
+# # Initialize Python/SWIG.
+# SET(CMAKE_SWIG_OUTDIR ${LIBRARY_OUTPUT_PATH})
+# FIND_PATH(SWIG_DIR swig)
+# FIND_PACKAGE(SWIG)
+
+# # Important: Must use Manta's copy of UseSWIG.cmake
+# INCLUDE(${MANTA_SOURCE_DIR}/CMake/MantaUseSWIG.cmake)
+
+FIND_PACKAGE(PythonLibs)
+INCLUDE_DIRECTORIES(
+  ${PYTHON_INCLUDE_PATH}
+  )
+
 # Include this project's source directory
 INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/src
@@ -86,11 +87,11 @@
 
 # ADD YOUR OWN SOURCE CODE AND CHANGE LIBRARY NAME HERE.
 ADD_LIBRARY(CSAFE
-src/CDSWIGIFY.h
-src/CDTest.h
-src/CDGridSpheres.cc
-src/CDGridSpheres.h
-)
+  src/CDSWIGIFY.h
+  src/CDTest.h
+  src/CDGridSpheres.cc
+  src/CDGridSpheres.h
+  )
 
 
 # CHANGE THE NAME OF YOUR LIBRARY HERE.

Modified: trunk/scenes/csafe/python/SceneMenus.py
==============================================================================
--- trunk/scenes/csafe/python/SceneMenus.py     (original)
+++ trunk/scenes/csafe/python/SceneMenus.py     Tue Jan 29 07:52:08 2008
@@ -5,7 +5,7 @@
 import TransferF
 import wxManta
 from manta import *
-from example import *
+from csafe import *
 
 
 class AddRemoveFilesFrame(wx.Frame):

Copied: trunk/scenes/csafe/python/csafe_demo.py (from r2010, 
trunk/scenes/csafe/python/csafe.py)
==============================================================================
--- trunk/scenes/csafe/python/csafe.py  (original)
+++ trunk/scenes/csafe/python/csafe_demo.py     Tue Jan 29 07:52:08 2008
@@ -26,7 +26,7 @@
 #  DEALINGS IN THE SOFTWARE.
 #
 
-""" File: csafe.py
+""" File: csafe_demo.py
 Description:  runs csafe demo.  
 see http://code.sci.utah.edu/Manta/index.php/CSAFE for instructions
 
@@ -45,10 +45,8 @@
 import wx.lib.buttons
 import sys, os, time, traceback, types
 import random
-from wxPython.wx import *
 import wx
 import Histogram
-import TestGroup
 import TransferF
 import SceneMenus
 import SceneInfo
@@ -58,10 +56,10 @@
     \class window with controls
     \brief a window with controls for manipulating the scene, including 
histograms, menus, and playback controls
 """
-class MyFrame(wxFrame):
+class MyFrame(wx.Frame):
     def __init__(self, parent, ID, title):
-        wxFrame.__init__(self, parent, ID, title, 
-                    wxDefaultPosition, wxSize(200, 150))
+        wx.Frame.__init__(self, parent, ID, title, 
+                          wx.DefaultPosition, wx.Size(200, 150))
        self.SetForegroundColour(wx.Colour(255,0,0))
        self.SetBackgroundColour(wx.Colour(90,90,90))
         self.scene = SceneInfo.Scene()





Archive powered by MHonArc 2.6.16.

Top of page