新接入FaceUnity美颜SDK
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
package com.yunbao.faceunity.infe;
|
||||
|
||||
|
||||
import com.yunbao.faceunity.entity.BodyBeautyBean;
|
||||
import com.yunbao.faceunity.entity.ModelAttributeData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
/**
|
||||
* DESC:数据构造工厂抽象类
|
||||
* Created on 2021/4/26
|
||||
*/
|
||||
public abstract class AbstractBodyBeautyDataFactory {
|
||||
|
||||
|
||||
/**
|
||||
* 获取美体参数集合
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<BodyBeautyBean> getBodyBeautyParam();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取美体项目数据扩展模型
|
||||
* @return
|
||||
*/
|
||||
public abstract HashMap<String, ModelAttributeData> getModelAttributeRange();
|
||||
|
||||
|
||||
/**
|
||||
* 根据名称标识获取对应的值
|
||||
*
|
||||
* @param key String 标识
|
||||
* @return Double 值
|
||||
*/
|
||||
public abstract double getParamIntensity(String key);
|
||||
|
||||
/**
|
||||
* 根据名称标识更新对应的值
|
||||
*
|
||||
* @param key String 标识
|
||||
* @return Double 值
|
||||
*/
|
||||
public abstract void updateParamIntensity(String key, double value);
|
||||
|
||||
/**
|
||||
* 美体开关
|
||||
*
|
||||
* @param enable Boolean
|
||||
*/
|
||||
public abstract void enableBodyBeauty(boolean enable);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.yunbao.faceunity.infe;
|
||||
|
||||
|
||||
import com.yunbao.faceunity.entity.FaceBeautyBean;
|
||||
import com.yunbao.faceunity.entity.FaceBeautyFilterBean;
|
||||
import com.yunbao.faceunity.entity.ModelAttributeData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* DESC:数据构造工厂抽象类
|
||||
* Created on 2021/4/26
|
||||
*/
|
||||
public abstract class AbstractFaceBeautyDataFactory {
|
||||
|
||||
|
||||
/**
|
||||
* 美肤底部菜单数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<FaceBeautyBean> getSkinBeauty();
|
||||
|
||||
|
||||
/**
|
||||
* 美型底部菜单数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<FaceBeautyBean> getShapeBeauty();
|
||||
|
||||
|
||||
/**
|
||||
* 滤镜底部菜单数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<FaceBeautyFilterBean> getBeautyFilters();
|
||||
|
||||
/**
|
||||
* 获取当前滤镜下标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract int getCurrentFilterIndex();
|
||||
|
||||
/**
|
||||
* 设置当前滤镜下标
|
||||
*
|
||||
* @param currentFilterIndex
|
||||
*/
|
||||
public abstract void setCurrentFilterIndex(int currentFilterIndex);
|
||||
|
||||
|
||||
/**
|
||||
* 美颜项目数据扩展模型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract HashMap<String, ModelAttributeData> getModelAttributeRange();
|
||||
|
||||
/**
|
||||
* 切换滤镜
|
||||
*
|
||||
* @param name String
|
||||
* @param intensity Double
|
||||
*/
|
||||
public abstract void onFilterSelected(String name, double intensity, int resDes);
|
||||
|
||||
|
||||
/**
|
||||
* 更改滤镜强度
|
||||
*
|
||||
* @param intensity Double
|
||||
*/
|
||||
public abstract void updateFilterIntensity(double intensity);
|
||||
|
||||
/**
|
||||
* 美颜开关
|
||||
*
|
||||
* @param enable Boolean
|
||||
*/
|
||||
public abstract void enableFaceBeauty(boolean enable);
|
||||
|
||||
/**
|
||||
* 获取单项强度
|
||||
*
|
||||
* @param key String
|
||||
* @return Double
|
||||
*/
|
||||
public abstract double getParamIntensity(String key);
|
||||
|
||||
/**
|
||||
* 设置单项强度
|
||||
*
|
||||
* @param key String
|
||||
* @param value Double
|
||||
*/
|
||||
public abstract void updateParamIntensity(String key, double value);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yunbao.faceunity.infe;
|
||||
|
||||
|
||||
import com.yunbao.faceunity.entity.MakeupCombinationBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* DESC:数据构造工厂抽象类
|
||||
* Created on 2021/4/26
|
||||
*/
|
||||
public abstract class AbstractMakeupDataFactory {
|
||||
|
||||
/**
|
||||
* 获取当前组合妆容列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<MakeupCombinationBean> getMakeupCombinations();
|
||||
|
||||
/**
|
||||
* 获取当前组合妆容下标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract int getCurrentCombinationIndex();
|
||||
|
||||
/**
|
||||
* 设置组合妆容下标
|
||||
*
|
||||
* @param currentCombinationIndex
|
||||
*/
|
||||
public abstract void setCurrentCombinationIndex(int currentCombinationIndex);
|
||||
|
||||
|
||||
/**
|
||||
* 组合妆容选中
|
||||
*
|
||||
* @param bean MakeupCombinationBean
|
||||
*/
|
||||
public abstract void onMakeupCombinationSelected(MakeupCombinationBean bean);
|
||||
|
||||
/**
|
||||
* 设置美妆整体强度
|
||||
*
|
||||
* @param intensity Double
|
||||
*/
|
||||
public abstract void updateCombinationIntensity(double intensity);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yunbao.faceunity.infe;
|
||||
|
||||
import com.yunbao.faceunity.entity.PropBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* DESC:数据构造工厂抽象类
|
||||
* Created on 2021/4/26
|
||||
*/
|
||||
public abstract class AbstractPropDataFactory {
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前选中下标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract int getCurrentPropIndex();
|
||||
|
||||
/**
|
||||
* 设置当前选中下标
|
||||
*
|
||||
* @param currentPropIndex
|
||||
*/
|
||||
public abstract void setCurrentPropIndex(int currentPropIndex);
|
||||
|
||||
/**
|
||||
* 获取道具队列
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<PropBean> getPropBeans();
|
||||
|
||||
/**
|
||||
* 道具选中
|
||||
*
|
||||
* @param bean StickerBean
|
||||
*/
|
||||
public abstract void onItemSelected(PropBean bean);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user