# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program (LICENSE.txt). If not, see <http://www.gnu.org/licenses/> import sys sys.path.append(scriptdir + '..') from eidolon import ReprType, ImageSceneObject, extendImage from TestUtils import generateTimeSphereImages step = 0.1 dim = 50 # create an object and repr with a particular name images = generateTimeSphereImages(step, dim) obj = ImageSceneObject('Sphere', [], images) mgr.addSceneObject(obj) rep = obj.createRepr(ReprType._imgtimevolume) mgr.addSceneObjectRepr(rep) del obj del rep mgr.clearScene() # this should free up existing objects # attempt to create an object and repr with the same name as the above, this will crash if the repr doesn't choose unique names for materials, textures, etc. images = generateTimeSphereImages(step, dim) obj = ImageSceneObject('Sphere', [], images)
# Eidolon is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program (LICENSE.txt). If not, see <http://www.gnu.org/licenses/> import sys sys.path.append(scriptdir+'..') from eidolon import ReprType,ImageSceneObject,vec3 from TestUtils import generateTimeSphereImages step=0.1 images=generateTimeSphereImages(step) obj=ImageSceneObject('Sphere',[],images) mgr.addSceneObject(obj) rep=obj.createRepr(ReprType._imgtimestack) mgr.addSceneObjectRepr(rep) rep.setPosition(vec3(5,-10,-4)) rep.setRotation(0.1,0.2,-0.12) rep1=obj.createRepr(ReprType._imgtimevolume) mgr.addSceneObjectRepr(rep1) rep1.setPosition(vec3(61,6,8)) rep1.setRotation(-0.1,-0.13,0.22) obj1 = SlicePlugin.createSlicePlane(vec3(49.5,-25.0,24.5),vec3(-0.128762689557,-0.782178248535,0.60960426286)) mgr.addSceneObject(obj1)