Android Float4 - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Float4 class.

This code example shows how to use the following methods:
        Float3 bottomLeft = new Float3(-1.0f, -1.0f, 0.0f);
        Float3 topRight = new Float3(1.0f, 1.0f, 0.0f);
        Float3 bottomRight = new Float3(1.0f, -1.0f, 0.0f);
 
        fullQuad.set_position(0, topLeft, false);
        fullQuad.set_color(0, convertColor(BG_COLOR_BLUE), false);
 
        fullQuad.set_position(1, bottomLeft, false);
        fullQuad.set_color(1, convertColor(BG_COLOR_BLACK), false);
 
        fullQuad.set_position(2, topRight, false);
        fullQuad.set_color(2, convertColor(BG_COLOR_BLUE), false);
 
        fullQuad.set_position(3, bottomRight, false);
        fullQuad.set_color(3, convertColor(BG_COLOR_BLACK), false);
 
        fullQuad.copyAll();
 
        Mesh.AllocationBuilder backgroundBuilder = new Mesh.AllocationBuilder(mRS);
        backgroundBuilder.addIndexSetType(Primitive.TRIANGLE_STRIP);

6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    ScriptField_Light_s.Item mFieldData;
    Transform mTransform;
    Float4 mColor;
    float mIntensity;
    public LightBase() { 
        mColor = new Float4(0.0f, 0.0f, 0.0f, 0.0f);
        mIntensity = 1.0f;
    } 
 
    public void setTransform(Transform t) {
        mTransform = t;
        updateRSData(); 
    } 
 
    public void setColor(float r, float g, float b) {
        mColor.x = r;
        mColor.y = g;
        mColor.z = b;
        updateRSData(); 
    } 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
     * @param green the amount of green 
     * @param blue the amount of blue 
     * @param alpha the amount of alpha 
     */ 
    public void setBackgroundColor(float red, float green, float blue, float alpha) {
        mBackgroundColor = new Float4(red, green, blue, alpha);
        if (mRenderScript != null) {
            mRenderScript.setBackgroundColor(mBackgroundColor);
        } 
    } 
 
    /** 
     * Can be used to optionally set the background to a bitmap. When set to something other than 
     * null, this overrides {@link CarouselController#setBackgroundColor(Float4)}. 
     * 
     * @param bitmap 
     */ 
    public void setBackgroundBitmap(Bitmap bitmap) {
        mBackgroundBitmap = bitmap;
        if (mRenderScript != null) {
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
     * @param green the amount of green 
     * @param blue the amount of blue 
     * @param alpha the amount of alpha 
     */ 
    public void setBackgroundColor(float red, float green, float blue, float alpha) {
        mBackgroundColor = new Float4(red, green, blue, alpha);
        if (mRenderScript != null) {
            mRenderScript.setBackgroundColor(mBackgroundColor);
        } 
    } 
 
    /** 
     * Can be used to optionally set the background to a bitmap. When set to something other than 
     * null, this overrides {@link CarouselController#setBackgroundColor(Float4)}. 
     * 
     * @param bitmap 
     */ 
    public void setBackgroundBitmap(Bitmap bitmap) {
        mBackgroundBitmap = bitmap;
        if (mRenderScript != null) {
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    ScriptField_Light_s.Item mFieldData;
    Transform mTransform;
    Float4 mColor;
    float mIntensity;
    public LightBase() { 
        mColor = new Float4(0.0f, 0.0f, 0.0f, 0.0f);
        mIntensity = 1.0f;
    } 
 
    public void setTransform(Transform t) {
        mTransform = t;
        updateRSData(); 
    } 
 
    public void setColor(float r, float g, float b) {
        mColor.x = r;
        mColor.y = g;
        mColor.z = b;
        updateRSData(); 
    } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Android Float4 Methods: