@Override protected void updateWorldTransforms() { super.updateWorldTransforms(); computeWorldMatrix(); if (isGrouped()) { groupNode.onTransformChange(this); } // geometry requires lights to be sorted worldLights.sort(true); }
private static void applyAtlasCoords(List<Geometry> geometries, Mesh outMesh, TextureAtlas atlas) { int globalVertIndex = 0; for (Geometry geom : geometries) { Mesh inMesh = geom.getMesh(); geom.computeWorldMatrix(); int geomVertCount = inMesh.getVertexCount(); VertexBuffer inBuf = inMesh.getBuffer(Type.TexCoord); VertexBuffer outBuf = outMesh.getBuffer(Type.TexCoord); if (inBuf == null || outBuf == null) { continue; } atlas.applyCoords(geom, globalVertIndex, outMesh); globalVertIndex += geomVertCount; } }
public int collideWith(Collidable other, CollisionResults results) { // Force bound to update checkDoBoundUpdate(); // Update transform, and compute cached world matrix computeWorldMatrix(); assert (refreshFlags & (RF_BOUND | RF_TRANSFORM)) == 0; if (mesh != null) { // NOTE: BIHTree in mesh already checks collision with the // mesh's bound int prevSize = results.size(); int added = mesh.collideWith(other, cachedWorldMat, worldBound, results); int newSize = results.size(); for (int i = prevSize; i < newSize; i++) { results.getCollisionDirect(i).setGeometry(this); } return added; } return 0; }
geom.computeWorldMatrix(); Matrix4f worldMatrix = geom.getWorldMatrix();
@Override protected void updateWorldTransforms() { super.updateWorldTransforms(); computeWorldMatrix(); if (isGrouped()) { groupNode.onTransformChange(this); } // geometry requires lights to be sorted worldLights.sort(true); }
@Override protected void updateWorldTransforms() { super.updateWorldTransforms(); computeWorldMatrix(); if (isBatched()) { batchNode.updateSubBatch(this); } // geometry requires lights to be sorted worldLights.sort(true); }
private static void applyAtlasCoords(List<Geometry> geometries, Mesh outMesh, TextureAtlas atlas) { int globalVertIndex = 0; for (Geometry geom : geometries) { Mesh inMesh = geom.getMesh(); geom.computeWorldMatrix(); int geomVertCount = inMesh.getVertexCount(); VertexBuffer inBuf = inMesh.getBuffer(Type.TexCoord); VertexBuffer outBuf = outMesh.getBuffer(Type.TexCoord); if (inBuf == null || outBuf == null) { continue; } atlas.applyCoords(geom, globalVertIndex, outMesh); globalVertIndex += geomVertCount; } }
public int collideWith(Collidable other, CollisionResults results) { // Force bound to update checkDoBoundUpdate(); // Update transform, and compute cached world matrix computeWorldMatrix(); assert (refreshFlags & (RF_BOUND | RF_TRANSFORM)) == 0; if (mesh != null) { // NOTE: BIHTree in mesh already checks collision with the // mesh's bound int prevSize = results.size(); int added = mesh.collideWith(other, cachedWorldMat, worldBound, results); int newSize = results.size(); for (int i = prevSize; i < newSize; i++) { results.getCollisionDirect(i).setGeometry(this); } return added; } return 0; }
public int collideWith(Collidable other, CollisionResults results) { // Force bound to update checkDoBoundUpdate(); // Update transform, and compute cached world matrix computeWorldMatrix(); assert (refreshFlags & (RF_BOUND | RF_TRANSFORM)) == 0; if (mesh != null) { // NOTE: BIHTree in mesh already checks collision with the // mesh's bound int prevSize = results.size(); int added = mesh.collideWith(other, cachedWorldMat, worldBound, results); int newSize = results.size(); for (int i = prevSize; i < newSize; i++) { results.getCollisionDirect(i).setGeometry(this); } return added; } return 0; }
geom.computeWorldMatrix(); Matrix4f worldMatrix = geom.getWorldMatrix();
geom.computeWorldMatrix(); Matrix4f worldMatrix = geom.getWorldMatrix();