/external/jmonkeyengine/engine/src/bullet-common/com/jme3/bullet/control/ragdoll/ |
D | HumanoidRagdollPreset.java | 7 import com.jme3.math.FastMath; 17 …, new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTE… in initBoneMap() 19 …boneMap.put("torso", new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, 0, 0, FastMath.QUA… in initBoneMap() 21 …g", new JointPreset(FastMath.PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI/2, -FastMath.QUARTER_PI… in initBoneMap() 23 boneMap.put("lowerleg", new JointPreset(0, -FastMath.PI, 0, 0, 0, 0)); in initBoneMap() 25 …("foot", new JointPreset(0, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastM… in initBoneMap() 27 …boneMap.put("upperarm", new JointPreset(FastMath.HALF_PI, -FastMath.QUARTER_PI, 0, 0, FastMath.HAL… in initBoneMap() 29 boneMap.put("lowerarm", new JointPreset(FastMath.HALF_PI, 0, 0, 0, 0, 0)); in initBoneMap() 31 …, new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTE… in initBoneMap()
|
/external/jmonkeyengine/engine/src/terrain/com/jme3/terrain/heightmap/ |
D | FaultHeightMap.java | 34 import com.jme3.math.FastMath; 180 / (FastMath.sqrt(FastMath.sqr(x2 - x1) + FastMath.sqr(y2 - y1))); in addLineFault() 188 int intRadius = (int) FastMath.floor(radius); in addCircleFault() 201 float dmag = FastMath.sqrt(FastMath.sqr(dx) + FastMath.sqr(dy)); in addCircleFault() 204 dist = FastMath.sign(dmag - radius) in addCircleFault() 205 * FastMath.sqrt(FastMath.sqr(i - rx) + FastMath.sqr(j - ry)); in addCircleFault() 217 return FastMath.sign(dist) * faultHeight; in calcHeight() 220 if (FastMath.abs(dist) > range) { in calcHeight() 221 return FastMath.sign(dist) * faultHeight; in calcHeight() 223 float f = FastMath.abs(dist) / range; in calcHeight() [all …]
|
/external/jmonkeyengine/engine/src/core/com/jme3/scene/shape/ |
D | Sphere.java | 39 import com.jme3.math.FastMath; 171 float fAngle = FastMath.TWO_PI * fInvRS * iR; in setGeometryData() 172 afCos[iR] = FastMath.cos(fAngle); in setGeometryData() 173 afSin[iR] = FastMath.sin(fAngle); in setGeometryData() 186 float fAFraction = FastMath.HALF_PI * (-1.0f + fZFactor * iZ); // in (-pi/2, pi/2) in setGeometryData() 191 fZFraction = FastMath.sin(fAFraction); // in (-1,1) in setGeometryData() 200 float fSliceRadius = FastMath.sqrt(FastMath.abs(radius * radius in setGeometryData() 231 FastMath.INV_PI in setGeometryData() 232 * (FastMath.HALF_PI + FastMath.asin(fZFraction))); in setGeometryData() 234 float r = (FastMath.HALF_PI - FastMath.abs(fAFraction)) / FastMath.PI; in setGeometryData() [all …]
|
D | PQTorus.java | 40 import com.jme3.math.FastMath; 137 final float thetaStep = (FastMath.TWO_PI / steps); in updateGeometry() 138 final float betaStep = (FastMath.TWO_PI / radialSamples); in updateGeometry() 159 r = (0.5f * (2.0f + FastMath.sin(q * theta)) * radius); in updateGeometry() 160 x = (r * FastMath.cos(p * theta) * radius); in updateGeometry() 161 y = (r * FastMath.sin(p * theta) * radius); in updateGeometry() 162 z = (r * FastMath.cos(q * theta) * radius); in updateGeometry() 166 r = (0.5f * (2.0f + FastMath.sin(q * (theta + 0.01f))) * radius); in updateGeometry() 167 x = (r * FastMath.cos(p * (theta + 0.01f)) * radius); in updateGeometry() 168 y = (r * FastMath.sin(p * (theta + 0.01f)) * radius); in updateGeometry() [all …]
|
D | Torus.java | 40 import com.jme3.math.FastMath; 138 float theta = FastMath.TWO_PI * circleFraction; in setGeometryData() 139 float cosTheta = FastMath.cos(theta); in setGeometryData() 140 float sinTheta = FastMath.sin(theta); in setGeometryData() 149 float phi = FastMath.TWO_PI * radialFraction; in setGeometryData() 150 float cosPhi = FastMath.cos(phi); in setGeometryData() 151 float sinPhi = FastMath.sin(phi); in setGeometryData()
|
/external/jmonkeyengine/engine/src/core/com/jme3/math/ |
D | Eigen3f.java | 148 float max = FastMath.abs(mat.m00); in scaleMatrix() 149 float abs = FastMath.abs(mat.m01); in scaleMatrix() 154 abs = FastMath.abs(mat.m02); in scaleMatrix() 158 abs = FastMath.abs(mat.m11); in scaleMatrix() 162 abs = FastMath.abs(mat.m12); in scaleMatrix() 166 abs = FastMath.abs(mat.m22); in scaleMatrix() 197 float max = FastMath.abs(p00); in computeVectors() 199 float fAbs = FastMath.abs(p01); in computeVectors() 203 fAbs = FastMath.abs(p11); in computeVectors() 209 if (max >= FastMath.ZERO_TOLERANCE) { in computeVectors() [all …]
|
D | FastMath.java | 43 final public class FastMath { class 45 private FastMath() { in FastMath() method in FastMath 373 FastMath.interpolateCatmullRom(startRange, curveTension, p0, p1, p2, p3, start); in getCatmullRomP1toP2Length() 377 FastMath.interpolateCatmullRom(endRange, curveTension, p0, p1, p2, p3, end); in getCatmullRomP1toP2Length() 379 Vector3f middle = FastMath.interpolateCatmullRom(middleValue, curveTension, p0, p1, p2, p3); in getCatmullRomP1toP2Length() 404 FastMath.interpolateBezier(t, p0, p1, p2, p3, v2); in getBezierP1toP2Length() 806 store.y = sphereCoords.x * FastMath.sin(sphereCoords.z); in sphericalToCartesian() 807 float a = sphereCoords.x * FastMath.cos(sphereCoords.z); in sphericalToCartesian() 808 store.x = a * FastMath.cos(sphereCoords.y); in sphericalToCartesian() 809 store.z = a * FastMath.sin(sphereCoords.y); in sphericalToCartesian() [all …]
|
D | Ring.java | 189 * outerRadius, r = FastMath.sqrt(inner2 in random() 190 + FastMath.nextRandomFloat() * (outer2 - inner2)), theta = FastMath in random() 192 * FastMath.TWO_PI; in random() 194 if (b1.lengthSquared() < FastMath.FLT_EPSILON) { in random() 199 result.set(b1).multLocal(r * FastMath.cos(theta)).addLocal(center); in random() 200 result.scaleAdd(r * FastMath.sin(theta), b2, result); in random()
|
D | Quaternion.java | 254 sinPitch = FastMath.sin(angle); in fromAngles() 255 cosPitch = FastMath.cos(angle); in fromAngles() 257 sinRoll = FastMath.sin(angle); in fromAngles() 258 cosRoll = FastMath.cos(angle); in fromAngles() 260 sinYaw = FastMath.sin(angle); in fromAngles() 261 cosYaw = FastMath.cos(angle); in fromAngles() 303 angles[1] = 2 * FastMath.atan2(x, w); in toAngles() 304 angles[2] = FastMath.HALF_PI; in toAngles() 307 angles[1] = -2 * FastMath.atan2(x, w); in toAngles() 308 angles[2] = -FastMath.HALF_PI; in toAngles() [all …]
|
D | Vector2f.java | 289 return FastMath.sqrt(lengthSquared()); in length() 337 return FastMath.sqrt(distanceSquared(v)); in distance() 577 float angle = FastMath.acos(dotProduct); in smallestAngleBetween() 592 float angle = FastMath.atan2(otherVector.y, otherVector.x) in angleBetween() 593 - FastMath.atan2(y, x); in angleBetween() 622 return FastMath.atan2(y, x); in getAngle() 752 float newX = FastMath.cos(angle) * x - FastMath.sin(angle) * y; in rotateAroundOrigin() 753 float newY = FastMath.sin(angle) * x + FastMath.cos(angle) * y; in rotateAroundOrigin()
|
D | LineSegment.java | 99 return FastMath.sqrt(distanceSquared(point)); in distance() 103 return FastMath.sqrt(distanceSquared(ls)); in distance() 107 return FastMath.sqrt(distanceSquared(r)); in distance() 144 float determinant = FastMath.abs(1.0f - negativeDirectionDot in distanceSquared() 148 if (determinant >= FastMath.FLT_EPSILON) { in distanceSquared() 416 return FastMath.abs(squareDistance); in distanceSquared() 425 float fDet = FastMath.abs(1.0f - fA01 * fA01); in distanceSquared() 428 if (fDet >= FastMath.FLT_EPSILON) { in distanceSquared() 535 return FastMath.abs(fSqrDist); in distanceSquared() 619 if (FastMath.abs(point.x - origin.x) > FastMath.abs(direction.x * extent) + error) { in isPointInsideBounds() [all …]
|
/external/jmonkeyengine/engine/src/core/com/jme3/scene/debug/ |
D | WireSphere.java | 35 import com.jme3.math.FastMath; 109 float rate = FastMath.TWO_PI / (float) samples; in updatePositions() 112 float x = radius * FastMath.cos(angle); in updatePositions() 113 float y = radius * FastMath.sin(angle); in updatePositions() 120 float x = radius * FastMath.cos(angle); in updatePositions() 121 float y = radius * FastMath.sin(angle); in updatePositions() 135 float scale = FastMath.sin(b * FastMath.PI); in updatePositions() 137 float x = radius * FastMath.cos(angle); in updatePositions() 138 float y = radius * FastMath.sin(angle); in updatePositions()
|
/external/jmonkeyengine/engine/src/core/com/jme3/light/ |
D | SpotLight.java | 36 import com.jme3.math.FastMath; 59 protected float spotInnerAngle = FastMath.QUARTER_PI / 8; 60 protected float spotOuterAngle = FastMath.QUARTER_PI / 6; 71 float innerCos=FastMath.cos(spotInnerAngle); in computePackedCos() 72 float outerCos=FastMath.cos(spotOuterAngle); in computePackedCos() 198 oc.write(spotInnerAngle, "spotInnerAngle", FastMath.QUARTER_PI / 8); in write() 199 oc.write(spotOuterAngle, "spotOuterAngle", FastMath.QUARTER_PI / 6); in write() 207 spotInnerAngle = ic.readFloat("spotInnerAngle", FastMath.QUARTER_PI / 8); in read() 208 spotOuterAngle = ic.readFloat("spotOuterAngle", FastMath.QUARTER_PI / 6); in read()
|
/external/jmonkeyengine/engine/src/core/com/jme3/effect/shapes/ |
D | EmitterMeshFaceShape.java | 3 import com.jme3.math.FastMath; 46 …normals.add(FastMath.computeNormal(vertexTable[indices[0]], vertexTable[indices[1]], vertexTable[i… in setMeshes() 60 int meshIndex = FastMath.nextRandomInt(0, vertices.size() - 1); in getRandomPoint() 62 int vertIndex = FastMath.nextRandomInt(0, vertices.get(meshIndex).size() / 3 - 1) * 3; in getRandomPoint() 64 float moveFactor = FastMath.nextRandomFloat(); in getRandomPoint() 69 moveFactor = FastMath.nextRandomFloat(); in getRandomPoint() 83 int meshIndex = FastMath.nextRandomInt(0, vertices.size() - 1); in getRandomPointAndNormal() 85 int faceIndex = FastMath.nextRandomInt(0, vertices.get(meshIndex).size() / 3 - 1); in getRandomPointAndNormal() 88 float moveFactor = FastMath.nextRandomFloat(); in getRandomPointAndNormal() 93 moveFactor = FastMath.nextRandomFloat(); in getRandomPointAndNormal()
|
/external/jmonkeyengine/engine/src/core/com/jme3/input/ |
D | ChaseCamera.java | 39 import com.jme3.math.FastMath; 56 protected float maxVerticalRotation = FastMath.PI / 2; 68 protected float vRotation = FastMath.PI / 6; 270 float hDistance = (distance) * FastMath.sin((FastMath.PI / 2) - vRotation); in computePosition() 271 …pos.set(hDistance * FastMath.cos(rotation), (distance) * FastMath.sin(vRotation), hDistance * Fast… in computePosition() 375 targetRotation = FastMath.TWO_PI - FastMath.acos(a.dot(b)); in updateCamera() 377 targetRotation = FastMath.acos(a.dot(b)); in updateCamera() 379 … if (targetRotation - rotation > FastMath.PI || targetRotation - rotation < -FastMath.PI) { in updateCamera() 380 targetRotation -= FastMath.TWO_PI; in updateCamera() 384 …targetRotation != previousTargetRotation && FastMath.abs(targetRotation - previousTargetRotation) … in updateCamera() [all …]
|
/external/jmonkeyengine/engine/src/test/jme3test/model/ |
D | TestOgreLoading.java | 38 import com.jme3.math.FastMath; 101 angle1 %= FastMath.TWO_PI; in simpleUpdate() 104 angle2 %= FastMath.TWO_PI; in simpleUpdate() 106 pl.setPosition(new Vector3f(FastMath.cos(angle1) * 4f, 0.5f, FastMath.sin(angle1) * 4f)); in simpleUpdate() 107 p2.setPosition(new Vector3f(FastMath.cos(angle2) * 4f, 0.5f, FastMath.sin(angle2) * 4f)); in simpleUpdate()
|
/external/jmonkeyengine/engine/src/test/jme3test/audio/ |
D | TestReverb.java | 34 import com.jme3.math.FastMath; 67 v.setX(FastMath.nextRandomFloat()); in simpleUpdate() 68 v.setY(FastMath.nextRandomFloat()); in simpleUpdate() 69 v.setZ(FastMath.nextRandomFloat()); in simpleUpdate() 76 nextTime = FastMath.nextRandomFloat() * 2 + 0.5f; in simpleUpdate()
|
D | TestDoppler.java | 38 import com.jme3.math.FastMath; 54 private float angle = FastMath.TWO_PI; 88 if (angle > FastMath.TWO_PI){ in simpleUpdate() 89 angle = FastMath.TWO_PI; in simpleUpdate()
|
/external/jmonkeyengine/engine/src/core/com/jme3/bounding/ |
D | BoundingBox.java | 294 box.xExtent = FastMath.abs(vars.vect2.getX()); in transform() 295 box.yExtent = FastMath.abs(vars.vect2.getY()); in transform() 296 box.zExtent = FastMath.abs(vars.vect2.getZ()); in transform() 326 box.xExtent = FastMath.abs(vars.vect1.getX()); in transform() 327 box.yExtent = FastMath.abs(vars.vect1.getY()); in transform() 328 box.zExtent = FastMath.abs(vars.vect1.getZ()); in transform() 343 float radius = FastMath.abs(xExtent * plane.getNormal().getX()) in whichSide() 344 + FastMath.abs(yExtent * plane.getNormal().getY()) in whichSide() 345 + FastMath.abs(zExtent * plane.getNormal().getZ()); in whichSide() 591 if (FastMath.abs(center.x - bs.center.x) < bs.getRadius() in intersectsSphere() [all …]
|
D | Intersection.java | 34 import com.jme3.math.FastMath; 122 float fex = FastMath.abs(e0.x); in intersect() 123 float fey = FastMath.abs(e0.y); in intersect() 124 float fez = FastMath.abs(e0.z); in intersect() 161 fex = FastMath.abs(e1.x); in intersect() 162 fey = FastMath.abs(e1.y); in intersect() 163 fez = FastMath.abs(e1.z); in intersect() 198 fex = FastMath.abs(e2.x); in intersect() 199 fey = FastMath.abs(e2.y); in intersect() 200 fez = FastMath.abs(e2.z); in intersect()
|
/external/jmonkeyengine/engine/src/blender/com/jme3/scene/plugins/blender/textures/ |
D | TextureGeneratorWood.java | 33 import com.jme3.math.FastMath; 135 int n = (int) (x * FastMath.INV_TWO_PI); 136 x -= n * FastMath.TWO_PI; 138 x += FastMath.TWO_PI; 140 return x * FastMath.INV_TWO_PI; 147 …return 1.0f - 2.0f * FastMath.abs((float) Math.floor(x * FastMath.INV_TWO_PI + 0.5f) - x * FastMat…
|
/external/jmonkeyengine/engine/src/test/jme3test/light/ |
D | TestSpotLight.java | 67 spot.setSpotInnerAngle(5*FastMath.DEG_TO_RAD); in setupLighting() 68 spot.setSpotOuterAngle(10*FastMath.DEG_TO_RAD); in setupLighting() 119 signpost.rotate(0, FastMath.HALF_PI, 0); in setupSignpost() 146 angle %= FastMath.TWO_PI; in simpleUpdate() 148 … spot.setPosition(new Vector3f(FastMath.cos(angle) * 30f, 34.013165f, FastMath.sin(angle) * 30f)); in simpleUpdate()
|
D | TestLightNode.java | 40 import com.jme3.math.FastMath; 63 g.rotate(-FastMath.HALF_PI, 0, 0); in simpleInitApp() 106 angle %= FastMath.TWO_PI; in simpleUpdate() 108 …movingNode.setLocalTranslation(new Vector3f(FastMath.cos(angle) * 3f, 2, FastMath.sin(angle) * 3f)… in simpleUpdate()
|
/external/jmonkeyengine/engine/src/test/jme3test/collision/ |
D | TestRayCasting.java | 38 import com.jme3.math.FastMath; 77 teapot.rotate(FastMath.HALF_PI, FastMath.HALF_PI, FastMath.HALF_PI); in simpleInitApp()
|
/external/jmonkeyengine/engine/src/core/com/jme3/effect/influencers/ |
D | NewtonianParticleInfluencer.java | 9 import com.jme3.math.FastMath; 44 m.fromAngleNormalAxis(FastMath.PI * surfaceTangentRotation, particle.velocity); in influenceParticle() 110 …temp.set(FastMath.nextRandomFloat() * velocityVariation, FastMath.nextRandomFloat() * velocityVari… in applyVelocityVariation()
|