Remodel-AR
  • Overview
  • ios guides
    • iOS Quick Start
    • iOS Walkthrough
      • SwiftUI Walkthrough
        • Section 1 - Setting up Remodel-AR in SwiftUI
        • Section 2 - Add a color picker
        • Section 3 - Add Export Features
        • Section 4 - Add Textured Paints
      • UIKit Walkthrough
        • Setting up Remodel-AR in UIKit
        • Adding a Color Picker
        • Getting to know Lidar scanning
        • Getting to know Legacy
        • Getting to know Floorplan
        • Getting to know Shader Paint
        • Section 2 - Add a color picker
        • Section 3 - Add Export Features
        • Section 4 - Add Textured Paints
    • iOS Library Documentation
      • Classes
        • ARController
        • ARStateModel
        • RemodelARLib
        • PassioConfiguration
      • Structures
      • Enumerations
      • Protocols
  • android guides
    • Android Quick Start
    • Android Walkthrough
      • Setting up Remodel-AR in Android
      • Paint Approaches
      • Getting to know Legacy
      • Getting to know Floor Plan
      • Getting to know Shader Approach
    • Android Library Documentation
      • Classes
        • PaintARActivity
        • OnCornerPlaced
        • GetWallPatchInfos
        • GetSavedImage
        • GetRawCameraImage
        • PassioSDKStatus
        • WallPatchInfo
    • ❔FAQs
Powered by GitBook
On this page
  1. android guides
  2. Android Walkthrough

Getting to know Floor Plan

PreviousGetting to know LegacyNextGetting to know Shader Approach

Last updated 1 year ago

In this tutorial, you will learn how to paint walls using the Remodel-AR framework's Floor plan approach.

Before starting this tutorial, make sure you've completed .

Step 1:

You shall wait for callbacks from the configure() method, Once you get callback in onPassioSDKReady()

Step 2:

First let us supply the color and/or texture that we want to paint the wall with, you can pass any color hex in this format #RRGGBB, metadata can also be supplied with it using below code:

var metaData = HashMap<String,String>()
metaData.put("aMetaData", "Testing")
metaData.put("aMetaData2", "Testin2")

var path = externalCacheDir?.absolutePath + "/internal-transfer/texturex.jpg"

changeColor("#ff0000", texturePath, metaData)

It is also possible to set color/texture individually using this methods:

//apply texture
pickTexture(mBitmap)
//apply color
pickColor("#1FCCDE")

with pickTexture() you can directly pass bitmap as texture.

Step 3:

To start Floor plan approach approach, you can simply call startFloorPlanApproach(), it will do necessory initialization for using Floor plan approach

Step 4:

Let us take a button and on click of it call below code

placeGrid(null)

Get callbacks for first and last point selection by user like this


override fun onFirstPointSelected(){
}

override fun onLastPointSelected(){
}

Once the button is clicked, it will start scanning the floor, Once floor is detected, it will put grid on the floor.

you can can now tap anywhere and select points on grid to form the floor shape, For the first point selected onFirstPointSelected() callback is triggered and when last point is selected at that time onLastPointSelected() callback is triggered.

Step 5: To complete the shape one has to put the first and last points together or simply call finishShape().

Step 6:

Once shape is formed It will generate outlines of all the surfaces including floor, ceiling and walls, user can drag on screen to select the height of the shape, Once user is done selecting the height, To move forward call finishSettingHeight()

Step 7:

Once height is set all the wall,ceiling and floor surfaces will get generated, One can tap on any surface to make it active and set color and/or texture using same way as shown in step 2

If at any point you need help from the Passio team, please reach out to us at support@passiolife.com

Setting up Remodel-AR in Android