本文整理汇总了Java中br.usp.libras.sign.symbol.HandShape类的典型用法代码示例。如果您正苦于以下问题:Java HandShape类的具体用法?Java HandShape怎么用?Java HandShape使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HandShape类属于br.usp.libras.sign.symbol包,在下文中一共展示了HandShape类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadModels
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
/**
* Loads all models. May take a while.
*/
private void loadModels() {
// carrega objs
ModelsLoader.loadModels(this);
LocationsLoader.loadLocations();
// mão inicial deve ser sempre esta:
Hand leftHand = new Hand();
leftHand.setShape(HandShape.MAO_2);
leftHand.setSide(HandSide.LEFT);
Hand rightHand = new Hand();
rightHand.setShape(HandShape.MAO_2);
rightHand.setSide(HandSide.RIGHT);
Symbol initialSymbol = new Symbol();
initialSymbol.setLeftHand(leftHand);
initialSymbol.setRightHand(rightHand);
this.reset();
this.symbolGraph = new SymbolGraph(this, initialSymbol);
this.initialized = true;
this.initializing = false;
}
示例2: resetHands
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
protected void resetHands() {
// mão inicial deve ser sempre esta:
Symbol symbol = new Symbol();
if (this.signs.size() > 0) {
Sign s = this.signs.get(signIndex);
List<Symbol> symbols = s.getSymbols();
Symbol nextSymbol = symbols.get(symbolIndex);
if (nextSymbol.getLeftHand() != null) {
Hand leftHand = new Hand();
leftHand.setShape(HandShape.MAO_A);
leftHand.setSide(HandSide.LEFT);
leftHand.setRotY((float) -1.570796);
symbol.setLeftHand(leftHand);
}
}
Hand rightHand = new Hand();
rightHand.setShape(HandShape.MAO_A);
rightHand.setSide(HandSide.RIGHT);
rightHand.setRotY((float) 1.570796);
symbol.setRightHand(rightHand);
symbolGraph.nextSymbol(symbol);
}
示例3: getSignsWithListedShapes
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
public List<Sign> getSignsWithListedShapes() {
List<Sign> signs = new ArrayList<Sign>();
List<String> confNames = getConfNames();
for (String confName: confNames) {
Sign sign = new Sign();
sign.setName(confName.toUpperCase());
Symbol symbol = new Symbol();
Hand rightHand = new Hand();
rightHand.setSide(HandSide.RIGHT);
rightHand.setShape(HandShape.valueOf(confName.toUpperCase()));
Hand leftHand = new Hand();
leftHand.setSide(HandSide.LEFT);
leftHand.setShape(HandShape.valueOf(confName.toUpperCase()));
symbol.setRightHand(rightHand);
symbol.setLeftHand(leftHand);
sign.addSymbol(symbol);
signs.add(sign);
}
return signs;
}
示例4: generateOlhar
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
private Sign generateOlhar() {
HandMovement mov = new HandMovement();
mov.addSegment(Direction.PARA_FRENTE);
Hand hand = new Hand();
hand.setShape(HandShape.MAO_2);
hand.setOrientation(HandOrientation.BLACK);
hand.setPlane(HandPlane.VERTICAL);
hand.setMovement(mov);
Symbol symbol = new Symbol();
symbol.setRightHand(hand);
Sign sign = new Sign();
sign.setName("OLHAR");
sign.setVerbType(VerbType.CONCORDA_COM_SUJEITO_E_OBJETO);
sign.addSymbol(symbol);
return sign;
}
示例5: convert
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
public static Hand convert(br.usp.wikilibras.ws.Hand wlhand) {
if (wlhand == null)
return null;
Hand hand = new Hand();
// TODO: if's pra todos os enums
FingersMovement fing = null;
if (wlhand.getFingers() != null)
fing = FingersMovement.valueOf(wlhand.getFingers().toString());
HandOrientation ori = HandOrientation.valueOf(wlhand.getOrientation().toString());
HandRotation rot = HandRotation.valueOf(wlhand.getRotation().toString());
HandPlane plane = HandPlane.valueOf(wlhand.getPlane().toString());
HandShape shape = HandShape.valueOf(wlhand.getShape().toString());
HandSide side = HandSide.valueOf(wlhand.getSide().toString());
hand.setFingers(fing);
hand.setOrientation(ori);
hand.setRotation(rot);
hand.setPlane(plane);
hand.setShape(shape);
hand.setSide(side);
// movimento da mão
HandMovement mov = convert(wlhand.getMovement());
hand.setMovement(mov);
return hand;
}
示例6: loadHandModel
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
private static void loadHandModel(HandShape shape, PApplet processing) {
map.put(new HandModel(shape, HandSide.RIGHT), new AnimObj(processing, MODELS_PATH + "dir/" + shape.name() + ".obj"));
map.put(new HandModel(shape, HandSide.LEFT), new AnimObj(processing, MODELS_PATH + "esq/" + shape.name() + ".obj"));
}
示例7: HandModel
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
public HandModel(HandShape config, HandSide side) {
this.config = config;
this.side = side;
}
示例8: getConfig
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
public HandShape getConfig() {
return config;
}
示例9: setConfig
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
public void setConfig(HandShape config) {
this.config = config;
}
示例10: loadModels
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
/**
* Execute este método antes de acessar os modelos!!!
*
* @param processing
*
*/
public static void loadModels(PApplet processing) {
System.out.println("Loading models");
for (HandShape shape : HAND_MODELS_TO_LOAD)
loadHandModel(shape, processing);
loadFaceModels(processing);
loadFaceTextures(processing);
System.out.println("Models loaded");
}
示例11: getHandModel
import br.usp.libras.sign.symbol.HandShape; //导入依赖的package包/类
/**
* Retorna o modelo de acordo com a configuração e lado especificados Antes de poder usar esta função, loadModels
* deve ser executado uma vez
*
* @param shape configuração de mão
* @param side lado da mão
* @return modelo carregado a partir de arquivo obj
*/
public static AnimObj getHandModel(HandShape shape, HandSide side) {
// TODO: coleção interna de objs não deveria ser modificável por irresponsáveis que usam este método
return map.get(new HandModel(shape, side));
}