Nurbs???

Software: Away3D 4.x

drbii, Member
Posted: 18 August 2014 03:23 PM   Total Posts: 72

Anybody have a good, working example of Nurbs in 4.1?

I keep getting out of range errors, even when using the few examples I have found.

var controlNet:Vector.<NURBSVertex> = new Vector.<NURBSVertex>( [

    
new NURBSVertex( -300, -100, -300, 1),
    new 
NURBSVertex( -300, -100, -150, 1),
    new 
NURBSVertex( -300, -100, 0, 1),
    new 
NURBSVertex( -300, -100, 150, 1),
    
    new 
NURBSVertex( -150, -100, -300, 1),
    new 
NURBSVertex( -150, -100, -150, 1),
    new 
NURBSVertex( -150, -100, 0, 1),
    new 
NURBSVertex( -150, -100, 150, 1),
    
    new 
NURBSVertex( 0, -100, -300, 1),
    new 
NURBSVertex( 0, -100, -150, 1),
    new 
NURBSVertex( 0, -100, 0, 1),
    new 
NURBSVertex( 0, -100, 150, 1),
    
    new 
NURBSVertex( 150, -100, -300, 1),
    new 
NURBSVertex( 150, -100, -150, 1),
    new 
NURBSVertex( 150, -100, 0, 1),
    new 
NURBSVertex( 150, -100, 150, 1)] );
   
   var 
nurb:NURBSGeometry = new NURBSGeometry( controlNet, 4, 4, 4, 4, 15, 15 );

   
meshObject = new Mesh(nurb, pedscrew_thread_material);

   
nurb.refreshNURBS();
   
away3dView.scene.addChild(meshObject); 

 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X