More Related Content
More from Satoshi Oomori (9)
Scene kit cocoa勉強会201306
- 27. //テキスト
text = [SCNText textWithString:@"text" extrusionDepth:20.0f];
textNode = [SCNNode nodeWithGeometry:text];
textNode.position = SCNVector3Make(-1, 5, -1);
textNode.transform = CATransform3DScale(textNode.transform, 3.0f, 3.0f,
3.0f);
//textNode.transform = CATransform3DRotate(textNode.transform, 2.0f,
0.0f, 0.0f, 1.0f);
textNode.transform =CATransform3DTranslate (textNode.transform, -20.0f,
-20.0f, 0.0f);
textNode.transform =CATransform3DRotate(textNode.transform, 3.14*0.0,
1.0, 0.0, 0.0);
[_sceneView.scene.rootNode addChildNode:textNode];
2013年 6月 1日 土曜日
- 29. • こんな感じ
- (IBAction)sliderAction:(id)sender {
//テキストの移動
textNode.transform = CATransform3DMakeScale( 3.0f, 3.0f, 3.0f);
textNode.transform =CATransform3DTranslate (textNode.transform, -20.0f,
-20.0f, 0.0f);
textNode.transform =CATransform3DRotate(textNode.transform,
(theSlider.floatValue/180)*3.14, 1.0, 0.0, 0.0);
}
2013年 6月 1日 土曜日
- 34. SCNHitTestResultクラスが返ってきます。
これでどのオブジェクトかがわかるわけです。
@property(nonatomic, readonly) SCNNode* node;
@property(nonatomic, readonly) NSInteger geometryIndex;
@property(nonatomic, readonly) NSInteger faceIndex;
@property(nonatomic, readonly) SCNVector3 localCoordinates;
@property(nonatomic, readonly) SCNVector3 worldCoordinates;
@property(nonatomic, readonly) SCNVector3 localNormal;
@property(nonatomic, readonly) SCNVector3 worldNormal;
@property(nonatomic, readonly) CATransform3D modelTransform;
2013年 6月 1日 土曜日