-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 86a906b
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
Oops, something went wrong.