/** * Constructor instantiates a new <code>Pyramid</code> object. The base width and the height are provided. * * @param name * the name of the scene element. This is required for identification and comparison purposes. * @param width * the base width of the pyramid. * @param height * the height of the pyramid from the base to the peak. */ public Pyramid(final String name, final double width, final double height) { super(name); _width = width; _height = height; setVertexData(); setNormalData(); setTextureData(); setIndexData(); }
/** * Set the color of the bone object used in skeleton drawing. * * @param color * the new color to use for skeleton bones. */ public static void setBoneColor(final ReadOnlyColorRGBA color) { SkeletalDebugger.bone.setSolidColor(color); }
size = SkeletalDebugger.BONE_RATIO * SkeletalDebugger.measureSphere.getRadius(); SkeletalDebugger.bone.setWorldTransform(Transform.IDENTITY); SkeletalDebugger.bone.setWorldScale(size, size, scale); SkeletalDebugger.bone.setWorldTranslation(stPnt.add(endPnt, store).divideLocal(2.0)); Vector3.releaseTempInstance(store); final Quaternion q = new Quaternion().fromRotationMatrix(orient); q.normalizeLocal(); SkeletalDebugger.bone.setWorldRotation(q); SkeletalDebugger.bone.setWorldTransform(scene.getWorldTransform().multiply( SkeletalDebugger.bone.getWorldTransform(), null)); SkeletalDebugger.bone.draw(renderer);
@Override public void buildArrow() { detachAllChildren(); // Start with cylinder base: final Cylinder base = new Cylinder("base", 4, 16, _width * 0.75, _length - _lengthGap); base.getMeshData().translatePoints(0, 0, (_lengthGap + _length) * 0.5); attachChild(base); base.updateModelBound(); // Add the pyramid tip. final double tipLength = _length / 2.0; final Pyramid tip = new Pyramid("tip", 2 * _width, tipLength); tip.getMeshData().translatePoints(0, _tipGap + _length + 0.5 * tipLength, 0); tip.getMeshData().rotatePoints(InteractArrow.rotator); tip.getMeshData().rotateNormals(InteractArrow.rotator); attachChild(tip); tip.updateModelBound(); }
size = SkeletalDebugger.BONE_RATIO * SkeletalDebugger.measureSphere.getRadius(); SkeletalDebugger.bone.setWorldTransform(Transform.IDENTITY); SkeletalDebugger.bone.setWorldScale(size, size, scale); SkeletalDebugger.bone.setWorldTranslation(stPnt.add(endPnt, store).divideLocal(2.0)); Vector3.releaseTempInstance(store); final Quaternion q = new Quaternion().fromRotationMatrix(orient); q.normalizeLocal(); SkeletalDebugger.bone.setWorldRotation(q); .setWorldTransform(scene.getWorldTransform().multiply(SkeletalDebugger.bone.getWorldTransform(), null)); SkeletalDebugger.bone.draw(renderer);
public void buildArrow() { // Start with cylinders: final Cylinder base = new Cylinder("base", 4, 16, _width * .75, _length); base.getMeshData().rotatePoints(rotator); base.getMeshData().rotateNormals(rotator); attachChild(base); base.updateModelBound(); final Pyramid tip = new Pyramid("tip", 2 * _width, _length / 2f); tip.getMeshData().translatePoints(0, _length * .75, 0); attachChild(tip); tip.updateModelBound(); }
public void buildArrow() { // Start with cylinders: final Cylinder base = new Cylinder("base", 4, 16, _width * .75, _length); base.getMeshData().rotatePoints(rotator); base.getMeshData().rotateNormals(rotator); attachChild(base); base.updateModelBound(); final Pyramid tip = new Pyramid("tip", 2 * _width, _length / 2f); tip.getMeshData().translatePoints(0, _length * .75, 0); attachChild(tip); tip.updateModelBound(); }
/** * Constructor instantiates a new <code>Pyramid</code> object. The base width and the height are provided. * * @param name * the name of the scene element. This is required for identification and comparison purposes. * @param width * the base width of the pyramid. * @param height * the height of the pyramid from the base to the peak. */ public Pyramid(final String name, final double width, final double height) { super(name); _width = width; _height = height; setVertexData(); setNormalData(); setTextureData(); setIndexData(); }
/** * Set the color of the bone object used in skeleton drawing. * * @param color * the new color to use for skeleton bones. */ public static void setBoneColor(final ReadOnlyColorRGBA color) { SkeletalDebugger.bone.setSolidColor(color); }