sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Classes and Subs in SP?

    Scheduled Pinned Locked Moved SketchyPhysics
    3 Posts 3 Posters 452 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MrPlanet
      last edited by

      I was just making a web browser in MS VB.NET and i noticed how easy it was to program the code because of the classes and subs which define events and other things. Could this be possible in SP? I know it will be a lot of work but it should work, right? 😒

      I reject your reality and substitute my own.

      1 Reply Last reply Reply Quote 0
      • W Offline
        Wacov
        last edited by

        What, in ontick/touch? Already possible, with ruby classes and methods. E.g. my AI is based around my CarAI class, and you actually access scripting in SP from inside the ControllerContext class, which includes the special methods like get/setVar, lookAt, oscillator etc. This tut shows you how to make classes in ruby:
        http://www.devarticles.com/c/a/Ruby-on-Rails/Ruby-Classes-and-Objects/1/

        http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

        1 Reply Last reply Reply Quote 0
        • C Offline
          CPhillips
          last edited by

          Yeah. Think of each object in the simulation as a class and the onTick, onTouch, etc are the event "subs".

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement