本文整理汇总了Java中javax.media.j3d.TransformGroup.getChild方法的典型用法代码示例。如果您正苦于以下问题:Java TransformGroup.getChild方法的具体用法?Java TransformGroup.getChild怎么用?Java TransformGroup.getChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.media.j3d.TransformGroup
的用法示例。
在下文中一共展示了TransformGroup.getChild方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateViewPlatformTransform
import javax.media.j3d.TransformGroup; //导入方法依赖的package包/类
/**
* Updates <code>viewPlatformTransform</code> transform from <code>camera</code> angles and location.
*/
private void updateViewPlatformTransform(TransformGroup viewPlatformTransform, Camera camera,
boolean updateWithAnimation)
{
if (updateWithAnimation)
{
// Get the camera interpolator
CameraInterpolator cameraInterpolator = (CameraInterpolator) viewPlatformTransform
.getChild(viewPlatformTransform.numChildren() - 1);
cameraInterpolator.moveCamera(camera);
}
else
{
Transform3D transform = new Transform3D();
updateViewPlatformTransform(transform, camera.getX(), camera.getY(), camera.getZ(), camera.getYaw(),
camera.getPitch());
viewPlatformTransform.setTransform(transform);
}
clearPrintedImageCache();
}
示例2: manifestationSwitched
import javax.media.j3d.TransformGroup; //导入方法依赖的package包/类
@Override
public void manifestationSwitched( RenderedManifestation from, RenderedManifestation to )
{
BranchGroup target = (BranchGroup) from .getGraphicsObject();
if ( target == null ) {
return;
}
TransformGroup tg = (TransformGroup) target .getChild( 0 );
Shape3D poly = (Shape3D) tg .getChild( 0 );
poly .setUserData( to );
if ( this .isSticky )
{
to .setGraphicsObject( target );
from .setGraphicsObject( null );
}
}
示例3: refreshPolygonOutlines
import javax.media.j3d.TransformGroup; //导入方法依赖的package包/类
private void refreshPolygonOutlines() {
Collection<BranchGroup> bgs = new ArrayList<>();
for ( int i = 0; i < mScene .numChildren(); i++ ) {
BranchGroup bg = (BranchGroup) mScene .getChild( i );
bgs .add( bg );
}
for (BranchGroup branchGroup : bgs) {
TransformGroup tg = (TransformGroup) branchGroup .getChild( 0 );
Shape3D solidPoly = (Shape3D) tg .getChild( 0 );
RenderedManifestation rm = (RenderedManifestation) solidPoly .getUserData();
if ( rm != null ) {
this .manifestationRemoved( rm );
this .manifestationAdded( rm );
}
}
}
示例4: getFilledModelNode
import javax.media.j3d.TransformGroup; //导入方法依赖的package包/类
/**
* Returns the node of the filled model.
*/
private Node getFilledModelNode()
{
TransformGroup transformGroup = (TransformGroup) getChild(0);
BranchGroup branchGroup = (BranchGroup) transformGroup.getChild(0);
return branchGroup.getChild(0);
}
示例5: getOutlineModelNode
import javax.media.j3d.TransformGroup; //导入方法依赖的package包/类
/**
* Returns the node of the outline model.
*/
private Node getOutlineModelNode()
{
TransformGroup transformGroup = (TransformGroup) getChild(0);
BranchGroup branchGroup = (BranchGroup) transformGroup.getChild(0);
if (branchGroup.numChildren() > 1)
{
return branchGroup.getChild(1);
}
else
{
return null;
}
}
示例6: getModelNode
import javax.media.j3d.TransformGroup; //导入方法依赖的package包/类
/**
* Returns the 3D model node displayed by this component.
*/
private HomePieceOfFurniture3D getModelNode()
{
TransformGroup modelTransformGroup = (TransformGroup) this.sceneTree.getChild(0);
if (modelTransformGroup.numChildren() > 0)
{
return (HomePieceOfFurniture3D) modelTransformGroup.getChild(0);
}
else
{
return null;
}
}