/** * Constructor instantiates a new <code>Vector3f</code> that is a copy * of the provided vector * @param copy The Vector3f to copy */ public Vector4f(Vector4f copy) { this.set(copy); }
/** * <code>multLocal</code> multiplies a provided vector to this vector * internally, and returns a handle to this vector for easy chaining of * calls. If the provided vector is null, null is returned. * * @param vec * the vector to mult to this vector. * @param store result vector (null to create a new vector) * @return this */ public Vector4f mult(Vector4f vec, Vector4f store) { if (null == vec) { logger.warning("Provided vector is null, null returned."); return null; } if (store == null) store = new Vector4f(); return store.set(x * vec.x, y * vec.y, z * vec.z, w * vec.w); }
@Override protected void preFrame(float tpf) { shadowRenderer.preFrame(tpf); if( instanceRendering ) { material.setMatrix4("ViewProjectionMatrixInverseRight", rightCamera.getViewProjectionMatrix().invert()); Matrix4f m = rightCamera.getViewProjectionMatrix(); material.setVector4("ViewProjectionMatrixRow2Right", temp4f2.set(m.m20, m.m21, m.m22, m.m23)); } material.setMatrix4("ViewProjectionMatrixInverse", viewPort.getCamera().getViewProjectionMatrix().invert()); Matrix4f m = viewPort.getCamera().getViewProjectionMatrix(); material.setVector4("ViewProjectionMatrixRow2", temp4f.set(m.m20, m.m21, m.m22, m.m23)); }
private void init() { Xi.set(0, 0, 0, 0); H.set(0, 0, 0); tmp.set(0, 0, 0); c.set(1, 1, 1, 1); tmp1.set(0, 0, 0); tmp2.set(0, 0, 0); tmp3.set(0, 0, 0); reset(); }
@Override protected void preFrame(float tpf) { pssmRenderer.preFrame(tpf); material.setMatrix4("ViewProjectionMatrixInverse", viewPort.getCamera().getViewProjectionMatrix().invert()); Matrix4f m = viewPort.getCamera().getViewProjectionMatrix(); material.setVector4("ViewProjectionMatrixRow2", tmpv.set(m.m20, m.m21, m.m22, m.m23)); }
@Override protected void preFrame(float tpf) { shadowRenderer.preFrame(tpf); material.setMatrix4("ViewProjectionMatrixInverse", viewPort.getCamera().getViewProjectionMatrix().invert()); Matrix4f m = viewPort.getCamera().getViewProjectionMatrix(); material.setVector4("ViewProjectionMatrixRow2", tmpv.set(m.m20, m.m21, m.m22, m.m23)); }
@Override protected void preFrame(float tpf) { shadowRenderer.preFrame(tpf); material.setMatrix4("ViewProjectionMatrixInverse", viewPort.getCamera().getViewProjectionMatrix().invert()); Matrix4f m = viewPort.getCamera().getViewProjectionMatrix(); material.setVector4("ViewProjectionMatrixRow2", tmpv.set(m.m20, m.m21, m.m22, m.m23)); }
((ColorRGBA) this.value).set(ColorRGBA.BlackNoAlpha); } else if (this.value instanceof Vector4f) { ((Vector4f) this.value).set(Vector4f.ZERO); } else { ((Quaternion) this.value).set(Quaternion.ZERO);
vec4.set(c.r, c.g, c.b, c.a); } else if (value instanceof Vector4f) { vec4.set((Vector4f) value); } else { Quaternion q = (Quaternion) value; vec4.set(q.getX(), q.getY(), q.getZ(), q.getW()); ((ColorRGBA) this.value).set(vec4.x, vec4.y, vec4.z, vec4.w); } else if (value instanceof Vector4f) { ((Vector4f) this.value).set(vec4); } else { ((Quaternion) this.value).set(vec4.x, vec4.y, vec4.z, vec4.w);
Vector3f dir = dl.getDirection(); tmpVec.set(dir.getX(), dir.getY(), dir.getZ(), 0.0f); lightData.setVector4InArray(tmpVec.getX(), tmpVec.getY(), tmpVec.getZ(), -1, lightDataIndex); lightDataIndex++; Vector3f pos = pl.getPosition(); float invRadius = pl.getInvRadius(); tmpVec.set(pos.getX(), pos.getY(), pos.getZ(), 1.0f); float invRange = sl.getInvSpotRange(); float spotAngleCos = sl.getPackedAngleCos(); tmpVec.set(pos2.getX(), pos2.getY(), pos2.getZ(), 1.0f); tmpVec.set(dir2.getX(), dir2.getY(), dir2.getZ(), 0.0f); lightData.setVector4InArray(tmpVec.getX(), tmpVec.getY(), tmpVec.getZ(), spotAngleCos, lightDataIndex); lightDataIndex++;
Vector3f dir = dl.getDirection(); tmpVec.set(dir.getX(), dir.getY(), dir.getZ(), 0.0f); rm.getCurrentCamera().getViewMatrix().mult(tmpVec, tmpVec); Vector3f pos = pl.getPosition(); float invRadius = pl.getInvRadius(); tmpVec.set(pos.getX(), pos.getY(), pos.getZ(), 1.0f); rm.getCurrentCamera().getViewMatrix().mult(tmpVec, tmpVec); float invRange = sl.getInvSpotRange(); float spotAngleCos = sl.getPackedAngleCos(); tmpVec.set(pos2.getX(), pos2.getY(), pos2.getZ(), 1.0f); rm.getCurrentCamera().getViewMatrix().mult(tmpVec, tmpVec); tmpVec.set(dir2.getX(), dir2.getY(), dir2.getZ(), 0.0f); rm.getCurrentCamera().getViewMatrix().mult(tmpVec, tmpVec); tmpVec.normalizeLocal();
break; case ViewPort: viewPort.set(viewX, viewY, viewWidth, viewHeight); u.setValue(VarType.Vector4, viewPort); break;
tmpVec.set(dir2.getX(), dir2.getY(), dir2.getZ(), 0); renderManager.getCurrentCamera().getViewMatrix().mult(tmpVec, tmpVec); tmpLightDirection.set(tmpVec.getX(), tmpVec.getY(), tmpVec.getZ(), spotAngleCos);
/** * Constructor instantiates a new <code>Vector3f</code> that is a copy * of the provided vector * @param copy The Vector3f to copy */ public Vector4f(Vector4f copy) { this.set(copy); }
/** * Constructor instantiates a new <code>Vector3f</code> that is a copy * of the provided vector * @param copy The Vector3f to copy */ public Vector4f(Vector4f copy) { this.set(copy); }
/** * <code>multLocal</code> multiplies a provided vector to this vector * internally, and returns a handle to this vector for easy chaining of * calls. If the provided vector is null, null is returned. * * @param vec * the vector to mult to this vector. * @param store result vector (null to create a new vector) * @return this */ public Vector4f mult(Vector4f vec, Vector4f store) { if (null == vec) { logger.warning("Provided vector is null, null returned."); return null; } if (store == null) store = new Vector4f(); return store.set(x * vec.x, y * vec.y, z * vec.z, w * vec.w); }
private void init() { Xi.set(0, 0, 0, 0); H.set(0, 0, 0); tmp.set(0, 0, 0); c.set(1, 1, 1, 1); tmp1.set(0, 0, 0); tmp2.set(0, 0, 0); tmp3.set(0, 0, 0); reset(); }
@Override protected void preFrame(float tpf) { shadowRenderer.preFrame(tpf); material.setMatrix4("ViewProjectionMatrixInverse", viewPort.getCamera().getViewProjectionMatrix().invert()); Matrix4f m = viewPort.getCamera().getViewProjectionMatrix(); material.setVector4("ViewProjectionMatrixRow2", tmpv.set(m.m20, m.m21, m.m22, m.m23)); }
@Override protected void preFrame(float tpf) { pssmRenderer.preFrame(tpf); material.setMatrix4("ViewProjectionMatrixInverse", viewPort.getCamera().getViewProjectionMatrix().invert()); Matrix4f m = viewPort.getCamera().getViewProjectionMatrix(); material.setVector4("ViewProjectionMatrixRow2", tmpv.set(m.m20, m.m21, m.m22, m.m23)); }