com.jme3.scene.Geometry.getUserData()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中com.jme3.scene.Geometry.getUserData()方法的一些代码示例,展示了Geometry.getUserData()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.getUserData()方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称:Geometry
方法名:getUserData

Geometry.getUserData介绍

暂无

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void clearMaterials() {
  for(Geometry g : geometries) {
    if(g.getUserData("FBXMaterial") != null)
      g.setUserData("FBXMaterial", null);
  }
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

continue;
Vector3f start = g.getUserData("start");
Vector3f[] ends = g.getUserData("end");
for (int i = 0; i < ends.length; i++) {
  float len = MathUtils.raySegmentShortestDistance((Ray) other, start, ends[i], camera);

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

mat.getAdditionalRenderState().setFaceCullMode(cullMode);
for(Geometry g : mesh.geometries) {
  if(g.getUserData("FBXMaterial") != null) {
    if((Integer) g.getUserData("FBXMaterial") == mesh.lastMaterialId)
      g.setMaterial(mat);
  } else {

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

Geometry bGeom = geoms[1];
if (bGeom != null) {
  Vector3f start = bGeom.getUserData("start");
  Vector3f[] ends = bGeom.getUserData("end");
  start.set(joint.getModelTransform().getTranslation());
  if (ends != null) {

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

Mesh sharedMesh = getUserData(UserData.JME_SHAREDMESH);
if (sharedMesh != null) {
  getMesh().extractVertexData(sharedMesh);

代码示例来源:origin: org.jmonkeyengine/jme3-plugins

public void clearMaterials() {
  for(Geometry g : geometries) {
    if(g.getUserData("FBXMaterial") != null)
      g.setUserData("FBXMaterial", null);
  }
}

代码示例来源:origin: jMonkeyEngine-Contributions/Lemur

public float getLayer(Geometry g) {
  Float d = g.getUserData("effectiveLayer");
  if (d != null)
    return d;
  d = calculateEffectiveLayer(g);
  g.setUserData("effectiveLayer", d);
  return d;
}

代码示例来源:origin: jMonkeyEngine-Contributions/Lemur

protected float calculateEffectiveLayer(Geometry g) {
  Integer childLayer = g.getUserData(LAYER);
  float layer = childLayer != null ? (childLayer + 1) : 1;
  for( Spatial s = g.getParent(); s != null; s = s.getParent() ) {
    Integer i = s.getUserData(LAYER);
    // I'm not sure skipping a null layer is right but it's 
    // been this way for a while without obvious issue.  It
    // seems like skipping it might cause two separate objects
    // with sparse hierarchies to sort incorrectly.  I'm
    // leaving it for now.
    if (i == null)
      continue;
    // Should really base the divisor on the number
    // of children... since right now if we exceed more
    // than 10 layers under a parent then we overflow
    layer = layer * 0.1F;
    layer += i != null ? (i + 1) : 1;
  }
  return layer;
}

代码示例来源:origin: info.projectkyoto/mms-engine

Mesh childSharedMesh = geom.getUserData(UserData.JME_SHAREDMESH);

代码示例来源:origin: org.jmonkeyengine/jme3-plugins

mat.getAdditionalRenderState().setFaceCullMode(cullMode);
for(Geometry g : mesh.geometries) {
  if(g.getUserData("FBXMaterial") != null) {
    if((Integer) g.getUserData("FBXMaterial") == mesh.lastMaterialId)
      g.setMaterial(mat);
  } else {

代码示例来源:origin: info.projectkyoto/mms-engine

Mesh sharedMesh = getUserData(UserData.JME_SHAREDMESH);
if (sharedMesh != null) {
  getMesh().extractVertexData(sharedMesh);

代码示例来源:origin: org.jmonkeyengine/jme3-core

Mesh sharedMesh = getUserData(UserData.JME_SHAREDMESH);
if (sharedMesh != null) {
  getMesh().extractVertexData(sharedMesh);

相关文章