Refactoring nodes
This commit is contained in:
parent
3d4d3bd169
commit
41ee896f42
|
@ -2,6 +2,7 @@ package cycles;
|
|||
|
||||
import lue.App;
|
||||
import lue.Eg;
|
||||
import lue.node.RootNode;
|
||||
import lue.node.CameraNode;
|
||||
import cycles.trait.PhysicsWorld;
|
||||
|
||||
|
@ -14,7 +15,7 @@ class Root {
|
|||
public function new() {
|
||||
|
||||
var sceneNode = Eg.addScene(Main.projectScene);
|
||||
cam = lue.node.Node.cameras[0];
|
||||
cam = RootNode.cameras[0];
|
||||
|
||||
physics = new PhysicsWorld();
|
||||
Eg.addNodeTrait(sceneNode, physics);
|
||||
|
|
|
@ -156,12 +156,12 @@ class PhysicsWorld extends Trait {
|
|||
}
|
||||
|
||||
public function getRayFrom():BtVector3Pointer {
|
||||
var camera = lue.node.Node.cameras[0];
|
||||
var camera = lue.node.RootNode.cameras[0];
|
||||
return BtVector3.create(camera.transform.pos.x, camera.transform.pos.y, camera.transform.pos.z);
|
||||
}
|
||||
|
||||
public function getRayTo(inputX:Float, inputY:Float):BtVector3Pointer {
|
||||
var camera = lue.node.Node.cameras[0];
|
||||
var camera = lue.node.RootNode.cameras[0];
|
||||
var start = new Vec4();
|
||||
var end = new Vec4();
|
||||
RayCaster.getDirection(start, end, inputX, inputY, camera);
|
||||
|
|
|
@ -2,7 +2,7 @@ package cycles.trait;
|
|||
|
||||
import lue.Eg;
|
||||
import lue.trait.Trait;
|
||||
import lue.node.Node;
|
||||
import lue.node.RootNode;
|
||||
import lue.node.CameraNode;
|
||||
import lue.node.Transform;
|
||||
#if WITH_PHYSICS
|
||||
|
@ -66,7 +66,7 @@ class VehicleBody extends Trait {
|
|||
function init() {
|
||||
physics = Root.physics;
|
||||
transform = node.transform;
|
||||
camera = Node.cameras[0];
|
||||
camera = RootNode.cameras[0];
|
||||
|
||||
for (n in wheelNames) {
|
||||
wheels.push(Eg.root.getChild(n).getTrait(VehicleWheel));
|
||||
|
|
|
@ -1549,7 +1549,7 @@ class ArmoryExporter(bpy.types.Operator, ExportHelper):
|
|||
triangle_count = int(len(ia) / 3)
|
||||
vertex_count = int(len(posa) / 3)
|
||||
tangents = [0] * vertex_count * 3
|
||||
bitangents = [0] * vertex_count * 3
|
||||
# bitangents = [0] * vertex_count * 3
|
||||
for i in range(0, triangle_count):
|
||||
i0 = ia[i * 3 + 0]
|
||||
i1 = ia[i * 3 + 1]
|
||||
|
|
Loading…
Reference in a new issue