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:
Cinema 4D Version: r11
Platform: Windows ;
Language(s) : C++ ;
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,
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;
Segment *seg = spline->GetSegmentW();
seg.cnt = 2;
seg.cnt = 2;
Vector *points = spline->GetPointW();
points = Vector(0,0,0);
points = Vector(0,100,0);
points = Vector(0,200,0);
points = Vector(0,300,0);
On 12/02/2010 at 02:39, xxxxxxxx wrote:
thank you very much. this helps a lot