addchild


add image as child of a CC3Node


I'm using Cocos3D.
There i've a list of different CC3Nodes. I want to put an image next to each of it.
My problem is: how to create a new CC3Node and add it as a Child.
You need to doing something like this:
CC3PlaneNode *imageNode = [CC3PlaneNode nodeWithName:#"One Plane Node on 3D Object"];
[imageNode populateAsCenteredRectangleWithSize: CGSizeMake(200.0, 200.0)
andTessellation:ccg(40, 40) withTexture: [CC3Texture textureFromFile:#"Your Image Address"] invertTexture: YES];
imageNode.material.specularColor = kCCC4FLightGray;
imageNode.shouldCullBackFaces = NO;
[imageNode retainVertexLocations];
[self addChild:imageNode];
And for doing this for each Node:
CC3PlaneNode *newImageNode = [imageNode copyWithName:#"New Node Name"];
...
[self addChild:newImageNode];
At the end of it, if you want to add these node each node as a child do:
[previousNode addChild:newNode];
instead of:
[self addChild:newNode];
I hope it works for you!

Related Links

add image as child of a CC3Node

Categories

HOME
localization
turing-machines
hyperlink
developer-tools
ng-idle
apache-flink
css3
object
ns-3
mjml
angular2-material
sitecore
google-apps
dojo
interpolation
iis-6
google-cloud-datalab
crystal-reports-2013
special-characters
speech-synthesis
code-generation
gource
plink
flash-player
docx
modbus-tcp
draft-js-plugins
dapper-extensions
beautifier
custom-post-type
amazon-quicksight
alm
constexpr
custom-controls
panoramas
record
clickjacking
twos-complement
sql-delete
alphabetical
sql-server-ce
git-rewrite-history
jpad
protein-database
oracle-service-bus
angular-http
xmldocument
drupal-theming
apache-directory
apache-spark-dataset
monkey-testing
reportservice2010
facebook-pixel
dbcontext
arq
magic-draw
wpas
reshape
trigger.io
materialized-path-pattern
docpad
mapxtreme
dup
simevents
google-query-language
nservicebus5
ikiwiki
spring-retry
concurrentmodification
forwarding
morton-number
evolus-pencil
atoi
typemock
dulwich
baasbox
airbrake
graphics2d
ansi
canvg
openbabel
cryptographichashfunction
mass-assignment
delayed-execution
rapidsvn
packet-sniffers
reflector
malformedurlexception
draw2d-js
mutual-authentication
sbcl
openargs
kendo-dataviz
away3d
printdialog
route-provider
octal
pyunit
subproject
kqueue
hibernateexception
expression-blend-4
jquery-tools
fsevents
google-ajax-api
pylucene
dataform
luajava
binomial-heap
fail-fast-fail-early
ifilter
lemmatization
contentpresenter

Resources

Encrypt Message