Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/02/2010 at 13:16, xxxxxxxx wrote:
User Information: Cinema 4D Version: r11 Platform: Windows ; Language(s) : C++ ;
--------- Hi there,
i need some hint how i can create segments for a spline object. i already know how to create a spline (with a single segment), and in the help file i can only find commands to get the segment sount and such stuff, but i cannot fine something to create segments.
any help is welcome.
cheers and thanks, ello
On 12/02/2010 at 01:33, xxxxxxxx wrote:
SplineObject::ResizeObject() allows you to change the segment count. SplineObject::GetSegmentW() return the writeable array of segments to set how many points per segment.
Also have a look at VariableChanged structure and the MSG_SEGMENTS_CHANGED message for a more low-level approach.
here an example which creates a spline with two segments.
SplineObject *spline = NULL; spline = SplineObject::Alloc(0, Tlinear); if (!spline) return FALSE; spline->ResizeObject(4, 2); Segment *seg = spline->GetSegmentW(); seg[0].cnt = 2; seg[1].cnt = 2; Vector *points = spline->GetPointW(); points[0] = Vector(0,0,0); points[1] = Vector(0,100,0); points[2] = Vector(0,200,0); points[3] = Vector(0,300,0);
cheers, Matthias
On 12/02/2010 at 02:39, xxxxxxxx wrote:
thank you very much. this helps a lot
best regards, ello