当前位置: 首页>>代码示例>>Java>>正文


Java TransformGroup.getChild方法代码示例

本文整理汇总了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();
}
 
开发者ID:valsr,项目名称:SweetHome3D,代码行数:23,代码来源:HomeComponent3D.java

示例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 );
    }
}
 
开发者ID:vZome,项目名称:vzome-desktop,代码行数:17,代码来源:Java3dSceneGraph.java

示例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 );
       	}
	}
}
 
开发者ID:vZome,项目名称:vzome-desktop,代码行数:17,代码来源:Java3dSceneGraph.java

示例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);
}
 
开发者ID:valsr,项目名称:SweetHome3D,代码行数:10,代码来源:HomePieceOfFurniture3D.java

示例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;
	}
}
 
开发者ID:valsr,项目名称:SweetHome3D,代码行数:17,代码来源:HomePieceOfFurniture3D.java

示例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;
	}
}
 
开发者ID:valsr,项目名称:SweetHome3D,代码行数:16,代码来源:ModelPreviewComponent.java


注:本文中的javax.media.j3d.TransformGroup.getChild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。