Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
dgquintas committed Apr 6, 2012
0 parents commit 86a906b
Show file tree
Hide file tree
Showing 4,314 changed files with 559,480 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## generic files to ignore
*~
*.lock
*.DS_Store
*.swp
*.out

#python specific
*.pyc

.dropbox
44 changes: 44 additions & 0 deletions 3d/panda3d/python/helloworld/helloworld.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import direct.directbase.DirectStart
from pandac.PandaModules import *

from direct.task import Task
from direct.actor import Actor
from direct.interval.IntervalGlobal import *
import math

#load the 1st environment model
environ = loader.loadModel("models/environment")
environ.reparentTo(render)
environ.setScale(0.25,0.25, 0.25)
environ.setPos(-8,42,0)

#task to move the camera
def SpinCameraTask(task):
angledegrees = task.time * 6.0
angleradiants = angledegrees * (math.pi / 180.0)
base.camera.setPos(20*math.sin(angleradiants),
-20.0*math.cos(angleradiants),3)
base.camera.setHpr(angledegrees, 0, 0)
return Task.cont

#taskMgr.add(SpinCameraTask, "SpinCameraTask")


#load the panda actor, and loop its animation
pandaActor = Actor.Actor("models/panda-model", {"walk":"models/panda-walk4"})
pandaActor.setScale(0.005, 0.005, 0.005)
pandaActor.reparentTo(render)
pandaActor.loop("walk")

#create the four lerp intervals needed to walk back and forth
pandaPosInerval1 = pandaActor.posInterval(13, Point3(0,-10, 0), startPos=Point3(0,10,0))
pandaPosInerval2 = pandaActor.posInterval(13, Point3(0,10, 0), startPos=Point3(0,-10,0))
pandaHprInerval1 = pandaActor.hprInterval(3, Point3(180,0, 0), startHpr=Point3(0,0,0))
pandaHprInerval2 = pandaActor.hprInterval(3, Point3(0,0, 0), startHpr=Point3(180,0,0))


#create and play the sequence that coordinates the intervals
pandaPace = Sequence(pandaPosInerval1, pandaHprInerval1,
pandaPosInerval2, pandaHprInerval2, name = "pandaPace")
pandaPace.loop()
run()
Binary file added 64/add
Binary file not shown.
32 changes: 32 additions & 0 deletions 64/add.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <iostream>
#include <stdint.h>

uint64_t addfuncASM(uint64_t a, uint64_t b){
asm ( "addq %[a], %[b];"
: "=r" (b)
: [b] "0"(b), [a] "r" (a)
: "cc"
);

return b;
}

uint64_t addfunc(uint64_t a, uint64_t b){
b+=a;
return b;
}


int main(){

unsigned long a,b;

a = 9796093023208UL;
b = 549753833388UL;

addfunc(a,b);
addfuncASM(a,b);

return 0;
}

Loading

0 comments on commit 86a906b

Please sign in to comment.