本文整理汇总了Java中com.jme3.scene.Spatial.removeFromParent方法的典型用法代码示例。如果您正苦于以下问题:Java Spatial.removeFromParent方法的具体用法?Java Spatial.removeFromParent怎么用?Java Spatial.removeFromParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.scene.Spatial
的用法示例。
在下文中一共展示了Spatial.removeFromParent方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clear
import com.jme3.scene.Spatial; //导入方法依赖的package包/类
private void clear() {
toAdd.clear();
rendered.clear();
for (Spatial s : gNode.getChildren())
s.removeFromParent();
calculateOnJmeThread();
tweed.enqueue( new Runnable() {
@Override
public void run() {
Jme3z.removeAllChildren( gNode );
}
} );
}
示例2: calculate
import com.jme3.scene.Spatial; //导入方法依赖的package包/类
@Override
public void calculate() {
for (Spatial s : gNode.getChildren())
s.removeFromParent();
Mesh mesh = new Mesh();
mesh.setMode( Mode.Points );
Vector3f[] verts = new Vector3f[cubes.size()];
for (int i = 0; i < cubes.size(); i++) {
verts[ i ] = new com.jme3.math.Vector3f( (float)cubes.get( i ).x, (float)cubes.get( i ).y, (float)cubes.get( i ).z );
}
mesh.setBuffer( VertexBuffer.Type.Position, 3, BufferUtils.createFloatBuffer( verts ) );
Material mat1 = new Material( tweed.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md" );
mat1.setBoolean( "VertexColor", true );
Geometry depth = new Geometry( "depth", mesh );
depth.setMaterial( mat1 );
depth.updateModelBound();
depth.updateGeometricState();
gNode.attachChild(depth);
super.calculate();
}
示例3: calculate
import com.jme3.scene.Spatial; //导入方法依赖的package包/类
@Override
public void calculate() {
for ( Spatial s : gNode.getChildren() )
s.removeFromParent();
Node pNode = new Node();
if ( toRender != null )
for (int i = 0; i < toRender.faces.size(); i++)
try {
HalfFace f = toRender.faces.get( i );
SuperFace sf = (SuperFace)f;
PlanSkeleton skel = calc (sf);
if (skel != null)
setSkel( skel, skel.output , sf);
}
catch (Throwable th) {
th.printStackTrace();
}
if (!pNode.getChildren().isEmpty())
tweed.frame.addGen( new JmeGen( "sProfs", tweed, pNode ), false );
gNode.updateModelBound();
gNode.updateGeometricState();
super.calculate();
}
示例4: removeObject
import com.jme3.scene.Spatial; //导入方法依赖的package包/类
@Override
protected void removeObject(Spatial object, Entity e) {
object.removeFromParent();
}
示例5: clear
import com.jme3.scene.Spatial; //导入方法依赖的package包/类
@Override
public void clear() {
for (Spatial currentHandle : currentHandles.getChildren())
currentHandle.removeFromParent();
}
示例6: calculate
import com.jme3.scene.Spatial; //导入方法依赖的package包/类
@Override
public void calculate( ) {
gNode.removeFromParent();
for ( Spatial s : gNode.getChildren() )
s.removeFromParent();
gNode.attachChild( spatial );
gNode.updateModelBound();
gNode.updateGeometricState();
}
示例7: calculate
import com.jme3.scene.Spatial; //导入方法依赖的package包/类
@Override
public void calculate( ) {
for (Spatial s : gNode.getChildren())
s.removeFromParent();
for (Node n : addOnJmeThread)
gNode.attachChild( n );
gNode.updateGeometricState();
gNode.updateModelBound();
super.calculate( );
}